Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9435
| 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 | Thu, 16 Jun 2016 06:03:24 +0200 |
| Lines | 100 |
| Message-ID | <dsemofFevspU1@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 VDSDnpoNR4Tn2HhbvSo2NAX57zKKEj+qPYMJhjI/rfmBFXQeU= |
| Cancel-Lock | sha1:0OqRQoMU1G0pFB1vBDcfyJWr+PY= |
| User-Agent | XanaNews/1.18.1.6 |
| Xref | csiph.com comp.lang.clipper.visual-objects:9435 |
Show key headers only | View raw
Hi Alex,
> "@" seems required for "IS" to indicate the call-by-reference, for
> "AS" no "@" is required or possible. Reference seems implicit.
yes, you are right.
Please see this working code from Fab Paintlib:
LOCAL pRect IS _winRECT
LOCAL Width, Height AS LONG
//
GetClientRect( hWnd, @pRect )
Width := pRect.Right - pRect.Left + 1
Height := pRect.Bottom - pRect.Top + 1
> BTW: Exchanging AS (+allocating) / IS (no allocating) does not help.
this is very strange. Do you have any piece of documentation? Some
could it be that the C DLL allocates the memory for the structure and
needs to free it afterwards? Do that you need to pass in a pointer to
the structure?
Wolfgang
>
> @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
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