By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,684 Members | 1,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,684 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
May 30 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
your vc++ dll is probably dependent on another dll that is not also in
bin or system32 dir (vc++ runtime?)

-- bruce (sqlwork.com)

Volodia wrote:
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.

May 30 '07 #2

P: n/a
List of dependancies looks ok:
ADVAPI32.DLL
KERNEL32.DLL
NTDLL.DLL
RPCRT4.DLL

Thank you,
Volodia

"bruce barker" <no****@nospam.comwrote in message
news:OT**************@TK2MSFTNGP03.phx.gbl...
your vc++ dll is probably dependent on another dll that is not also in bin
or system32 dir (vc++ runtime?)

-- bruce (sqlwork.com)

Volodia wrote:
>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.

May 30 '07 #3

P: n/a
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.

"Volodia" <GR********@hotmail.comwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
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.

Jun 1 '07 #4

P: n/a
I have done this by creating proxy managed dll
Below steps I have used:

1. Start new Class Library project
2. Add unmanaged dll exported function description
[DllImport("MyDll.dll")]
private static extern int getprivatekey(StringBuilder bufUserName,
[MarshalAs(UnmanagedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(string sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hotmail.comwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
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.

Jun 6 '07 #5

P: n/a


"Volodia" wrote:
I have done this by creating proxy managed dll
Below steps I have used:

1. Start new Class Library project
2. Add unmanaged dll exported function description
[DllImport("MyDll.dll")]
private static extern int getprivatekey(StringBuilder bufUserName,
[MarshalAs(UnmanagedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(string sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hotmail.comwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
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.


Jun 20 '07 #6

P: n/a
"postea" wrote:

I have a similar problem and see all over that for years many people have
such a problem, but I cannot find anyone who explains how to solve it, so i
hope someone can help me.

I get the exception message:
Unable to load DLL 'shapelib.dll': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)

This is one of two external third-party non-ASP.NET DLLs I reference in my
ASP.NET 2.0 application. This application works fine when installed on a
webserver sunning a personal operating system Windows XP 2005. However, if I
install the application on a webserver with Webserver 2003 operating system
it gives me this "Exception from HRESULT: 0x8007007E)" error. I know exactly
that it is these 2 external DLLs it can't find. However, they are
automatically installed in the bin directory when I publish the web
application (I don't have to copy them manually or anything - Visual Studio
knows they are needed and copies them), which is the same directory as my
ASP.NET 2.0 dlls that reference these 2 DLLs, but it can't find them on
Webserver 2003 OS, but works fine on XP.

Please can someone tell me what I have to do on a webserver with WebServer
2003 OS to make it work>

Thanks
>

"Volodia" wrote:
I have done this by creating proxy managed dll
Below steps I have used:

1. Start new Class Library project
2. Add unmanaged dll exported function description
[DllImport("MyDll.dll")]
private static extern int getprivatekey(StringBuilder bufUserName,
[MarshalAs(UnmanagedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(string sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hotmail.comwrote in message
news:O6**************@TK2MSFTNGP02.phx.gbl...
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.
>
Jun 20 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.