Solved

Application not loading on 64 bit Win R2

Posted on 2011-09-09
6
222 Views
Last Modified: 2012-05-12
Hello,
I need to fix an application which runs fine on all 32 bit windows systems. When I run the same application on Windows 2008 R2, it hangs. When I debugged, I found that it stops during the construction of an object, and this happens after the exit of the constructor and before the return of the object pointer by the new() statement. Within the constructor, I am loading a DLL file using loadlibrary method and retrieving the pointers to its functions using getprocadd. The application is in C++. Can experts suggest me how to go about identifying the cause? Any ideas on the possible causes will be appreciated.
0
Comment
Question by:sukhoi35
  • 4
6 Comments
 
LVL 39

Expert Comment

by:Kyle Abrahams
ID: 36513284
Is the dll 64 bit compatible?  Can you update to a 64 bit compatible version of the dll?
0
 
LVL 5

Expert Comment

by:Eduardo Goicovich
ID: 36513297
You can use Process Monitor (sysinternals.com) to monitor and test the program
Is there any error code from the loadlibrary call?
0
 

Author Comment

by:sukhoi35
ID: 36518942
There actually is no error code returned by the loadlibrary call. I tried modifying the load flags from 0 to LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE. This worked, but I could observe that the application was dysfunctional in few other areas.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:sukhoi35
ID: 36518950
I mean, the application became dysfunctional in few other areas after introducing this flag. Otherwise, with a flag value of 0, the application works normally except when the piece of code to load this DLL is invoked. The DLL I am loading is a 64-bit DLL.
0
 

Accepted Solution

by:
sukhoi35 earned 0 total points
ID: 36593338
I could solve this issue by loading the library in the constructor of the Containing class instead of in the constructor of the new object being defined. Technically, I am not really sure how this made a difference.
0
 

Author Closing Comment

by:sukhoi35
ID: 36813438
Practically, this worked
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now