¡@

Home 

c# Programming Glossary: kernel32

Why does closing a console that was started with AllocConsole cause my whole application to exit? Can I change this behavior?

http://stackoverflow.com/questions/11959643/why-does-closing-a-console-that-was-started-with-allocconsole-cause-my-whole-app

was closed. EDIT Code internal class SomeClass DllImport kernel32 private static extern bool AllocConsole private static void.. example code is bugged in that the DLLImport needs to be kernel32.dll or kernel32 not Kernel32 . After making that change I'm.. bugged in that the DLLImport needs to be kernel32.dll or kernel32 not Kernel32 . After making that change I'm getting a message..

Reference a GNU C (POSIX) DLL built in GCC against Cygwin, from C#/NET

http://stackoverflow.com/questions/2710465/reference-a-gnu-c-posix-dll-built-in-gcc-against-cygwin-from-c-net

with the above code in C# using something like DllImport kernel32.dll public static extern IntPtr LoadLibrary string dllToLoad.. extern IntPtr LoadLibrary string dllToLoad DllImport kernel32.dll public static extern IntPtr GetProcAddress IntPtr hModule.. IntPtr hModule string procedureName DllImport kernel32.dll public static extern bool FreeLibrary IntPtr hModule UnmanagedFunctionPointer..

How can I write fast colored output to Console?

http://stackoverflow.com/questions/2754518/how-can-i-write-fast-colored-output-to-console

P Invoke for CreateFile http www.pinvoke.net default.aspx kernel32 CreateFile.html And you can use WriteConsoleOutput to move all.. UnmanagedType.U4 int flags IntPtr template DllImport kernel32.dll SetLastError true static extern bool WriteConsoleOutput..

x86/x64 CPUID in C#

http://stackoverflow.com/questions/3216535/x86-x64-cpuid-in-c-sharp

void CpuIDDelegate int level byte buffer DllImport kernel32.dll SetLastError true private static extern IntPtr VirtualAlloc.. flAllocationType MemoryProtection flProtect DllImport kernel32 private static extern bool VirtualFree IntPtr lpAddress UInt32.. buffer private static class NativeMethods DllImport kernel32.dll SetLastError true internal static extern IntPtr VirtualAlloc..

Show Console in Windows Application?

http://stackoverflow.com/questions/472282/show-console-in-windows-application

args.Length 0 args 0 console default to console DllImport kernel32.dll SetLastError true static extern bool AllocConsole DllImport.. true static extern bool AllocConsole DllImport kernel32.dll SetLastError true static extern bool FreeConsole DllImport.. SetLastError true static extern bool FreeConsole DllImport kernel32 SetLastError true static extern bool AttachConsole int dwProcessId..

Set System Time Zone from .NET

http://stackoverflow.com/questions/808736/set-system-time-zone-from-net

timezone information at http www.pinvoke.net default.aspx kernel32 GetTimeZoneInformation.html The main part of the following sample.. error information call GetLastError. returns DllImport kernel32.dll CharSet CharSet.Auto private static extern int GetTimeZoneInformation.. error information call GetLastError. returns DllImport kernel32.dll CharSet CharSet.Auto private static extern bool SetTimeZoneInformation..