Solved

Exe TO DLL

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 69
ORA-01403: no data found 43 90
Process filename extension 3 172
wordappend challenge 8 149
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

920 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

17 Experts available now in Live!

Get 1:1 Help Now