Google Answers Logo
View Question
 
Q: Converting EXE to DLL ( No Answer,   1 Comment )
Question  
Subject: Converting EXE to DLL
Category: Computers > Programming
Asked by: truthsetsfree-ga
List Price: $15.00
Posted: 02 Dec 2005 15:46 PST
Expires: 21 Dec 2005 11:58 PST
Question ID: 600709
I want to convert a VC++ 6.0 dialog based project to win32 dll to call
some calculation logic functions that are not dependent upon UI from
Java. There are couple of options: -
1. Isolate the code and create a new win32 dll project in Visual c++. 
2. Convert the whole exe project into dll without the hassle of
isolating the code from the rest of the project and use that dll.

What is the best way to do the conversion and how to do it.

Clarification of Question by truthsetsfree-ga on 02 Dec 2005 15:47 PST
I think I know how to do option 1. I am more looking for info on Option 2.

Clarification of Question by truthsetsfree-ga on 02 Dec 2005 16:12 PST
I would also like to how I can create a relocatable exe in VC++ 6.0
Answer  
There is no answer at this time.

Comments  
Subject: Re: Converting EXE to DLL
From: mathtalk-ga on 04 Dec 2005 14:27 PST
 
It's often the case that in a stand-alone EXE, the user-interface
changes input parameters in an interactive way.  Without doing the
analysis, how can one be certain, if this is the case here, that some
parameters are exposed both to the user-interface and to the
computational routines as "globals"?

Of course if you think it likely that was not so much the case, then
one can proceed to throw all of the old code into a new DLL project,
label the desired routines as callable entry points, and see how it
works.  Possibly one could identify and fix incrementally problems
like the above, e.g. by creating new entry points that set the values
of global variables or by writing startup code for the DLL that
assigns default values appropriately.

For multi-threaded applications such an approach is apt to prove
unsatisfactory.  While separate threads have essentially their own
stacks, so that local variables and calling parameters are segregated
by thread, any global variables in the code are at risk of being
shared indiscriminantly (unless these are all read only for the
purpose of the computations needed).

best wishes, mathtalk-ga

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy