Can be called by:
<DllImport("yasdimaster.dll", CallingConvention:=CallingConvention.Cdecl)> Public Function yasdiMasterInitialize(ByVal IniFile As String, ByRef DriverCount As UInt32) As Integer
But anything with arrays:
int GetDeviceName( DWORD DevHandle, char * DestBuffer, int len)
I can't seem to get right:
<DllImport("yasdimaster.dll", CallingConvention:=CallingConvention.Cdecl)> Public Function GetDeviceName(ByVal DeviceNumber As UInt32, ByVal DeviceName As String, ByVal Length As Integer) As Integer
The above example runs but returns nothing. If I change DeviceName to ByRef, I get protected memory errors.
The full library and documentation is available on the internet if anyone would like to download it and I've successfully compiled it with VS2010.
In .net we use a string builder class as input when calling such a C function and the system automatically takes care of things. If that is not possible, is there any way of passing in a raw array from VB?
Last edited by Zaccheus; September 2nd, 2010 at 04:54 AM.