Linking an application to Windows DLLs

Hi,

I am new to .NET, I have developed my first application; it references the Windows Media Player dll.(C:\WINNT\system32\wmp.dll)

When building the application, an intermediary dll is produced. (Interop.WMPLib.dll).

The consequence is that at run time, the application needs to have access to this newly created dll, therefore it needs to be shipped along with this dll. I expected the application to directly reference the windows DLL (C:\WINNT\system32\wmp.dll).

This defeats the purpose of DLLs if each application needs to be shipped with its own custom DLLs.

Is this the way the .NET framework functions or is there a way of avoiding this intermediary DLL

Thank you for your answers,

Ben



Answer this question

Linking an application to Windows DLLs

  • .NetProgrammer

    AFAIK, the dll's are produced and its some form of "wrapper" for WMP.dll and is required. I could be wrong however but I've always had to ship the dll's with it otherwise it wouldn't work.

  • Tryin2Bgood

    That's what I was looking for, thanks !

  • bonus

    There are tools that can merge multiple assemblies into one so you could include the interop types in your executable. Google "illink" or "ilmerge".



  • Linking an application to Windows DLLs