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. C / C++ / MFC
  4. How to unload dlls

How to unload dlls

Scheduled Pinned Locked Moved C / C++ / MFC
tutorial
5 Posts 4 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    HI I am getting an application path from file. and i have all the dll in the folder named component. for eg, C:\Program Files\Demo\Components and i am retreiving dll one by one and formed the new string for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; and i am passing it to ShellExecute but it does not work what should i do or which function should i use. Cheers

    S T 2 3 Replies Last reply
    0
    • A Anonymous

      HI I am getting an application path from file. and i have all the dll in the folder named component. for eg, C:\Program Files\Demo\Components and i am retreiving dll one by one and formed the new string for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; and i am passing it to ShellExecute but it does not work what should i do or which function should i use. Cheers

      S Offline
      S Offline
      stolid_rock
      wrote on last edited by
      #2

      To load and unload libraries use LoadLibrary and FreeLibrary functions.

      A 1 Reply Last reply
      0
      • S stolid_rock

        To load and unload libraries use LoadLibrary and FreeLibrary functions.

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        i want to unregister the dll freelibrary will just free the library after use. thanx for replying.if you have any other solution please reply cheers

        1 Reply Last reply
        0
        • A Anonymous

          HI I am getting an application path from file. and i have all the dll in the folder named component. for eg, C:\Program Files\Demo\Components and i am retreiving dll one by one and formed the new string for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; and i am passing it to ShellExecute but it does not work what should i do or which function should i use. Cheers

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          Anonymous wrote: str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; make is something like this CString str="regsvr32 /u " +"C:\\Program Files\\Demo\\Components\\demo.dll";

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta

          1 Reply Last reply
          0
          • A Anonymous

            HI I am getting an application path from file. and i have all the dll in the folder named component. for eg, C:\Program Files\Demo\Components and i am retreiving dll one by one and formed the new string for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; and i am passing it to ShellExecute but it does not work what should i do or which function should i use. Cheers

            2 Offline
            2 Offline
            224917
            wrote on last edited by
            #5

            Anonymous wrote: for eg. str="regsvr32 /u " +"C:\Program Files\Demo\Components\demo.dll"; There are few problems with the code. 1. You are trying to pass the parameter along with the exe name, which is not suggested. so make two strings like : string sFile(_T("regsvr32")); string sParam(_T("/u \"C:\\Program Files\\Demo\\Components\\demo.dll\"")); 2. Also note the dll path wrapped with double quote above. Now call ::ShellExecute(hWnd,_T("open"),sFile.c_str(),sParam.c_str(),0,SW_SHOW);


            suhredayan
            There is no spoon.

            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