Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: How to integrate C DLL into VO and generate interface code Date: Wed, 15 Jun 2016 09:40:15 +0200 Lines: 68 Message-ID: References: <66abaae4-be73-486e-a8d8-b44d0592b744@googlegroups.com> <7de24866-5bfe-439f-befb-099a84afe0d0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: individual.net nNMFg8Eobf/rSs/LZ8RjaAkYSKIYHuZPdKc9/yoIkaG8zrSGE= Cancel-Lock: sha1:izVn0dXrnQWk9WEcuOTiF2lfPQ4= In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 Xref: csiph.com comp.lang.clipper.visual-objects:9431 Hi Alex, >local ptrStruct is TRPINFO > >ptrStruct.isUserCard:=false >ptrStruct.numberOfParts:=0 >ptrStruct.uID:=MemAlloc(17) > > >Qout(“before”) >nRet:=GetItem(nItem, @ptrStruct) >Qout(“after”) > >The application crashes hardly when GetItem is called without > the VO error handler popping up. Qout(“after”) is never reached. 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 ? Guessing that the C-DLL writes at least a string to "uID" , you might try it with a modfied structure ------------------ structure TRPINFO member isUserCard as logic member numberOfParts as int Member Dim uI[17] as byte // 17 recommended buffersize ? --------------- local ptrStruct is trpinfo local nID, nRet as int // reason to setup these members? ptrStruct.isUserCard:=false ptrStruct.numberOfParts:=0 // purpose of "nID" ? nRet := GetItem ( nID , @ptrStruct ) //assuming nRet holds an errorcode if nRet == ? psz2string ( @ptrStruct.uID[1] ) else ? nRet endif >Basic functions like OpenReader() and GetNumberOfItems() (i.e. the >RFID-tags on it) are working > after I identified the correct DLL entry points using Dependency Walker. Wondering, though the C-Headerfile e.g. publishes the Functionname "GetItem", you´re not able to import the function using that name ... regards Karl-Heinz