Hi everyone:
I'm very new to C/C++ and working with some C++ code that calls some functions from a compiled DLL that was written in C++ v.2.0 (I think). I need to call these same functions from VB. I can see the functions that are available (in Dependency Walker) but I can't get the parameters. So I thought that I would just go to the C++ code that calls the DLL functions to find out what kinds of parameters were expected.
Here's the C code:
Here's the code that I used:Code:int GridExists(char *grid_name);
When I call the function like this:Code:Private Declare Function GridExists Lib "evildll.dll" (ByRef grid_name As String) As Integer
I get the "Bad DLL Calling Convention" (error 49) message.Code:i = GridExists("C:\MyDirectory\my_grid_file.grd")
Anyone have a clue as to what I am doing wrong?




Reply With Quote