Here's an example of a 'wrapper' dll, that Fred DOES NOT want that you distribute it:
Code: Select all
ProcedureDLL PureBasic_MessageBox(Title$, Text$, Flags)
MessageRequester(Title$, Text$, Flags) ; <-- You see?
EndProcedureIn that above example I just made a procedure that calls a PureBasic procedure. THis means it is a wrapper and what can you do with a wrapper? 1) You can extend the abilities of a sloppy programming language. And because of this, Fred doesn't want that people make PB wrappers, or else, you would only download a free copy of let's say Game Maker just to use the PB commandset for FREE and not paying for it, where the PB Team made a lot of hardwork.
However, a workaround to avoid wrapper's is to use API:
Code: Select all
ProcedureDLL My_MessageBox(Title$, Text$, Flags)
MessageBox_(0, Text$, Title$, Flags) ; <-- See? API instead of PB commands = not a wrapper.
EndProcedureI think this is now cleared, but there is one thing left to explain:
You CAN use PureBasic commands in your dlls, but ONLY if you don't make a wrapper. Like, this is allowed to do:
Code: Select all
ProcedureDLL OpenWebpage()
In$=InputRequester("Open a Webpage.", "Enter an URL.", "http://")
RunProgram(In$)
EndProcedureCode: Select all
ProcedureDLL OpenWebpage()
In$=InputRequester("Open a Webpage.", "Enter an URL.", "http://")
ShellExecute_(0, "open", In$, "", "", #SW_SHOW)
EndProcedure
