Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COMPILE A DLL

Status
Not open for further replies.

Bondjames

Technical User
Mar 25, 2021
24
0
0
IN
want to compile a dll file in start while compiling it shows icon not found if i ignore it and go ahead to compile it shows cannot build a dll without ole classes
am attaching the zip file of all the codes and project
please advice how to compile
also i want a network built dll so whether i should take a single thread com server or multi thread com server
please help regards
sgdllerror_oiccnu.png
 
What do you want to use the DLL for? If its purpose is to bundle classes, then build an APP. The only viable reason to build a DLL from a VFP project is when it has an OLEPUBLIC class aka COM server in it. And that's why you get this error. It's protecting you to do a useless thing.

As you haven't got any com server, there is no point in thinking about whether no COM server you have in your project should be in a single threaded or multithreaded DLL, you have nothing that could be used as a COM Server.

Chriss
 

Click to button "Help" in messagebox with text "Cannot build a DLL withouth OLE public class".

from VFP help:
The BUILD DLL command requires that OLE public classes be defined.
- You chose the wrong option from the Build Options dialog box. Choose another action, such as Build Application.
-No OLE public classes are defined. Define one or more OLE public classes. For more information, see the Class Info dialog box or the OLEPUBLIC clause of the DEFINE CLASS command.


mJindrova
 
Let's ask another question: For what do you want to use this DLL? What's your goal with this project?

Chriss
 
sir have an exe which works only if the machine code is in this application else it shuts down i have original sg.dll but problem is to make my own sg.dll i added my machine code and now i have to compile it . for everyones infor i decompiled with refox and got this decompiled in sgmake directory and made the changes in PROG-- regv20.prg by adding the machine number now again coming out of this sub directory ran the 2 prg files and now need to recompile
please help
regards
 
 https://files.engineering.com/getfile.aspx?folder=ad1cad5e-5a22-49dd-91b0-b05549089b26&file=sgmake.zip
Well, if you got this from decompilation and there is no olepublic class in the project sources, that project is incomplete and does not compile to a DLL and there's nothing to change this.



Chriss
 
You don't need to start that complex. The simplest ole public calss you may do is something like this:
Code:
define class comserver as session olepublic
enddefine

It defines a class that will have no code and custom properties, only what's part of the session base class.

As the decompilation has not created anything olepublic, adding something like that to a project to gain the ability to build a DLL won't make it a DLL that works the same way as the original sg.dll, though. So there is no point in doing that, as you don't even know what class name is expected to be available in a working DLL, not to speak of what it should offer as methods to be called and what they do.

You may ask, if only such olepublic classes can be compiled to a DLL, then why is there even a normal PRG inside the project, which Refox could decompile? Well, an ole public class can do a prg or any other "mornal" VFP code, so DLL projects are not limited to only contain ole public classes. But what is completely missing can't be added and adding any olepublic class won't make a new DLL work the same as the old one.

Chriss
 
Thank you Chris Miller, Mike Gagnon, mJindrova
regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top