开发者

Difference between win32 dll and .net dll in the context of web application?

开发者 https://www.devze.com 2023-02-06 20:24 出处:网络
My web application, written in WPF( XBAP), p/invokes a win32 dll (player.dll written in C and C++). I deployed the application. When I tried running the web-application in IE, initially I got this err

My web application, written in WPF( XBAP), p/invokes a win32 dll (player.dll written in C and C++). I deployed the application. When I tried running the web-application in IE, initially I got this error:

System.DllNotFoundException: Unable to load DLL 'Player.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

But when I manually copied my win32 dll to C:\Windows\System32 of t开发者_如何学JAVAhe client PC, it worked, even though my web application uses several other .Net dlls and I didn't copy them manually.

So I'm confused as to why exactly do I need to copy only win32 dll to the client PC, while not .Net dlls? Do web-applications access them differently?

--

The related topic is this :

DllNotFoundException when web application p/invokes a win32 DLL


The rules to locate assemblies (.NET) are not the same as for locating native DLLs. Here are the two rule sets:

  • Assemblies: http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
  • Win32 DLLs: http://msdn.microsoft.com/en-us/library/ms682586(v=vs.85).aspx
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号