Solved

Exe TO DLL

Posted on 1999-01-08
4
275 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
  • 3
4 Comments
 

Author Comment

by:braina
Comment Utility
Adjusted points to 50
0
 
LVL 11

Accepted Solution

by:
mikeblas earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

771 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

7 Experts available now in Live!

Get 1:1 Help Now