Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #9460

Re: How to integrate C DLL into VO and generate interface code

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Wolfgang Riedmann" <wriedmann@gmail.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: How to integrate C DLL into VO and generate interface code
Date Tue, 21 Jun 2016 06:21:18 +0200
Lines 112
Message-ID <dsrtlvF3t6rU1@mid.individual.net> (permalink)
References <66abaae4-be73-486e-a8d8-b44d0592b744@googlegroups.com> <7de24866-5bfe-439f-befb-099a84afe0d0@googlegroups.com> <dr7s82Fkp19U1@mid.individual.net> <b21ed327-184e-482f-96ea-73b551cb6963@googlegroups.com> <njri0l$ef7$1@news.m-online.net> <ca6db81c-f61c-4d71-9aac-8ebe6b9be7aa@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace individual.net claVam8L91HkD17evnLStguzN3el/0rX/mgLCz+EWkFGTBECk=
Cancel-Lock sha1:2+VMFdCrdbBcNWuqgzk8LSgBzGc=
User-Agent XanaNews/1.18.1.6
Xref csiph.com comp.lang.clipper.visual-objects:9460

Show key headers only | View raw


Hi Alex,

I have no reader, but I think I have been able to understand what's
going on.

The C header file defines things like this:

EASYCHECK_API int OpenReader();
EASYCHECK_API int OpenReader(char* readerport);
EASYCHECK_API int CloseReader();
EASYCHECK_API int CloseReader(char* readerport);

the same function name with different parameters. VO cannot deal with
this.

So I think this is a C++ DLL, and using depends.exe I have found
different exported functions that seem to work - they are prefixed with
Bib, using for example

_dll function BibOpenReader() as int pascal:EasyCheck.BibOpenReader

Try to ask the producer of the DLL of this is the correct C interface -
not C++!

In the VO help there is a section about integrating also C++ dlls, but
I have no experience with it.

Wolfgang


alexander.schmitt@paidosoft.de wrote:

> Hi Wolfang, Karl-Heinz, Gerhard,
> 
> great support, thanks!
> 
> @Wolfgang:
> 
> "@" seems required for "IS" to indicate the call-by-reference, for
> "AS" no "@" is required or possible. Reference seems implicit.
> 
> BTW: Exchanging AS (+allocating) / IS (no allocating) does not help.
> 
> @Karl-Heinz:
> 
> > First of all you should tell us exactly what GetItem() does.
> 
> > - which members must be filled before calling GetItem() ?
> > - which members are filled by the C-DLL ?
> 
> GetItem(nItem, ptrStruc) actually fetches all information written on
> the RFID tag identified by a number "nItem" and writes it into the
> structure "ptrStruc" that is called by reference from VO. E.g.
> ID-Number of the tag, author, ISBN number, etc. If there is e.g. only
> one tag on the reader, then the item can be addressed with nItem=0
> (meaning actually the first and only one).
> 
> There is no need to initialize anything, i.e. everything is filled by
> the C-DLL. However, I also tried if initializing would help, but it
> ain't.
> 
> > Guessing that the C-DLL writes at least a string to "uID" , you
> > might try it
> with a modfied structure 
> 
> I did try your version, but same issue. :-(
> 
> > Wondering, though the C-Headerfile e.g. publishes the Functionname
> > "GetItem", you´re not able to import the function using that name
> > ...
> 
> I was wondering too, actually. But I received "procedure entry point
> missing" errors without.
> 
> @Gerhard:
> 
> 
> > Then you maybe have to use 'ALIGN 1' to declare that data structure.
> 
> I tried different alignments, but same issue. But thanks for pointing
> out.
> 
> > Do you have a C-Sample to use that DLL? 
> 
> Only a code snippet from the API doc:
> 
> TRPINFO myInfo;
> memset(&myInfo, 0, sizeof(TRPINFO));
> int result = GetItem (0, &myInfo);
> if (result < 0)
> {
> // Fehler;
> …
> return;
> }
> cout << myInfo.itemId << endl;
> 
> Pretty similar to my implementation.
> 
> I guess I have to practice with other DLLs e.g. libzip to see if I am
> basically able to populate structures without generating crashes ;-)
> and then have another iteration with the provider guys.
> 
> I'll keep you posted. May take a while...
> 
> Best,
> Alex



-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How to integrate C DLL into VO and generate interface code Alexander Schmitt <alexander.schmitt@paidosoft.de> - 2016-05-31 03:52 -0700
  Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-05-31 16:11 +0200
  Re: How to integrate C DLL into VO and generate interface code "Karl-Heinz" <invalid@invalid.invalid> - 2016-05-31 16:07 +0200
  Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-01 02:13 -0700
    Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-01 12:36 +0200
    Re: How to integrate C DLL into VO and generate interface code "Karl-Heinz" <invalid@invalid.invalid> - 2016-06-01 12:37 +0200
      Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-14 14:05 -0700
        Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-15 08:59 +0200
        Re: How to integrate C DLL into VO and generate interface code "Karl-Heinz" <invalid@invalid.invalid> - 2016-06-15 09:40 +0200
        Re: How to integrate C DLL into VO and generate interface code "Gerhard Bunzel" <g.bunzel@domonet.de> - 2016-06-15 14:34 +0200
          Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-15 14:06 -0700
            Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-16 05:56 +0200
            Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-16 06:03 +0200
              Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-16 14:28 -0700
                Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-19 13:23 -0700
                Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-20 07:29 +0200
            Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-21 06:21 +0200
              Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-06-22 12:37 -0700
                Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-23 04:05 +0200
                Re: How to integrate C DLL into VO and generate interface code alexander.schmitt@paidosoft.de - 2016-07-03 13:53 -0700
                Re: How to integrate C DLL into VO and generate interface code "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-05 21:19 +0200
  Re: How to integrate C DLL into VO and generate interface code "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-06-20 09:16 +0200
    Re: How to integrate C DLL into VO and generate interface code "Karl-Heinz" <invalid@invalid.invalid> - 2016-06-20 12:35 +0200

csiph-web