Solved

Application not loading on 64 bit Win R2

Posted on 2011-09-09
6
232 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

730 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