Solved

Exe TO DLL

Posted on 1999-01-08
4
286 Views
Last Modified: 2013-11-20
I have a simple SDI exe application with print, print preview, save, open file and many more options.  I can run this exe and it works fine.  Now i want to convert this exe into a DLL. I tried to convert it but it gives me DLL registration problem.  I will really appriciate if someone can show me steps to do that.
I even changed my .def file to include DLL registration and unregistration functions.

Thanks
Bal
0
Comment
Question by:braina
[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
  • 3
4 Comments
 

Author Comment

by:braina
ID: 1327402
Adjusted points to 50
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
ID: 1327403
You can't convert an EXE to a DLL outright.  You have to rewrite at least a part of the source.

An EXE loads and runs. It interacts with the user, and is completly capable of standing alone.

A DLL is a library; it must be loaded by some other program. As such, it can't expect to live by itself and must behave a very speicifc way in order to run in the context of the full program that's calling it.

There's no "steps" to do a plain "conversion". You need rethink the architecture of your program and decide how it will fit in the constraints of a DLL. Then, you'll need to rewrite your code so it works correctly in a DLL and exposes a usable interface to the program(s) which will be calling it.

B ekiM

0
 

Author Comment

by:braina
ID: 1327404
Yes!! I knew what u said and thanks for ur nice comparision between the two.  The problem with me is the i made an SDI exe application with print, print preview options from CView class.  I then wanted to make an DLL with same functionality and this DLL will be called by my client.  To achieve this, I used ATL applet wizard project option and used DLL links and MFC connections.  Doing this applet wizard gave me frame work for a DLL with DLL registration and unregistration functions.  I copied CView class and functions from SDI exe application in my DLL and wanted to use the print engine functions provided by MFC. My client should ask for print and print preview requests for a particular document and my DLL should provide that functionality. If there is another way in which i can make a DLL having print preview and print options of CView class...please let me know...i know there is a way to do that....but am a Newbie to this....Explaination in steps will be appriciated.

0
 

Author Comment

by:braina
ID: 1327405
Yes!! I knew what u said and thanks for ur nice comparision between the two.  The problem with me is the i made an SDI exe application with print, print preview options from CView class.  I then wanted to make an DLL with same functionality and this DLL will be called by my client.  To achieve this, I used ATL applet wizard project option and used DLL links and MFC connections.  Doing this applet wizard gave me frame work for a DLL with DLL registration and unregistration functions.  I copied CView class and functions from SDI exe application in my DLL and wanted to use the print engine functions provided by MFC. My client should ask for print and print preview requests for a particular document and my DLL should provide that functionality. If there is another way in which i can make a DLL having print preview and print options of CView class...please let me know...i know there is a way to do that....but am a Newbie to this....Explaination in steps will be appriciated.

0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Whole sheet autoscrub still needed 19 55
Expand to include initial dialog with two choices. 9 94
Complete beginner needs help making a cron job 9 134
Sed question 2 139
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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