PDA

Click to See Complete Forum and Search --> : Get FilePath for DLL


pskyboy
Mar 3rd, 2002, 08:07 AM
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

parksie
Mar 3rd, 2002, 08:18 AM
For an .exe, you'd normally have a file association like: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...

CornedBee
Mar 4th, 2002, 08:49 AM
if you use WinMain, all parameters are in the szCmdLine argument (is the 3rd argument, not necessarily this name)