T
Ted
Is it possible to use mailslots in .NET using PInvoke?
I have a VC++ 6.0 based app that creates and listens to a
mailslot. I have a second VC++ 6.0 based app that opens
the mailslot and writes to it successfully. So this stuff
works.
Additionally, I have a VB.NET app that opens the mailslot
successfully using CreateFile() (with PInvoke). What looks
like a proper handle is returned and there is no error.
(Marshal.GetLastWin32Error() returns 0).
However, when I try to use this handle (VB.NET app) with
WriteFile() (using PInvoke) the write fails with error
code 0x06, which is "The handle is invalid".
I have tried multiple versions of PInvoke signatures,etc.
with the same result.
IS IT AT ALL POSSIBLE TO USE MAILSLOTS WITH .NET?
Thank you,
Ted
I have a VC++ 6.0 based app that creates and listens to a
mailslot. I have a second VC++ 6.0 based app that opens
the mailslot and writes to it successfully. So this stuff
works.
Additionally, I have a VB.NET app that opens the mailslot
successfully using CreateFile() (with PInvoke). What looks
like a proper handle is returned and there is no error.
(Marshal.GetLastWin32Error() returns 0).
However, when I try to use this handle (VB.NET app) with
WriteFile() (using PInvoke) the write fails with error
code 0x06, which is "The handle is invalid".
I have tried multiple versions of PInvoke signatures,etc.
with the same result.
IS IT AT ALL POSSIBLE TO USE MAILSLOTS WITH .NET?
Thank you,
Ted