Interfacing a dll written in c++
Posted on 2002-04-16
I got a stupid problem again and dunno howto handle it.
I wrote a dll in VC++ the contains this function
... ImageRead( char* fname,
unsigned char** Image,
unsigned char** map);
The first parameter is only needed to be given, the others are filled by the function.
In VB, I implemented it the following way:
Public Declare Function ImageRead Lib "myImage.dll" (ByRef fileName As Integer, _
ByRef imgData() As Byte, _
ByRef format As Integer, _
ByRef width As Integer, _
ByRef height As Integer, _
ByRef resolution As Integer, _
ByRef color As Integer, _
ByRef map() As Byte) As Long
When I try to call this function I always get a 'Runtime error 13' type mismatch.
Whats my freakin' mistake??
Thanks in advance!!!