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: Tue, 31 May 2016 16:07:52 +0200 Lines: 38 Message-ID: References: <66abaae4-be73-486e-a8d8-b44d0592b744@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 PZe7A70R9UW9jsLMJMTDwwozBP0QkKZorNnFFuexrhwlXwmeA= Cancel-Lock: sha1:uKRG+lS+X1Am5qfetIUZ+WUvKno= In-Reply-To: <66abaae4-be73-486e-a8d8-b44d0592b744@googlegroups.com> 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:9388 Hi Alex, > > Is there a way to automatically generate such interface code in VO? > No, but depending on the complexity and number of functions to import, it´s commonly not that hard to do it manually. Some pitfalls when you declare a interface to a foreign DLL: 1. UNICODE or ANSI Functions to import ? 2. You may never use VO dynamic Datatypes like STRING, ARRAY,FLOAT etc. 3. Instead of STRINGs always use PSZs 4. Instead of FLOATs always use the Datatype REAL4 or REAL8. (There is something special to do when a Importfunction returns a C-float or double) 5. The Functionnames to import are always case-sensitive ! e.g. _DLL FUNCTION GetZipDllVersion() AS DWORD PASCAL:ZIPDLL.GetZipDllVersion changed to _DLL FUNCTION GetZipDllVersion() AS DWORD PASCAL:ZIPDLL.GETZIPDLLVERSION would throw at startup an ErrorBox like "GETZIPDLLVERSION() not found" . Regards Karl-Heinz BTW. Seems your hometown is "Sindelfingen" ? I´m living in "Tamm" ;-)