Announcement

Collapse
No announcement yet.

target path from LNK file - one that works?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • target path from LNK file - one that works?

    I've tried out a few of the samples as to doing this, but none will compile cleanly. I'm sure my WIN32API.INC is up to date (' Last Update: 21 February 2005). but all the samples seem to include WIN32API and then have their own declaration for some of the API's. The compiler bitches about the duplicate definitions so I comment out the ones in the sample, but then get into mis-matched parameters.

    ?? How can you include the INC file, still have your own DECLAREs and not get compiler duplicate definition errors?

    The whole API are for this is pretty weird looking so I'm floundering badly.

    All I want to do is translate a kjhkjhkjh.LNK name to its true full target path.

    Anyone have a nice simple example which actually compiles and runs? I'm running PBWin 8.00.

    George

  • #2
    How can you include the INC file, still have your own DECLAREs and not get compiler duplicate definition errors?
    Don't even bother trying to find a way, because you cannot have two different DECLAREs for the same symbol (function) name , period.

    You have two ways to get the necessary DECLAREs into your program:

    1. #INCLUDE a file containing the DECLARE statement
    2. Type in your own DECLARE.

    100 percent your choice of how to do it.

    Somewhere here there is a nice sample of resolving a LNK file, I know this because I have used it. Exactly where it is I am not sure but I know it is here. try searching on "link" and/ir "shortcut" if your search on "LNK" comes up empty.

    Or... if you are having problems making some specific piece of code work, post that code and describe your problem.

    BUT...
    Since you are running 8x, you can have multiple symbols (function names) sharing an alias....

    So if the function giving you problems is "FOO", just DELCARE and call "MY_FOO" instead.

    MCM
    Last edited by Michael Mattias; 4 Feb 2008, 03:03 PM.
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      George,

      This should do ... Shortcut creation and query

      Comment


      • #4
        Thanks Pierre, I got it working this time. I'd tried it and God knows I must have messed it up in paring it down to the pieces I wanted. I think my frustration with some of the others not even compiling correctly threw my thinking out. Probably too many windows and cut/pastes going on for my old mind to keep straight. Started over and all is now well.

        George

        Comment


        • #5
          I posted code for link resolving in my drag & drop files demo:

          kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

          Comment

          Working...
          X