Hi,
I wish to call a dll from within VB. I've created the dll in C++ and
can't seem to call it appropriately. I get this error
Bad DLL calling convention.
Declare Function diskfree Lib "diskfree.dll" (ByVal num As Integer) As
Integer
Public Function callM20()
Call diskfree(2)
End Function
It is finding the diskfree.dll but doesn't seem to recognize the
function, which I think has something do to with how I'm setting up the
dll for export. (Perhaps this is more of a C++ question, but I can make
it work from within C++). My dll has only one function call in the
source file:
int diskfree(int num);
int diskfree(int num)
{
return ( num * 20 );
}
I've not included a header file because it is so short. My def file
looks like this.
LIBRARY "diskfree"
DESCRIPTION 'Implements a binary tree.'
EXPORTS
I know this may be a more appropriate question for a C++ list, but I
thought I would try it out here.
Thanks,
Finn