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. General Programming
  3. COM
  4. How to get the path

How to get the path

Scheduled Pinned Locked Moved COM
question
6 Posts 2 Posters 20 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.
  • S Offline
    S Offline
    sarfaraznawaz
    wrote on last edited by
    #1

    hello all, i have to know how can i use the path of file or folder which has been selected from context menu in an exe or application code ... see i have written the code for context menu and am storing the file or folder path in an cstring how can i use this cstring variable in exe code .. Best Regards Sarfaraz.. :((

    L 1 Reply Last reply
    0
    • S sarfaraznawaz

      hello all, i have to know how can i use the path of file or folder which has been selected from context menu in an exe or application code ... see i have written the code for context menu and am storing the file or folder path in an cstring how can i use this cstring variable in exe code .. Best Regards Sarfaraz.. :((

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      sarfaraznawaz wrote:

      how can i use this cstring variable in exe code

      The same way that you would use any value. Please explain what you are trying to do with the contents.

      Use the best guess

      S 1 Reply Last reply
      0
      • L Lost User

        sarfaraznawaz wrote:

        how can i use this cstring variable in exe code

        The same way that you would use any value. Please explain what you are trying to do with the contents.

        Use the best guess

        S Offline
        S Offline
        sarfaraznawaz
        wrote on last edited by
        #3

        see i have created the com dll for shell context menu .. if (DragQueryFile((HDROP)medium.lpszFileName, i, path, MAX_PATH)) { g_szSelectedFiles.SetAt(i, path); szFileName = g_szSelectedFiles[i]; } from here i am getting the path (szFileName )i want in exe code so that i can proceed this my doubt .. the variable is decalred as static in header file of the dll .i link the library of dll .the scope is not remaining ..... Best Regards Sarfaraz

        L 1 Reply Last reply
        0
        • S sarfaraznawaz

          see i have created the com dll for shell context menu .. if (DragQueryFile((HDROP)medium.lpszFileName, i, path, MAX_PATH)) { g_szSelectedFiles.SetAt(i, path); szFileName = g_szSelectedFiles[i]; } from here i am getting the path (szFileName )i want in exe code so that i can proceed this my doubt .. the variable is decalred as static in header file of the dll .i link the library of dll .the scope is not remaining ..... Best Regards Sarfaraz

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          What do you mean by "i want in exe code"; I am afraid that makes little sense.

          Use the best guess

          S 1 Reply Last reply
          0
          • L Lost User

            What do you mean by "i want in exe code"; I am afraid that makes little sense.

            Use the best guess

            S Offline
            S Offline
            sarfaraznawaz
            wrote on last edited by
            #5

            the path(Szfilename)is useed in dll .Now this szfilename path i want use in the application code . i explain how i tried i linked the dll lib to an application code and then i included the header file of the dll in an application code so that i can use the path(szfilename). this szfilename is declared in static so its scope remain in application code also ..

            L 1 Reply Last reply
            0
            • S sarfaraznawaz

              the path(Szfilename)is useed in dll .Now this szfilename path i want use in the application code . i explain how i tried i linked the dll lib to an application code and then i included the header file of the dll in an application code so that i can use the path(szfilename). this szfilename is declared in static so its scope remain in application code also ..

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              Then you either need to export it from the dll or provide a function that will return it to the calling application.

              Use the best guess

              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