Are TCP SOCKET handles inheritable?

Short answer No, SOCKETs should not be marked inheritable. When certain Layered Service Providers (LSPs) are installed, the inherited handles simply can’t be used in the child. As an added irritation, see the related issue “Can TCP SOCKETS be marked non-inheritable?”. Briefly, you can’t rely on being able to inherit the sockets, but nor can … Read more

Win32: full-screen and hiding taskbar

Edit 2. There is even a better way for doing fullscreen, the chromium way, source taken from here: http://src.chromium.org/viewvc/chrome/trunk/src/ui/views/win/fullscreen_handler.cc?revision=HEAD&view=markup void FullscreenHandler::SetFullscreenImpl(bool fullscreen, bool for_metro) { ScopedFullscreenVisibility visibility(hwnd_); // Save current window state if not already fullscreen. if (!fullscreen_) { // Save current window information. We force the window into restored mode // before going fullscreen … Read more

What’s the differences between VirtualAlloc and HeapAlloc?

Each API is for different uses. Each one also requires that you use the correct deallocation/freeing function when you’re done with the memory. VirtualAlloc A low-level, Windows API that provides lots of options, but is mainly useful for people in fairly specific situations. Can only allocate memory in (edit: not 4KB) larger chunks. There are … Read more