Solved

Application not loading on 64 bit Win R2

Posted on 2011-09-09
6
226 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 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 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

20 Experts available now in Live!

Get 1:1 Help Now