473,508 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DLL Loading Problem


Hi, everyone. I have a problem with loading a dll in my program using
LoadLibrary( LibaryName ). I'm only having that problem with a
particular dll and never had that problem before. All of my other dlls
are loadable and usable without problems. No significant changes have
been made since the last successful use of the dll in my exe. Here's
the general format of my dll and all my other dlls:

#include <windows.h>
#include <stdio.h>
#include <math.h>
#include <ctime>
#include <cstdlib>

/*
(global constants and some global variables here)
(function and class declarations here)
(global variables here)
*/

#ifdef __cplusplus
extern "C" {
#endif

__declspec(dllexport) void __cdecl SomeFunction1( /* arguments */ )
{
// bla bla bla
}

// the list continues...

BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}

#ifdef __cplusplus
}
#endif

To exclude the possibility that something was wrong in my main program
that caused the error, I've made a simple console program that just
loads the dll using LoadLibrary(), and as expected it returned NULL.
I've tried using GetLastError after the dll failed to load but it just
returned a 0. One of the possible causes that I can think of is my
recent installation of SP3 for WinXP on my PC. Any suggestions and/or
solutions are greatly appreciated.
Oct 22 '08 #1
3 1968
yx******@gmail.com wrote:
Hi, everyone. I have a problem with loading a dll in my program using
LoadLibrary( LibaryName ).
Try a windows group, this is an OS issue rather than a C++ one.
--
Ian Collins
Oct 22 '08 #2
yx******@gmail.com kirjutas:
>
Hi, everyone. I have a problem with loading a dll in my program using
LoadLibrary( LibaryName ). I'm only having that problem with a
particular dll and never had that problem before. All of my other dlls
So, what problem it was? Probably off-topic here anyway, but as long as you
have not told us, we can never know.

(OT remark: for finding out some loading problems with Windows dll-s you
can use Dependency Walker).

Paavo
Oct 22 '08 #3
On 10ÔÂ23ÈÕ, ÉÏÎç4ʱ59·Ö, Paavo Helde <nob...@ebi.eewrote:
yxywo...@gmail.com kirjutas:
Hi, everyone. I have a problem with loading a dll in my program using
LoadLibrary( LibaryName ). I'm only having that problem with a
particular dll and never had that problem before. All of my other dlls

So, what problem it was? Probably off-topic here anyway, but as long as you
have not told us, we can never know.

(OT remark: for finding out some loading problems with Windows dll-s you
can use Dependency Walker).

Paavo
try following command
/////////////////////
dumpbin /exports "your dll name"
/////////////////////
and check the "ordinal" and "name"
Oct 23 '08 #4

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

Similar topics

4
5187
by: Ram | last post by:
We are trying to load text tab delimited files into SQL server using informatica 5.1 version. The text files are FTPed to a local server and then files are moved to applicable folder before...
3
8478
by: Roy Wang | last post by:
hi, My problem is how to determining when the XML file has loaded using javascript. I loaded an xml file using javascript in a web page. The code below is loading the xml file for IE:...
4
3727
by: Adrian MacNair | last post by:
Hi, I created an image gallery which displays 63 images in a slideshow. The problem is that the show was slow because each image loaded one at a time during the show. No problem right? I just...
6
3111
by: Curious George | last post by:
I have a page that takes about 10 seconds to load the first time it is run. I would like to first display a little animated gif telling the user that the page is loading. How do I do this with...
4
6879
by: Matt Sawyer | last post by:
I am attempting to use an API (CxApiOem.dll) that has a large number of defines and complicated structs. It's just too much hassle to attempt to use DLLImport to make the desired API calls. ...
3
2599
by: Holmes | last post by:
Hello Ran into a bit of a problem here and have now exhausted my resources to getting this working What I am trying to do is load and show a simple vb form with a listbox in it Dim...
2
2819
by: nick.taylor | last post by:
Hi, I've been trying for weeks to figure out this problem. I'm developing a simple Javascript app that loads an XML file from a server, parses the contents, and displays them. But I am...
5
5113
by: Pete Marsh | last post by:
Wondering if anyone can recomend some sample code for dynamically loading the GD module. I have tried setting the extension dir in php.ini, and loading the GD module from there when apache is...
4
4370
Fary4u
by: Fary4u | last post by:
Hi i've found this problem for a long time but i thought i can live wd this but now it's giving me headack it's mostly happend when u got some problem on the network , after installation...
0
7223
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,...
0
7114
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...
0
7321
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,...
0
7377
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...
0
5623
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,...
0
4702
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...
0
1544
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 ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.