Link to home
Start Free TrialLog in
Avatar of rangers99
rangers99

asked on

Converting Windows HANDLE data type to Visual C#

I want to convert the following line to Visual C# code.

HANDLE bob = INVALID_HANDLE_VALUE;

So I need a C# equivalent for HANDLE
And I want to define INVALID_HANDLE_VALUE as a C# constant.


Notes:
1. INVALID_HANDLE_VALUE is defined in WinBase.h thus;
#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)   in WinBase.h

2. HANDLE is defined in windows.h
ASKER CERTIFIED SOLUTION
Avatar of williamcampbell
williamcampbell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial