About DLL and other programming langage.

Everything else that doesn't fall into one of the other PB categories.
freddix
Enthusiast
Enthusiast
Posts: 100
Joined: Sun Feb 08, 2004 7:22 pm
Location: South France
Contact:

About DLL and other programming langage.

Post by freddix »

Hello.

I know thet it is not allowed to create Wrapper DLL with purebasic for other programming langage.
so, if I understand correctly,
Commands like this one are forbidden :

Code: Select all

ProcedureDLL.f MyCos( Angle.f )
  ProcedureReturn Cos(Angle )
 EndProcedure
I understand that it is not allowed but , I'd like to know if a DLL with procedure like this one :

Code: Select all

ProcedureCDLL AddHighScore( Score.l, nomme.l , Level.l )
  Position.l = 0
  Repeat
    Position = Position + 1
   Until Score.l > Scores( Position ) Or Position = 33
  If Position < 33
    If Position < 31
      For XLoop = 31 To Position Step - 1
        Scores( XLoop ) = Scores( XLoop - 1 )
        Names$( XLoop ) = Names$( XLoop - 1 )
        Levels( XLoop ) = Levels( XLoop - 1 ) 
       Next XLoop
     Else
      Scores( 32 ) = Scores( 31 )
      Names$( 32 ) = Names$( 31 )
      Levels( 32 ) = Levels( 31 )
     EndIf
    Scores( Position ) = Score
    Names$( Position ) = PeekS( nomme )
    Levels( Position ) = Level
   Else
    NULL$ = PeekS( nomme )
   EndIf   
 EndProcedure
For a DLL to create highscores load/add/save is allowed ?
Even if I use it in another programming langage . Like Dark Basic Professional.

in fact, the objective for me is to put some of my procedure under DLL to protect my source code and make it now available for user because they'll use the DLL commands to call.
So, I need to know if it is allowed or not.

Thanks for your answer.
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

I dont see anything wrong with that - the procedure is actually performing a function and not simply wrapping a PB command. Only Fred can tell us for sure though.
Mark my words, when you least expect it, your uppance will come...
VPureBasic
User
User
Posts: 59
Joined: Fri Apr 25, 2003 6:09 pm
Location: Quebec - Canada

Post by VPureBasic »

Hi freddix,

I already talked with FRED about this ubject in private and, he said that we should not use any PureBasic commands from PB Libraries to codes DLL.

That mean we can not use any commands from the PureBasic General, 2D and 3D drawing libraries. ( Everything on the right side of the help )

Roger
Everything is possible with PureBASIC... All you're missing is imagination!
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

I already talked with FRED about this subject in private and, he said that we should not use any PureBasic commands from PB Libraries
I find that hard to believe! PureBasic is a multi-purpose lanuage and should be used to code custom Libs/DLLs, etc.! Simple wrappers are illegal according to the EULA, but further than that all is acceptable! PB DLLs are legal! :)
--Kale

Image
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

I think Kale is right.

The FAQ says:
Is it allowed to use DLLs made with PureBasic in other projects ?

Generally yes. You can make DLLs including PureBasic commands for your own projects without any restrictions. But it's not allowed to release simple "wrapper" Dlls to include PureBasic commands in other programming languages.


The help Terms and Conditions says:
All components, libraries, and binaries are copyrighted by Fantaisie Software. The PureBasic license explicitly forbids the creation of DLLs whose primary function is to serve as a 'wrapper' for PureBasic functions.
The key here is the definition of "wrapper".

My take on a wrapper a something like ProcedureDLL msgBox(title.s,msg.s,flg.l) which just wraps the MessageRequester command.

I do not believe that something like a full on ISAM dll or a multimedia dll is a wrapper. Nor, frankly, anything that enhances a PB command.

At first I read the terms as meaning PB could not be used to create a DLL that enhanced another language. But all DLLs can be argued to do that.

I am about 60% of the way through converting a B-Tree and ISAM to masm, so that it can be released commercially. Why? Because of that crappy word "wrapper".

This conversion is a real pain and made PB pointless. I do not intend to do it again.

I am working on a multimedia front-end and engine. The engine will be a DLL, capable of use in other languages. It will be a commercial product. I do not intend to convert it - I would rather to face a legal challenge.

Truth is, I don't think I will be legally challenged as I do not (any longer) think the terms mean to exclude things like that.

That fact that PB allows the creation of a DLL implies it will be used elsewhere. If it was only for use with PB then there would be no need to create a DLL - there would, at most, be a "compile to PB lib" option instead ( Not a bad idea, BTW - perhaps Fred and El Choni should put their heads together :) ).

Anyhow, as mentioned before, Fred makes the final decisions on what the ruling means, and the enforcement of same. I just posted this because I find the whole thing blurry and wish to make a point and state my own position - perhaps bringing this to a head earlier rather than later.

The position being?

I will not "steal" PB by doing one-on-one conversions of PB commands, but I will use PB DLLs for cross-language DLLs, larger or smaller, and I will defend my right to do so.

;)
@}--`--,-- A rose by any other name ..
RJP Computing
Enthusiast
Enthusiast
Posts: 202
Joined: Sun Apr 27, 2003 4:44 am
Location: Michigan, USA
Contact:

Post by RJP Computing »

I agree with Dare2!

This keeps on coming up and I think that this is causing more headaches for everyone. It should be said that if you are stealing commands from PB and giving them to another language that is the problem. Not making a product out of PB. That is insane! Wether it is a .dll or an .exe it will be made of libraries and commands from PB. It shouldn't matter and I am sure Fred doesn't want it too. Come on make your software and stop these worthless debates. Just keep it moral and ethical and you can't go wrong.
-Ryan
RJP Computing

Ubuntu 8.10/WinXP, AMD Athlon 64 3000+, 1000MB RAM, AC 97 Audio, nVidia GeForce 7600GT 512MB
Kanati2
User
User
Posts: 27
Joined: Thu Jun 03, 2004 5:18 am
Contact:

Post by Kanati2 »

The wrapper thing means that you cannot simply wrap PBs commands, create a dll for use in (for example) blitzbasic and distribute it for use by other people in their programs.

If you want to wrap the entire language for your OWN use in a dll with blitzbasic that is alright. It's only when you attempt to provide others with the means to use that dll in their own programs that you have a problem.
Max.²
Enthusiast
Enthusiast
Posts: 175
Joined: Wed Jul 28, 2004 8:38 am

Post by Max.² »

Kanati2 wrote:The wrapper thing means that you cannot simply wrap PBs commands, create a dll for use in (for example) blitzbasic and distribute it for use by other people in their programs.

If you want to wrap the entire language for your OWN use in a dll with blitzbasic that is alright. It's only when you attempt to provide others with the means to use that dll in their own programs that you have a problem.
That is how I understand it, too.

If you release a program in any language that uses a PB written DLL with the purpose to support the program, it is ok. No matter if PB commands are simply wrapped in the DLL or not.

If you release just the DLL for anyone else to use in any other language than PureBasic, then you are not allowed to wrap PB functions. You must either create entirely new functions or modify the behaviour of the functions, so they perform additional task.

Example a)

Code: Select all

ProcedureDLL.l Mod(a.l,b.l)

  ProcedureReturn a % b

EndProcedure
Wraps the PureBasic mod function; release only with your own program. Do not release as stand-alone DLL (different from releasing it togother with your exe) and do not provide an interface for use in another language or with the purpose that anyone uses the DLL.

Example b)

Code: Select all

ProcedureDLL.l Mod(a.l, b.l) 

  a=a-a/b*b 

  ProcedureReturn a

EndProcedure
Own modulo function. Release it in any flavor you want, including as dll providing an interface for usage in another language.

So far it should be clear.

Last one:

Code: Select all

ProcedureDLL.s MySpecialHexMod(a.l,b.l)

  ProcedureReturn RSet(Hex(a % b),2,"0")

EndProcedure
I _think_ that one would be allowed to be used in anyway, too. It doesn't simply wrap the commands, but uses PB functions to create a custom command, although it only uses PB built in commands.
freddix
Enthusiast
Enthusiast
Posts: 100
Joined: Sun Feb 08, 2004 7:22 pm
Location: South France
Contact:

Post by freddix »

Thanks for all your answers :)

I'm now sure that It's allowed to build DLL for my Project ...

In fact, it's for a full <<Game Development Package>> called "X-Quad Editor".
I'll explain what it is.

X-Quad Editor is a full map/game editor written with DarkBasic Professional with Source code that support many kind of games.
With the editor are 4 plug-ins DLL written with PureBasic.
RTSkyBox.Dll : it's a real-time RPG skybox style with night,day,rain,sun,moon,clouds,winds .... It uses DarkBasic Pro 3D Engine ( Directly calling DBPro's DLLs )
XGui/XFont.dll : It's a 2D game GUI engine that uses DarkBasic Pro 2D Engine ( Directly calling DBPro's DLLs )
HighScore.dll : It's a simple highscore support that uses PureBasic math calculation and load/save highscores files.
XQuadEditor.dll : It's the main Game Engine ! It uses DarkBasic Pro 3D Engine ( directly calling DBPro's DLLs )

Here are all.

The project is now near to be completed and, I'll give you with pleasure some snapshots if you want to know more about it :)

The interest for me to use PureBasic and DLLs is to protect my game engine source code so, User will directly call XQuadEditor.Dll using Commands created for DBPro using PureBasic DLL and DBPro 2D/3D Engine ... it also allow me to put Registration/Serial protection inside the DLL directly :) so it's double interest for me :)

So as you can see, I don't use PureBasic 2D / 3D engine and, it's not a wrapper :) so I'm authorized to make my DLL :)

Thanks all for your answers :)
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

Ive been aware of the X-Quad Editor project for some time, and I must say it looked impressive when I last saw it. Its been long awaited and it looks great. Good luck with the project :)
Mark my words, when you least expect it, your uppance will come...
kake26
Enthusiast
Enthusiast
Posts: 157
Joined: Sun Jan 25, 2004 7:21 pm
Contact:

Post by kake26 »

Thanks, that one comment was ever so amusing.
Post Reply