Solved

Exe TO DLL

Posted on 1999-01-08
4
284 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 134
Host to IP 7 83
Add content to output file 4 71
Pressing cancel button with C# UI Automation 3 91
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

749 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