I'm having trouble getting a handle returned from the following code
within a managed class:
HANDLE m_hSerialComm = CreateFile("\\\\.\\COM1\0\0\0",
GENERIC_READ|GENERIC_WRITE, 0, 0, OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING, 0);
It works fine in non-managed code but I get a '{void}' returned when run
within managed code. I'm wondering if that's actually the problem or if
there is something else I'm missing... If it is the problem, then what's
the best solution?
Thanks
Steve
Tomas Restrepo \(MVP\) - 22 Jun 2005 01:24 GMT
Steve,
> I'm having trouble getting a handle returned from the following code
> within a managed class:
[quoted text clipped - 7 lines]
> there is something else I'm missing... If it is the problem, then what's
> the best solution?
There shouldn't be a problem. I believe what you're seeing is that when
working in the mixed mode debugger it has "issues" displaying the values of
certain things (like handle values, which are just void* in essence).

Signature
Tomas Restrepo
tomasr@mvps.org
http://www.winterdom.com/