| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
[Win32API] shortcuts (.lnk)
working with the Win32API
I am trying to implement a function in my program that will take the full filename and path of a shortcut (.lnk) file and returns an std::string that is the path+filename+arguments of the program to run, and also a STARTUPINFO structure that can be passed to CreateProcess along with the string. Anyways, it requires shobjidl.h and shobjidl.idl, neither of which come with Dev-C++ 4.9.9.2. If I had these files, or if I had MSVC++, I could use MSDN's example and be on my way. But I don't have either of those. Is there any way to resolve (run the program) from a shortcut with Dev-C++? EDIT: I suppose I can resort to a system() call if I have to but I really don't want to. Will that even work on pre-NT systems (maybe with 8.3 names)? |
|
#2
|
|||
|
|||
|
nevermind, discovered ShellExecute
|
|
#3
|
|||
|
|||
|
ok, un-nevermind. ShellExecute/ShellExecuteEx apparently doesn't check whether the application is supposed to run minimized, maximized, or normal. Or perhaps they would, but the problem is that I have to pass the window state as a parameter to the function. So is there any way I can find out, having only c:\shortcut.lnk, whether the program shortcut.lnk runs is supposed to run with SW_SHOWMINIMIZED, etc. I remind you that I do not have access to IShellLink or IPersistFile. If I did, I would use it, so if you know how I can find that interface in Dev-C++, I would appareciate that too.
|
|
#4
|
|||
|
|||
|
got it. new update of dev-c++ brought me the interfaces
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > [Win32API] shortcuts (.lnk) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|