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


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

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

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 2016-05-31 16:11 +0200
Message-ID <dr5kdhF736eU1@mid.individual.net> (permalink)
References <66abaae4-be73-486e-a8d8-b44d0592b744@googlegroups.com>

Show all headers | View raw


Hi Alex,

> I want to integrate a DLL (written in C) from a hardware supplier
> into my VO 2.8 code and could not find relevant information in the
> group. Or did not know where to search.
> 
> I have a C-header file that provides information about the functions
> plus the DLL.
> 
> The DLL is obviously not an automation server, so Automation Server
> interface generation from VO would not work.
> 
> If I take a look into e.g. lib zip from Fabrice Foray, there is an
> interface defined, e.g.  _DLL FUNCTION GetZipDllVersion() AS DWORD
> PASCAL:ZIPDLL.GetZipDllVersion
> 
> Is there a way to automatically generate such interface code in VO?
> Or would I rather guess and write manually?

unfortunately there is no automated way to do this - and guessing is
bad, you should know how this need to be implemented.

I have done such things several times - if you show maybe a part of the
header file and give us the name of the DLL, maybe we can help a little
bit.
It depends how many functions you have to implement - but of course it
is a precise work.
And since it is a C DLL, maybe you have also structures and defines to
translate....

But the way you have seen in Fabrices zip lip is the correct one.

This is a sample:
C header file:
char *  __stdcall zGetFileName(int i);

VO interface:
_dll function _zGetFileName( nItem as int ) as byte ptr
pascal:bszip.dll.zGetFileName


Wolfgang



-- 

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