473,799 Members | 3,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to load DLL - The file is there

I have a problem loading a DLL file that is exactly in the same
directory of the executable. The DLL is not in .NET format but can be
accessed through P/Invoke.

This never happened to me.

My Platform Invoke looks something like this:

[ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out int
plItems);

....
_EnumerateDevic es(...)
....

Mar 13 '06 #1
7 2644
What about it's dependencies, are they also there or in the path? What tool
was used to build the DLL and which version?

Willy.

"Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
|I have a problem loading a DLL file that is exactly in the same
| directory of the executable. The DLL is not in .NET format but can be
| accessed through P/Invoke.
|
| This never happened to me.
|
| My Platform Invoke looks something like this:
|
| [ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
| static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out int
| plItems);
|
| ...
| _EnumerateDevic es(...)
| ...
|
Mar 13 '06 #2
I used MS Visual Studio .NET 2003 and the source code compiled OK. The
code is based upon multiple DeviceIoControl calls and doesn't seem to
exist nothing excentric.

What DLL should I be missing? Note that I didn't install the Windows
DDK, I just found an header that allows the DLL to work in Windows XP
SP1 or later.

Dependency Walker says that MSJAVA.DLL is missing, but even with
MSJAVA.DLL in system32 folder says that "At least one module has an
unresolved import due to a missing export function in a delay-load
dependent module". And I guess the problem is with the MPR.DLL.

Any ideas?

Willy Denoyette [MVP] wrote:
What about it's dependencies, are they also there or in the path? What tool
was used to build the DLL and which version?

Willy.

"Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
|I have a problem loading a DLL file that is exactly in the same
| directory of the executable. The DLL is not in .NET format but can be
| accessed through P/Invoke.
|
| This never happened to me.
|
| My Platform Invoke looks something like this:
|
| [ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
| static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out int
| plItems);
|
| ...
| _EnumerateDevic es(...)
| ...
|


Mar 13 '06 #3
Can you download the WRAPI.dll from:
http://sysnet.ucsd.edu/pawn/wrapi/download.html

....and do a DLLImport like this...:
-----------------------------------
[ DllImport("WRAP I.dll", EntryPoint="WRA PIOpenNdisDevic e") ]
static extern int _OpenNdisDevice ([MarshalAs(Unman agedType.LPWStr )]
String pwDeviceName);
public static bool OpenNdisDevice( String deviceName)
{
return (_OpenNdisDevic e(deviceName) == 0);
}
-----------------------------------

....and tell me what are the DLL's missing in your computer?
Although I'm not using that version. I built using the MFC 7.1
dependencies and not the 4.2d.

Mar 13 '06 #4
If it compiles in C++ it should load correctly in C# wouldn't it be?

Mar 13 '06 #5
This program opens the \\\\.\\\\Ndisui o device, do you have the device
driver installed?

Willy.
"Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. .

|I used MS Visual Studio .NET 2003 and the source code compiled OK. The
| code is based upon multiple DeviceIoControl calls and doesn't seem to
| exist nothing excentric.
|
| What DLL should I be missing? Note that I didn't install the Windows
| DDK, I just found an header that allows the DLL to work in Windows XP
| SP1 or later.
|
| Dependency Walker says that MSJAVA.DLL is missing, but even with
| MSJAVA.DLL in system32 folder says that "At least one module has an
| unresolved import due to a missing export function in a delay-load
| dependent module". And I guess the problem is with the MPR.DLL.
|
| Any ideas?
|
| Willy Denoyette [MVP] wrote:
| > What about it's dependencies, are they also there or in the path? What
tool
| > was used to build the DLL and which version?
| >
| > Willy.
| >
| > "Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
| > news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
| > |I have a problem loading a DLL file that is exactly in the same
| > | directory of the executable. The DLL is not in .NET format but can be
| > | accessed through P/Invoke.
| > |
| > | This never happened to me.
| > |
| > | My Platform Invoke looks something like this:
| > |
| > | [ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
| > | static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out int
| > | plItems);
| > |
| > | ...
| > | _EnumerateDevic es(...)
| > | ...
| > |
|
Mar 13 '06 #6
Yes, I think I have. Tried with an wireless USB adapter and a wireless
linksys card and the error is the same, even with the WrapiTest.cpp.

Iniside the DLL, even before it begins main() of WrapiTest.cpp, it
gives the error "IOCTL_NDISUIO_ BIND_WAIT failed 32". The error 32 is in
hexadecimal... it's 50 and corresponds to the GetLastError that is
ERROR_NOT_SUPPO RTED.

Any ideas, again?

Willy Denoyette [MVP] wrote:
This program opens the \\\\.\\\\Ndisui o device, do you have the device
driver installed?

Willy.
"Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
news:11******** **************@ v46g2000cwv.goo glegroups.com.. .

|I used MS Visual Studio .NET 2003 and the source code compiled OK. The
| code is based upon multiple DeviceIoControl calls and doesn't seem to
| exist nothing excentric.
|
| What DLL should I be missing? Note that I didn't install the Windows
| DDK, I just found an header that allows the DLL to work in Windows XP
| SP1 or later.
|
| Dependency Walker says that MSJAVA.DLL is missing, but even with
| MSJAVA.DLL in system32 folder says that "At least one module has an
| unresolved import due to a missing export function in a delay-load
| dependent module". And I guess the problem is with the MPR.DLL.
|
| Any ideas?
|
| Willy Denoyette [MVP] wrote:
| > What about it's dependencies, are they also there or in the path? What
tool
| > was used to build the DLL and which version?
| >
| > Willy.
| >
| > "Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
| > news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
| > |I have a problem loading a DLL file that is exactly in the same
| > | directory of the executable. The DLL is not in .NET format but can be
| > | accessed through P/Invoke.
| > |
| > | This never happened to me.
| > |
| > | My Platform Invoke looks something like this:
| > |
| > | [ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
| > | static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out int
| > | plItems);
| > |
| > | ...
| > | _EnumerateDevic es(...)
| > | ...
| > |
|


Mar 14 '06 #7
This error is returned from the DeviceIoControl call in InitInstance, what
makes me think you don't have the right device driver installed or this code
was written for another device.
Willy.
"Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.com...
| Yes, I think I have. Tried with an wireless USB adapter and a wireless
| linksys card and the error is the same, even with the WrapiTest.cpp.
|
| Iniside the DLL, even before it begins main() of WrapiTest.cpp, it
| gives the error "IOCTL_NDISUIO_ BIND_WAIT failed 32". The error 32 is in
| hexadecimal... it's 50 and corresponds to the GetLastError that is
| ERROR_NOT_SUPPO RTED.
|
| Any ideas, again?
|
| Willy Denoyette [MVP] wrote:
| > This program opens the \\\\.\\\\Ndisui o device, do you have the device
| > driver installed?
| >
| > Willy.
| > "Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
| > news:11******** **************@ v46g2000cwv.goo glegroups.com.. .
| >
| > |I used MS Visual Studio .NET 2003 and the source code compiled OK. The
| > | code is based upon multiple DeviceIoControl calls and doesn't seem to
| > | exist nothing excentric.
| > |
| > | What DLL should I be missing? Note that I didn't install the Windows
| > | DDK, I just found an header that allows the DLL to work in Windows XP
| > | SP1 or later.
| > |
| > | Dependency Walker says that MSJAVA.DLL is missing, but even with
| > | MSJAVA.DLL in system32 folder says that "At least one module has an
| > | unresolved import due to a missing export function in a delay-load
| > | dependent module". And I guess the problem is with the MPR.DLL.
| > |
| > | Any ideas?
| > |
| > | Willy Denoyette [MVP] wrote:
| > | > What about it's dependencies, are they also there or in the path?
What
| > tool
| > | > was used to build the DLL and which version?
| > | >
| > | > Willy.
| > | >
| > | > "Nuno Magalhaes" <nu************ @hotmail.com> wrote in message
| > | > news:11******** **************@ p10g2000cwp.goo glegroups.com.. .
| > | > |I have a problem loading a DLL file that is exactly in the same
| > | > | directory of the executable. The DLL is not in .NET format but can
be
| > | > | accessed through P/Invoke.
| > | > |
| > | > | This never happened to me.
| > | > |
| > | > | My Platform Invoke looks something like this:
| > | > |
| > | > | [ DllImport("WRAP I.dll", EntryPoint="WRA PIEnumerateDevi ces") ]
| > | > | static extern int _EnumerateDevic es(out IntPtr ppDeviceList, out
int
| > | > | plItems);
| > | > |
| > | > | ...
| > | > | _EnumerateDevic es(...)
| > | > | ...
| > | > |
| > |
|
Mar 15 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
13291
by: Nancy | last post by:
Hi, When I start my PC(winXP Pro), it always says: Unknown(): Unable toload dynamic library './php_msql.dll' - The specified module could not be found. Then my Apache servre starts, load php module and works well. I copied php_msql.dll to my system32 directory. Who knows what's wrong? Thanks a lot?
8
3775
by: Jonathan Polley | last post by:
I have one account on a WindowsXP machine that refuses to run IDLE (or any other python script that uses Tk). Other people can login to that PC and IDLE runs just fine, so it is not an installation issue. When the person who has the problem logs into another PC the problem follows them. Any ideas as to what might me wrong? This is the traceback from IDLE: C:\Python20\Tools\idle>..\..\python.exe idle.py Traceback (most recent call...
2
6409
by: Carlos G Benevides | last post by:
I have a ASP.Net web application that has two assemblies that run under com+. Under Windows 2000 the two assemblies are added to com+ automatically when instantiated from the web site. For this to happen we had to change the context in which asp.net runs from machine to SYSTEM by modifying the machine.config file. Under Windows 2003 no matter how asp.net is set to run as either machine or system. I get the following error: ...
7
18268
by: ccp999 | last post by:
I keep getting this: "PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - The specified module could not be found." when I tried to load the php_mysql.dll module when starting my Apache 2.0 in windows XP. The file, php_mysql.dll is there. why? Do I have to load this file before I can use "mysql_connect()"?
0
2177
by: Steve Richter | last post by:
I am trying, really trying to use the DB2Connection class provided by IBM to connect to a database on my old reliable as400 from the asp.net web page. When I run the DB2Connection code in my .aspx file I get an error: Unable to load DLL 'db2app.dll'. Exception Details: System.DllNotFoundException: Unable to load DLL 'db2app.dll'. with the help of this list I am using the @assembly directive to
22
3306
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to load DLL (aspnet_isapi.dll)." Of course the dll is able to be found, it's still in the framework directory and for grins I even put it in my service's local directory. This is apparantly server 2003 not allowing asp.net to be run if IIS was not...
1
5109
by: Dan | last post by:
Environment: Win2k Server, ASP.NET(v1.1.4322) Everything seemed to work fine till this morning...and than this happened What could this possibly mean? Is it the file? (The file in the error is not missing nor is it misspelled or on a different path) Is it permissions? (ASP.NET account is given full access to E:\DNN dir)
0
4067
by: wildman | last post by:
Trying to read XML files from SSIS and load into SQL Server. I tested this before and it was working before I placed in a forevery contrainer. also, my simple xml file had to be retyped cause I deleted by accident.. Getting this error: The component "XML Source" (108) was unable to read the XML data.
3
5550
by: =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post by:
Hello. We are having a problem here trying to compile C# applications. Only one developer has a problem where they attempt to compile the application and the compiler complains about being out of memory and unable to find a dll - webengine.dll. They have tried rebooting, gettling latest, and a few other things. We can not determine what is at the heart of this problem. They have Visual Studio.Net 2005 with .Net Framework 2.0 SP1. The...
9
4596
by: Christopher Koeber | last post by:
Hello, I am attempting to perform a PHP installation on an Apache 2.2.6 web server instance that is loaded on a Windows 2003 server operating system (R2 SP2). I have a third party application that will reside within the Apache instance that requires PHP 5.2.6 loaded with MySql support. The installation of PHP succedded without incident (it was done manually) and I can run phpinfo() to get information about the installation. However,...
0
9546
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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
10260
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...
0
10030
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
9078
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 project—planning, coding, testing, and deployment—without 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
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
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
4146
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
3762
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.