The best way to do it to cover all cases of opening from any program would be via a file system filter driver. This may be too complex for your needs though.
More Related Contents:
- How to get main window handle from process id?
- How to make thread sleep less than a millisecond on Windows
- How to read a value from the Windows registry
- What does “WINAPI” in main function mean?
- Detect active window changed using C# without polling
- Win32 programming hiding console window
- Can I use CreateFile, but force the handle into a std::ofstream?
- SetupDiGetDeviceProperty usage example
- Read process memory of a process does not return everything
- How to get the process name in C++
- Using CreateWindowEx to Make a Message-Only Window
- How do I get the window handle of the desktop?
- C++/Win32: How to wait for a pending delete to complete
- How do I implement dragging a window using its client area?
- Detecting simulated keyboard/mouse input
- WinAPI Sleep() function call sleeps for longer than expected
- Best method for storing this pointer for use in WndProc
- How to programmatically create a shortcut using Win32
- How can I save HICON to an .ico file?
- Is there a way to get the string representation of HRESULT value using win API?
- EnumDisplayDevices vs WMI Win32_DesktopMonitor, how to detect active monitors?
- Why does MAKEINTRESOURCE() work?
- Name of process for active window in Windows 8/10
- “APIENTRY _tWinMain” and “WINAPI WinMain” difference
- Size of a directory [duplicate]
- Getting another process command line in Windows
- Visual Studio 2013: CL.exe exited with code -1073741515
- C++: What’s the simplest way to read and write BMP files using C++ on Windows?
- DoEvents equivalent for C++?
- Get key press in windows console