Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: C-DLL with paramter VARIANT and FILETIME? Date: Sun, 21 Oct 2018 05:58:52 +0200 Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: individual.net tu6sCIlYIHsl7iBfvPfzkQlFDOROcdUkx+1mrWSSpsrX8g2S4= Cancel-Lock: sha1:FqjIgIjw6iPHtVdHvVOczvhFD5o= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:12066 Hi Gerhard, working with pointers should work, it works in many places in my own applications. But I have now idea about VARIANT, never used it. AFAIK VARIANT has to do with COM, I have seen it only there, and Wikipedia says the same: https://en.wikipedia.org/wiki/Variant_type So I suspect you are trying to use the DLL the wrong way: with _DLL instead of with COM/OLE. What says the documentation about it? Wolfgang Gerhard Bunzel wrote: > Hi Wolfgang, > > thanks for your fast answer. > > I've already tried that - in different variations. > Also the declaration of the C function with different types: > ..., pFileTime AS _winFileTime, pQuality REF DWORD) ... > ..., pFileTime REF _winFileTime, pQuality REF DWORD) ... > ..., pFileTime AS PTR, pQuality REF DWORD) ... > ..., pFileTime REF PTR, pQuality REF DWORD) ... > Nothing wants to work. > > Any idea about VARIANT? > > Thank you very much for your efforts. > > Best regards > > Gerhard > > > Am 19.10.2018 um 06:18 schrieb Wolfgang Riedmann: > > Hi Gerhard, > > > > probably you have to allocate memory for the relative structures and > > pass in the pointers. > > > > local strTimeStamp as _winFileTime > > > > > > strTimeStamp := MemAlloc( _sizeof( _winFileTime ) ) > > > > and after the call to the function, don't forget to call MemFree(), > > > > Wolfgang --