Overlapped I/O on anonymous pipe

Here is an implementation for an anonymous pipe function with the possibility to specify FILE_FLAG_OVERLAPPED: /******************************************************************************\ * This is a part of the Microsoft Source Code Samples. * Copyright 1995 – 1997 Microsoft Corporation. * All rights reserved. * This source code is only intended as a supplement to * Microsoft Development Tools and/or WinHelp … Read more

Does Windows 7 restrict folder access as Vista does?

It’s not a “problem”, it’s a feature. It’s called User Account Control (UAC), and it’s one of the ways that system security was tightened under Windows Vista. Windows 7 indeed retains a similar security model. There’s absolutely no reason that your application should need to mess with system folders in the first place. As you’ve … Read more

How to create a resizable CDialog in MFC?

In the RC resource file if the dialog has this style similar to this it will be fixed size: IDD_DIALOG_DIALOG DIALOGEX 0, 0, 320, 201 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU If the dialog has this style it will be sizeable: IDD_DIALOG_DIALOG DIALOGEX 0, 0, 320, 201 STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION … Read more

How do I send key strokes to a window without having to activate it using Windows API?

Alright, this is kind of disappointing I’m sure, but you fundamentally cannot do this with 100% reliability. Windows assumes that the active window is the one getting keyboard input. The proper way to fake keyboard input is with SendInput, and you’ll notice that it sends messages to the active window only. That being said, you … Read more