Hello guys, so i just bought a function generator and i want to connect the ports from my program. The folder of the driver came with a program in vb6, so that makes me dont need to create the full program.
Even if im not a pro in visual basic, i translated almost everything into vb.net, but when i run the program it gives me the following error when runs Writefile.
System.AccessViolationException
i have searched in lot of websites and forums and tried almost everything but i dont know how to fix it. when every data arrives to "writefile" is like this:
WriteFile(hComm, bytebuf_t(0), wLen, gLen, 0&)
hcomm: a large number, always something like 42221250801565695
bytebuf_t(0): 115
wlen: 14
glen:0
0&: i dont really get this.
also, the writefile command is this.
Public Declare Function WriteFile Lib "kernel32" (ByVal hCommDev As Long, lpBuffer As Byte,
ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, lpOverlapped As Long) As Long
Help please...