Results 1 to 3 of 3

Thread: Get FilePath for DLL

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    England
    Posts
    94

    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
    "Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
    -- Judas Priest

    My email is [email protected]

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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...
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    if you use WinMain, all parameters are in the szCmdLine argument (is the 3rd argument, not necessarily this name)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width