all groups > asp.net security > may 2007 >
You're in the

asp.net security

group:

how to add vc unmanaged dll to asp.net web site


how to add vc unmanaged dll to asp.net web site Volodia
5/30/2007 7:22:59 AM
asp.net security:
Hi,

I have a problem to find information how to add unmanaged dll
build in VC++ 2005 to the asp.net web site

What I have tried:
1. use DllImport("MyDll.dll") to declare function in mypage.aspx.cs
2. put MyDll.dll into Bin folder for ASP.Net web site

But unfortunately an exception has been thrown

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

Thank you,

Volodia.

Re: how to add vc unmanaged dll to asp.net web site bruce barker
5/30/2007 8:24:42 AM
your vc++ dll is probably dependent on another dll that is not also in
bin or system32 dir (vc++ runtime?)

-- bruce (sqlwork.com)

[quoted text, click to view]
Re: how to add vc unmanaged dll to asp.net web site Volodia
5/30/2007 12:57:20 PM
List of dependancies looks ok:
ADVAPI32.DLL
KERNEL32.DLL
NTDLL.DLL
RPCRT4.DLL

Thank you,
Volodia

[quoted text, click to view]

Re: how to add vc unmanaged dll to asp.net web site Volodia
6/1/2007 9:53:28 AM
I have done this by creating proxy managed dll:

1. creating managed dll
2. Creating inside managed dll class with code that reference
DllImport("MyDll.dll")
3. copy managed dll and unmanaged MyDll.dll into BIN folder
4. call in asp.net managed dll

Thanks,
Volodia.

[quoted text, click to view]

AddThis Social Bookmark Button