473,785 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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("MyDl l.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
6 8653
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("MyDl l.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
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******** ******@TK2MSFTN GP03.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("MyDl l.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
I have done this by creating proxy managed dll:

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

Thanks,
Volodia.

"Volodia" <GR********@hot mail.comwrote in message
news:O6******** ******@TK2MSFTN GP02.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("MyDl l.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
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("MyDl l.dll")]
private static extern int getprivatekey(S tringBuilder bufUserName,
[MarshalAs(Unman agedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(stri ng sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hot mail.comwrote in message
news:O6******** ******@TK2MSFTN GP02.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("MyDl l.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


"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("MyDl l.dll")]
private static extern int getprivatekey(S tringBuilder bufUserName,
[MarshalAs(Unman agedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(stri ng sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hot mail.comwrote in message
news:O6******** ******@TK2MSFTN GP02.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("MyDl l.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
"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("MyDl l.dll")]
private static extern int getprivatekey(S tringBuilder bufUserName,
[MarshalAs(Unman agedType.LPStr)] StringBuilder bufUserKey);
3. Add new function in my class
public static string GetUserKey(stri ng sUserName)
4. place both managed dll and unmanaged MyDll.dll into BIN folder
5. call in asp.net managed dll

Thanks,
Volodia.

"Volodia" <GR********@hot mail.comwrote in message
news:O6******** ******@TK2MSFTN GP02.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("MyDl l.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2957
by: Adam McKee | last post by:
We are using Visual Studio.NET 2003 in our project with .NET framework 1.1. One of our libraries is a mixed-mode dll assembly consisting of one managed C++ library, and several unmanaged C++ libraries. We are using managed C++ as a bridge between managed .NET code and unmanaged C++ code, which I'm sure is a fairly common practice. The managed C++ library is compiled with /CLR whereas all other libraries are compiled without /CLR because...
2
1790
by: John Olbert | last post by:
Could you suggests one or more books for .NET 1.1 (Vs2003) on mixing in the same file and mixing on the same project both managed and unmanaged C++ with also means to access C# from unmanaged C++ Thanks much Please note I already have Richard Grimes book --Joh
3
1456
by: Alper Akcayoz | last post by:
Hello Esteemed Developers I face problems using some managed codes in unmanaged ones and vice versa. For exampla I frequently took the following error message. That is C2440: 'type cast' : cannot convert from 'sockaddr_in __gc*' to 'sockaddr* O C2664: 'WSAStartup' : cannot convert parameter 2 from 'WSADATA __gc*' to 'LPWSADATA I noticed that my problem is converting managed types/codes to unmanged types/codes. I found some web pages about...
4
3639
by: Troy | last post by:
Hi, I am working on a mixed native/managed project involving DirectShow and am trying to decide how the modules should be partitioned. I am trying to understand the true affect of #pragma unmanaged in a managed project. From my research it seems that, assuming there are no managed/native thunks involved, the code should perform as though it were compiled in a native Win32 project. However, as a simple test, I created a project that...
4
2446
by: devmentee | last post by:
I want to write a managed wrapper( kind of proxy) which will call into unmanaged C++ code. I've got a general idea and have read some articles on how to do it. But I cannot find any information on some specific things.. for example, I have unmanaged class class Foo { void SetData(std::map<std::string, std::stringsvalue); };
4
3033
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including memory management and connection pooling constructs) as static variables which were intended to scoped to the process. 2. Managed C++ assemblies (.NET 1.1) that wrap the unmanaged DLLs as nice neat classes with managed interfaces.
16
8788
by: pkoniusz | last post by:
Hello everybody, Been just thinking how actually one could convert the following unmanaged code to the managed C++: struct JustAnExample { char value1; int value2; // etc ....
0
1291
by: =?Utf-8?B?Y2hlbG9tYW4=?= | last post by:
Hello, I’m trying to use an unmanaged C dll from a ASP.NET 2.0 web application using p/Invoke platform (dllImport attribute). The asp.net page instances a c# library and this loads the C dll. I’ve used this dll from a windows application without problems. But if this dll is invoked from a Web site it always return this error: “Attempted to read or write protected memory. This is often an indication that other memory is corrupt”...
20
2311
by: =?Utf-8?B?VGhlTWFkSGF0dGVy?= | last post by:
Sorry to bring up a topic that is just flogging a dead horse.... but... On the topic of memory management.... I am doing some file parcing that has to be done as quick as posible, but what I have found hasnt been encouraging... I found that the *quickest* way is to use a struct to retrieve fixed length packets out of the file, but structs get placed on the stack! In one of the books I read, the stack is only about 1mb, so I would...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10096
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9956
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4055
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.