Apparently, you're trying to use a VB6 signature in VB.NET code. That won't work without some conversion. For example, a Long in VB6 is a 32-bit signed integer, while in VB.NET the same Long keyword is a 64-bit signed integer. If you want to translate the code, you have to replace the VB6 Long's with VB.NET Integer's. This is the biggest reason why people get this error message when using code they don't understand. Also, any structures must be passed as an actual structure, not a Long or Integer.
Dave Kreskowiak Microsoft MVP - Visual Basic