Re: [Dev-C++] help needed with calling dll from Visual basic
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Carlo <car...@li...> - 2004-11-05 08:08:10
|
Ni Jinfeng ha scritto lo scorso 04/11/2004 15.11:
> Hi, All.
>
>
>
> I am writing to ask for help from the Dev-C++ user community with the
> problem of calling dll from visual basic.
>
>
>
> I wrote a dll by using Dev-C++ and the dll works fine with an interface
> written in Dev-C++. However, when I tried to call the dll from an
> interface written in visual basic, I run into problem.
>
[cut]
>
> Jean Ni
>
I have already run in this problem (this is the reason why I thrashed VB
and now use GTK+ :-); the problem is in the different use of strings
between VB and C. A workaround that worked for me is the following:
1. change your library function to:
void _stdcall reportTime (char ** name)
2. change your function declaration to:
Private Declare Sub reportTime Lib "your.dll"
(ByRef name As String)
HTH
|