Smart Device Functions:
[DllImport("kernel32.dll", SetLastError = true)]
Declare Function GetStdHandle Lib "kernel32.dll" (ByVal nStdHandle As Integer) As IntPtr
Tips & Tricks:
Please add some!
//C#: Get stdout handle
const int STD_OUTPUT_HANDLE = -11;
IntPtr iStdOut = GetStdHandle( STD_OUTPUT_HANDLE );
const int STD_INPUT_HANDLE = -10;
const int STD_ERROR_HANDLE = -12;
INVALID_HANDLE_VALUE (return value if invalid handle is specified)
Alternative Managed API:
Do you know one? Please contribute it!
The GetStdHandle API
11/8/2011 6:21:57 AM - -220.127.116.11
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.
1/13/2008 11:00:13 AM - tsahi-18.104.22.168
сonstant for invalid handle value
1/29/2010 10:24:18 PM - -22.214.171.124
Please edit this page!
Do you have...