Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Exe TO DLL

Posted on 1999-01-08
4
Medium Priority
?
297 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 150 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

705 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