Posted: Thu Jul 28, 2005 3:35 am
I think this is as definitive an answer as you'll get. A "wrapper" is something that supposedly is a direct "wrap" of a command, as shown in the example but is subject to opinion as its not really a legal term.Rescator wrote:Though one indeed. Maybe the statement needs to be elaborated a bit more!
But the following should be no issue:
1. Making "wrapper" dll's that you use in your own program/game, even if it's made in another language!
2. Making "complex" dll's that you can release and any 3rd party can use.
3. Releasing the source code of a dll so others may compile it themselfs instead!
What is the difference between a wrapper and a complex/normal dll?
A dll where all functions are nothing more than:
That is a typical wrapper.Code: Select all
Procedure GetOSVersion() ProcedureReturn OSVersion() EndProcedure
A normal/complex dll would be:
To put it another way.Code: Select all
Procedure GetOSVersion() ;lots of code here ;and here ;and here ;and here ;and here ;and here ;and here ;and so on for several lines ;You may even use OSVersion() ;as long as you actualy code something ;and not just "wrap" PB features. ProcedureReturn result EndProcedure
If someone really need to use OSVersion()
they should buy PureBasic and make the dll themselfs instead.
PureBasic is so cheap that I don't see that a issue at all.
To put it in yet another way (perhaps the simplest explanation I can think of):
If over half of the code in a dll is simply wrappers or direct reuse of
PureBasic functions, then do not release that dll to 3rd parties.
If like the majority of the code in a dll is your own code,
there should be no issues.
Note! This is just my own view on this though. Fred's words is the only official word on this!
But really, just as long as there is reasonable amount of code alongside the GetOSVersion you will be fine.
(For example I made a networking library for DarkBasic pro before i realized it was crap. It was not a direct wrapper, and there was quite a bit of code that went into it to enable packet reconstruction and such so it was not a wrapper.)