-
Get FilePath for DLL
Hey Guys
Im still having big trouble trying to get the file path of the file that is double clicked which calls a function of my dll.
In theory it should be easy cos i have got rundll32 to pass the file name to the DLL i just need to know how to pick it up.
Or alternatively how does an exe pick up teh filename when it is initated through opening a file.
Peter
-
For an .exe, you'd normally have a file association like:
Code:
drive:\path\to\program\file.exe "%1"
which would then put the filename into argv[1] in your main function.
No idea about rundll32 though, it's a bit of a strange tool...
-
if you use WinMain, all parameters are in the szCmdLine argument (is the 3rd argument, not necessarily this name)