c# Programming Glossary: invalid_handle_value
Process.Start with different credentials with UAC on http://stackoverflow.com/questions/2313553/process-start-with-different-credentials-with-uac-on const UInt32 TH32CS_SNAPPROCESS 0x00000002 const Int32 INVALID_HANDLE_VALUE 1 DllImport kernel32.dll SetLastError true static extern Boolean..
NTFS Alternate Data Streams - .NET http://stackoverflow.com/questions/604960/ntfs-alternate-data-streams-net FILE_SHARE_WRITE NULL OPEN_ALWAYS 0 NULL if hFile INVALID_HANDLE_VALUE printf Cannot open testfile n else WriteFile hFile This is testfile.. NULL OPEN_ALWAYS 0 NULL if hStream INVALID_HANDLE_VALUE printf Cannot open testfile stream n else WriteFile hStream..
Is there a faster way to scan through a directory recursively in .NET? http://stackoverflow.com/questions/724148/is-there-a-faster-way-to-scan-through-a-directory-recursively-in-net static List Info RecursiveScan2 string directory IntPtr INVALID_HANDLE_VALUE new IntPtr 1 WIN32_FIND_DATAW findData IntPtr findHandle INVALID_HANDLE_VALUE.. new IntPtr 1 WIN32_FIND_DATAW findData IntPtr findHandle INVALID_HANDLE_VALUE var info new List Info try findHandle FindFirstFileW directory.. FindFirstFileW directory @ out findData if findHandle INVALID_HANDLE_VALUE do if findData.cFileName . findData.cFileName .. continue..
Changing text color in C# Console Application http://stackoverflow.com/questions/7937256/changing-text-color-in-c-sharp-console-application 11 per WinBase.h internal static readonly IntPtr INVALID_HANDLE_VALUE new IntPtr 1 per WinBase.h DllImport kernel32.dll SetLastError.. GetStdHandle STD_OUTPUT_HANDLE 7 if hConsoleOutput INVALID_HANDLE_VALUE return Marshal.GetLastWin32Error bool brc GetConsoleScreenBufferInfoEx..
|