Uncategorized

Visual Studio 2017 add a context menu item “Open With Visual Studio” on the shell extension of directory

Remove HKEY_CLASSES_ROOT\Directory\Background\shell\AnyCode and HKEY_CLASSES_ROOT\Directory\shell\AnyCode from Registry to delete it.

7 years ago

LoadLibrary(jvm.dll) fails even if the file exists

It needs an appropriate C++ runtime library to load jvm.dll. Install VC++ 20XX Redistributable.

7 years ago

VMWare : Netwoking of Guest OS is not available after restoring

Stopping network related service will fix it. C:\WINDOWS\system32>net stop bits The Background Intelligent Transfer Service service is stopping.. The Background…

8 years ago

MessageBox is not shown after Dialog was closed in MFC Dialog Application

In Win32, you can not show MessageBox after calling PostQuitMessage() until calling GetMessage to get out of message loop. In…

8 years ago

error MSB8020: The build tools for v120 (Platform Toolset = ‘v120’) cannot be found.

Usually you can fix this error by changing tool-set VS uses. But if the Solution includes a reference which uses…

9 years ago

Check whether a file is open or not in Win32

There is no easy way to check file is open. I write simple code to check it but it still…

9 years ago

How to create a C++ function that can take argment of both char* and wchar_t*

Source. Create a traits class that is used as specialized template. Specialize it for char and wchar_t. Generic template is…

12 years ago

System global variable in win32

class CSessionGlobalBool { public: explicit CSessionGlobalBool(LPCSTR pName) { m_pName = (LPSTR)LocalAlloc(LMEM_FIXED, lstrlenA(pName)+sizeof(char)); lstrcpy(m_pName, pName); } ~CSessionGlobalBool(){ LocalFree(m_pName); } operator bool()…

12 years ago

Show a “We are Busy” page when your server is too busy by using PHP

If you are apache fan. You shold have many virtual host in your apache conf. But after your site getting…

12 years ago