?
Solved

Application not loading on 64 bit Win R2

Posted on 2011-09-09
6
Medium Priority
?
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
6 Comments
 
LVL 40

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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

764 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