Thanks Dick, glad to hear from you again.
the serial ports work fine, its the 25 pin GPI ports that work great in VB6
using 2 API calls
CreateFile and DeviceIoControl.
Like I said they work fine in VB6 but the code fails in .NET
CreateFile gives me the error:
PInvokeStackImbalance was detected
Message: A call to PInvoke function
'BlastronicsGpi!BlastronicsGpi.cGpi::CreateFile' has unbalanced the stack.
This is likely because the managed PInvoke signature does not match the
unmanaged target signature. Check that the calling convention and parameters
of the PInvoke signature match the target unmanaged signature.
but does give me a handle.
DeviceIoControl gives me the error:
PInvokeStackImbalance was detected
Message: A call to PInvoke function
'BlastronicsGpi!BlastronicsGpi.cGpi:
eviceIoControl' has unbalanced the
stack. This is likely because the managed PInvoke signature does not match
the unmanaged target signature. Check that the calling convention and
parameters of the PInvoke signature match the target unmanaged signature.
And does not get back the bytes..
Wierd!
VB6 great product!
-Lou