About (Windows Shell)-Shortcuts
-
Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?
-
Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?
I gues you could actualy hook some functions pre-launch of the applecation to see what lanched it and notify the program. Hooking functions which may lanch the application. Other than that I dont think there are eny records the program may check. Hope I've been help. -Glich
-
Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?
It was recently mentioned on one of the blogs I read, this information is available somehow.... (I try to find...)
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist -
Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?
found it! http://catch22.net/tuts/tips2.asp[^] - and Ctrl-F for "Short"
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist -
found it! http://catch22.net/tuts/tips2.asp[^] - and Ctrl-F for "Short"
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighistGreat! Thats exactly what i needed. Thanks a lot. -- modified at 8:05 Friday 30th June, 2006
#define STARTF_TITLESHORTCUT 0x0C00 BOOL GetShortcutName(TCHAR *szLinkName, UINT nLinkNameSize) { STARTUPINFO si = { sizeof(si) }; GetStartupInfo(&si); if(si.dwFlags & STARTF_TITLESHORTCUT) { lstrcpyn(szLinkName, si.lpTitle, nLinkNameSize); return TRUE; } return FALSE; }
The article is actually not complete. I had to find out the value ofSTARTF_TITLESHORTCUT
myself. It is not defined in the standard windows headers. -
Great! Thats exactly what i needed. Thanks a lot. -- modified at 8:05 Friday 30th June, 2006
#define STARTF_TITLESHORTCUT 0x0C00 BOOL GetShortcutName(TCHAR *szLinkName, UINT nLinkNameSize) { STARTUPINFO si = { sizeof(si) }; GetStartupInfo(&si); if(si.dwFlags & STARTF_TITLESHORTCUT) { lstrcpyn(szLinkName, si.lpTitle, nLinkNameSize); return TRUE; } return FALSE; }
The article is actually not complete. I had to find out the value ofSTARTF_TITLESHORTCUT
myself. It is not defined in the standard windows headers.As I udnerstood him, it's not even in the latest PSDK, and it is just his own naming (though, I'm not sure if he mentioned the actual value)
Some of us walk the memory lane, others plummet into a rabbit hole
Tree in C# || Fold With Us! || sighist