I was tinkering of how I can put a desktop shortcut of my program and I thought this is one of those things I still have to learn. So, I wander into the internet to find a most simple example and read lots of articles and discussion and somehow I find it daunting to read all those codes where all I want is to create a simple desktop shortcut. After a lot of reading and experimentation I finally have the code below. #include<windows.h> #include<shlobj.h> int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow) { createShortcut(); return 0; } void createShortcut() { HRESULT hr; ::CoInitialize(NULL); IShellLink *pShellLink; hr = ::CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_ALL,IID_IShellLink, (void**)&pShellLink); hr = pShellLink->SetPath("C:\\MyProjects\\OCXTest\\Debug\\OCXTest.exe"); // Path to the object we are referring to ...