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#
  4. WMPlayer Dll Import Question

WMPlayer Dll Import Question

Scheduled Pinned Locked Moved C#
csharpquestionvisual-studiotutorial
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.
  • S Offline
    S Offline
    sepAlmSep
    wrote on last edited by
    #1

    Hello, i am on a little player project in C# i like to give it away for some friends but without this wmp.dll i would just like to give the *.exe and refer to the already existing dll in system32 folder any idea maybe how to can do that? it works all fine if i import it over the visual studio references (right mouseclick, add..) but than it have to be next to the *.exe file when i wanna start the prog please give advise Regards, Sep

    S RaviBeeR 2 Replies Last reply
    0
    • S sepAlmSep

      Hello, i am on a little player project in C# i like to give it away for some friends but without this wmp.dll i would just like to give the *.exe and refer to the already existing dll in system32 folder any idea maybe how to can do that? it works all fine if i import it over the visual studio references (right mouseclick, add..) but than it have to be next to the *.exe file when i wanna start the prog please give advise Regards, Sep

      S Offline
      S Offline
      Saksida Bojan
      wrote on last edited by
      #2

      Under normal circumates the dll is loaded from System32 folder unless it is present in the same folder as exe. Since i do not know if this dll is managed or unmanaged or COM dll. You can attempt to register dll. http://social.msdn.microsoft.com/Forums/en-AU/netfx64bit/thread/813f13ec-0180-496a-8af0-b57dfd4e4de4[^] If it is managed dll, maybe you can consider putting it as GAC (Global Assembly Cache) Edit: If you have 64bit os, for 32 bit process put in SysWOW64, for 64 bit process put in system32

      S 1 Reply Last reply
      0
      • S Saksida Bojan

        Under normal circumates the dll is loaded from System32 folder unless it is present in the same folder as exe. Since i do not know if this dll is managed or unmanaged or COM dll. You can attempt to register dll. http://social.msdn.microsoft.com/Forums/en-AU/netfx64bit/thread/813f13ec-0180-496a-8af0-b57dfd4e4de4[^] If it is managed dll, maybe you can consider putting it as GAC (Global Assembly Cache) Edit: If you have 64bit os, for 32 bit process put in SysWOW64, for 64 bit process put in system32

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

        hm bit confusing its not my dll its COM i just saw its located in system32 folder but when i move my exe out of the project folder it wont start with out this dll, i was just trying to DllImport()... but i cant read the classes then so it wont let me compil.. btw how and where can i put it as GAC? regards

        L 1 Reply Last reply
        0
        • S sepAlmSep

          hm bit confusing its not my dll its COM i just saw its located in system32 folder but when i move my exe out of the project folder it wont start with out this dll, i was just trying to DllImport()... but i cant read the classes then so it wont let me compil.. btw how and where can i put it as GAC? regards

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          I don't know the entire answer, however this much I can tell you: 1. wmp.dll contains native code, hence it can't go into the GAC. Either it holds COM components (which I don't know much about), or it requires P/Invoke to call individual functions (which I have descibed to some length here[^]). And I do expect it to be COM. 2. If you use P/Invoke (which also means you don't "Add Reference"), the DLL is located in the good old way, in the exe's folder first, then through the system environment variable "PATH", which typically contains C:\Windows\system32\ and many others. The app will start even when the DLL isn't present, however every reference to it will obviously fail during app execution. 3. OTOH, if you have a hard reference to a DLL (as with "Add Reference"), then the DLL file (and its dependencies) must be present for the app to load successfully. 4. I'm pretty sure there are several CP articles that refer to wmp.dll, so you could go and have a look how they handle things. :)

          Luc Pattyn [My Articles] Nil Volentibus Arduum

          1 Reply Last reply
          0
          • S sepAlmSep

            Hello, i am on a little player project in C# i like to give it away for some friends but without this wmp.dll i would just like to give the *.exe and refer to the already existing dll in system32 folder any idea maybe how to can do that? it works all fine if i import it over the visual studio references (right mouseclick, add..) but than it have to be next to the *.exe file when i wanna start the prog please give advise Regards, Sep

            RaviBeeR Offline
            RaviBeeR Offline
            RaviBee
            wrote on last edited by
            #5

            This[^] SO post may help. /ravi

            My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com

            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