Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. About (Windows Shell)-Shortcuts

About (Windows Shell)-Shortcuts

Scheduled Pinned Locked Moved IT & Infrastructure
linuxquestion
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    W Kleinschmit
    wrote on last edited by
    #1

    Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?

    G P 3 Replies Last reply
    0
    • W W Kleinschmit

      Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?

      G Offline
      G Offline
      Glich
      wrote on last edited by
      #2

      I gues you could actualy hook some functions pre-launch of the applecation to see what lanched it and notify the program. Hooking functions which may lanch the application. Other than that I dont think there are eny records the program may check. Hope I've been help. -Glich

      1 Reply Last reply
      0
      • W W Kleinschmit

        Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?

        P Offline
        P Offline
        peterchen
        wrote on last edited by
        #3

        It was recently mentioned on one of the blogs I read, this information is available somehow.... (I try to find...)


        Some of us walk the memory lane, others plummet into a rabbit hole
        Tree in C# || Fold With Us! || sighist

        1 Reply Last reply
        0
        • W W Kleinschmit

          Is there any way for a program to detect if it was lauched by a shortcut and, if yes, by which?

          P Offline
          P Offline
          peterchen
          wrote on last edited by
          #4

          found it! http://catch22.net/tuts/tips2.asp[^] - and Ctrl-F for "Short"


          Some of us walk the memory lane, others plummet into a rabbit hole
          Tree in C# || Fold With Us! || sighist

          W 1 Reply Last reply
          0
          • P peterchen

            found it! http://catch22.net/tuts/tips2.asp[^] - and Ctrl-F for "Short"


            Some of us walk the memory lane, others plummet into a rabbit hole
            Tree in C# || Fold With Us! || sighist

            W Offline
            W Offline
            W Kleinschmit
            wrote on last edited by
            #5

            Great! Thats exactly what i needed. Thanks a lot. -- modified at 8:05 Friday 30th June, 2006#define STARTF_TITLESHORTCUT 0x0C00 BOOL GetShortcutName(TCHAR *szLinkName, UINT nLinkNameSize) { STARTUPINFO si = { sizeof(si) }; GetStartupInfo(&si); if(si.dwFlags & STARTF_TITLESHORTCUT) { lstrcpyn(szLinkName, si.lpTitle, nLinkNameSize); return TRUE; } return FALSE; }
            The article is actually not complete. I had to find out the value of STARTF_TITLESHORTCUT myself. It is not defined in the standard windows headers.

            P 1 Reply Last reply
            0
            • W W Kleinschmit

              Great! Thats exactly what i needed. Thanks a lot. -- modified at 8:05 Friday 30th June, 2006#define STARTF_TITLESHORTCUT 0x0C00 BOOL GetShortcutName(TCHAR *szLinkName, UINT nLinkNameSize) { STARTUPINFO si = { sizeof(si) }; GetStartupInfo(&si); if(si.dwFlags & STARTF_TITLESHORTCUT) { lstrcpyn(szLinkName, si.lpTitle, nLinkNameSize); return TRUE; } return FALSE; }
              The article is actually not complete. I had to find out the value of STARTF_TITLESHORTCUT myself. It is not defined in the standard windows headers.

              P Offline
              P Offline
              peterchen
              wrote on last edited by
              #6

              As I udnerstood him, it's not even in the latest PSDK, and it is just his own naming (though, I'm not sure if he mentioned the actual value)


              Some of us walk the memory lane, others plummet into a rabbit hole
              Tree in C# || Fold With Us! || sighist

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups