ProcedureDLL to work in exe files
ProcedureDLL to work in exe files
ProcedureDLL makes the procedure exported from the compiled file, but only if you compile a dll file. It would be nice if it worked with exe files as well.
I wish one of the programs I am currrently working on to run both as a separate executable or to be loaded as a dll and run 'in process'. This requires either a separate dll version of the program or the ability of the exe to export a function or two.milan1612 wrote:Why would one want to export a function in an executable? I don't see an actual use
of this, what am I overlooking?
I know which option I would prefer!

I always found this a somewhat strange omission from PB given that most linkers can export functions from an exe.
I may look like a mule, but I'm not a complete ass.
Okay, I see. How'd you access such an exported function? With the regular Library functions?srod wrote:I wish one of the programs I am currrently working on to run both as a separate executable or to be loaded as a dll and run 'in process'. This requires either a separate dll version of the program or the ability of the exe to export a function or two.milan1612 wrote:Why would one want to export a function in an executable? I don't see an actual use
of this, what am I overlooking?
I know which option I would prefer!
I always found this a somewhat strange omission from PB given that most linkers can export functions from an exe.
Windows 7 & PureBasic 4.4
-
- Enthusiast
- Posts: 665
- Joined: Fri Sep 12, 2003 10:40 pm
- Location: Tallahassee, Florida
Yes, you can load exe files as a DLL. If you have ever diassembled an EXE before, you can see that there are export functions associated with it.
Delphi apps can do this, as well as other compilers too.
Delphi apps can do this, as well as other compilers too.
Code: Select all
!.WHILE status != dwPassedOut
! Invoke AllocateDrink, dwBeerAmount
!MOV Mug, Beer
!Invoke Drink, Mug, dwBeerAmount
!.endw
It's possible!
Specify a linker option file with this content:
Greets, Alex
Specify a linker option file with this content:
Code: Select all
/ALLOWBIND