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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.