Page 1 of 3
Legal Business
Posted: Thu Jun 10, 2004 1:33 am
by User Mike
Hello,
I've asked this a couple times, but just want to cover it one more time to be sure I'm legit.
I'm currently working on a program in DarkBasic Professional that needs a GUI. So I'm (using/plan on using) PureBasic to create the GUI for DBP.
Now, my questions are as follows:
1.) Is it legal for me to create a dll that has commands like, open file requester, get gadget state, message requester, etc. and use these commands in DBP for a program I might sell.
2.) Is it legal for me to sell the dll with those commands? (message requester, open file requester, etc.)
Thanks for your help.

Posted: Thu Jun 10, 2004 2:05 am
by Moonshine
Mike, see why I asked if it was all DBPro?

Posted: Thu Jun 10, 2004 2:08 am
by PolyVector
As far as I know, it's illegal to wrap any PB commands in a dll (for sale or otherwise)
If you give away PB commands in DLL form, that could take away business from fred
If you write them yourself (Using API commands) it
should be legal...
Posted: Thu Jun 10, 2004 2:42 am
by User Mike
Hehehe, Moonshine. At this point it still is all DBP, although I want to build the GUI as mentioned above with PB and then distribute the .dll if possible.
-------------------
Hmmm, I guess the only easy way to do this would be to show off some source.
Ok, here's the example and situation.
Lets say I use this as a dll. A simple message requester.
Code: Select all
ProcedureDLL SimpleBox(title$,text$)
MessageRequester(title$,text$,#PB_MessageRequester_Ok)
EndProcedure
I then do 2 things.
1.) I load the dll into my DarkBasic Pro Program, use it, and then sell the program.
2.) I sell the dll for anyone who wants to utilize the message requester.
So I'm hoping that these two events are legal.
What I do understand though, is that if I take something like the Engine3D.dll and use that in my project it is illegal. I must program my dll, not just rip it from the PB files.
Hopefully that makes my intentions clear.
Posted: Thu Jun 10, 2004 3:24 am
by User Mike
Hmmm, how about I just post my .dll here and you tell me if it's legal or not. I'm really confused. From what I understand you can use custom built functions in your dll, but you cannot use any PB commands inside your .dll.
Ok, here it goes. I just need to know a.) Can I distribute a .dll with these functions, b.) Can I use this .dll with commercial software that will be distributed.
(First procedure figures out which file requester to use and you input from there. Second procedure determines whether to open up a color or font selector.)
Code: Select all
;Flag 1 is the Save File Requester. By using this you can specify where to save a file.
;Flag 2 is the Open File Requester. By using this you can specify which file to open.
ProcedureDLL FileRequester(Title$,Text$,Pattern,PatternPosition,Flag)
If Flag=1
SaveFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
EndIf
If Flag=2
OpenFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
EndIf
EndProcedure
;Flag 1 is the color selector. You can pick your color from this by specifying Flag 1.
;Flag 2 is the font selector. By using this flag you can select a font for your text.
ProcedureDLL ToolRequest(Flag)
If Flag=1
Color.l = ColorRequester()
If Color > -1
a$ = "You have selected following color value:" + Chr(10) ; Chr(10) only needed
a$ + "24 Bit value: " + Str(Color) + Chr(10) ; for line-feed
a$ + "Red value: " + Str(Red(Color)) + Chr(10)
a$ + "Green value: " + Str(Green(Color)) + Chr(10)
a$ + "Blue value: " + Str(Blue(Color))
Else
a$ = "The requester was canceled."
EndIf
MessageRequester("Information",a$,0)
EndIf
If Flag=2
FontName$ = "Arial" ; set initial font (could also be blank)
FontSize = 14 ; set initial size (could also be null)
Result.l = FontRequester(FontName$, FontSize, #PB_FontRequester_Effects)
If Result
a$ = "You have selected following font:" + Chr(10) ; Chr(10) only needed
a$ + "Name: " + SelectedFontName() + Chr(10) ; for line-feed
a$ + "Size: " + Str(SelectedFontSize()) + Chr(10)
a$ + "Color: " + Str(SelectedFontColor())
Else
a$ = "The requester was canceled."
EndIf
MessageRequester("Information",a$,0)
Endif
EndProcedure
Thanks, and sorry for any headaches I'm causing.

Posted: Thu Jun 10, 2004 3:47 am
by Dare2
Interesting question, and one that deserves some clarification from someone who knows (Which is not me) as there is a very fine and confusing line here.
AFAIK, the messageRequester example is what we can't do according to the licence. AFAIK.
But all sorts of questions arise.
Let's say someone owns VB, Blitz3D and PB. Say they use Blitz for the graphics, VB for the activeX and PB for the other stuff, and make DLLs, and use masm to invoke things.
Which language is using which language? Who is being shortchanged?
Is masm considered the real language becuase it invokes the others? What if PB was used instead of masm? Or VB?
IMO, if the programmer owns the development language licence, the programmer can use it to develop things. Maybe the key word is develop?
I can see that if I used PB to create dlls that were 1:1 conversions of PB statements, and then bundled these together as, say, a language or language extension, then that would be tacky.
Posted: Thu Jun 10, 2004 3:57 am
by User Mike
Ok, thanks for the clarification on the message requester.
I'm currently working on a simple code example that'll hopefully determine right or wrong in this situation. As far as I know, if I can make a function that brings up the messagerequester command without using message requester in the dll I think I should be okay.
Although, I won't be getting as done as fast as I thought. Just as long as everything is legal I'll be happy.

Posted: Thu Jun 10, 2004 4:03 am
by Dare2
Hi User Mike,
That was not a clarification, just an opinion based on how I read things.
Hopefully somebody will give a definitive answer.
Anyhow, success with your app.
Posted: Thu Jun 10, 2004 4:45 am
by User Mike
Thanks for your help Dare2. Perhaps if I post some screenshots of my project I'll linger some people in.
(One small one and a few links to others.)
http://curvedbasic.dbspot.com/water.bmp
http://curvedbasic.dbspot.com/Tidus.JPG
As you can see this project is really developing for me, and it's important I have an easy to use GUI if I plan on commercial success (Or even a good freeware tool). Must find definite anwser.
-------------------------------------
Alright, here's the source I'm currently working on.(Message requester was too boring.

)
As far as my understanding, this code should be legal. This is because I'm not just wrapping one command for my use, for I'm using a bunch of commands to determine which file requester to open, and what data to return. Am I correct in my thinking, or totally wrong?
(These are the kinds of functions I want to use in my dll. I recommend you run it and play with the flags at the bottom first.

)
Code: Select all
;Flag 1 is the Save File Requester. By using this you can specify where to save a file.
;Flag 2 is the Open File Requester. By using this you can specify which file to open.
;If Retrieve is set to 1, then data will be returned through the message requester.
;Any other value for Retrieve and no data will be returned.
ProcedureDLL FileRequester(Title$,Text$,Pattern$,PatternPosition,Flag,Retrieve)
If Flag=1
Filename$=SaveFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
If Retrieve=1
Path$ = GetPathPart(Filename$)
Extension$ = GetFilePart(Filename$)
Size = FileSize(FileName$)
MessageRequester("Retrieved Data","Filepath: "+Path$+""+Extension$+" "+"File Size: "+Str(Size) )
EndIf
EndIf
If Retrieve=2
Filename$=OpenFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
If Flag2=1
Path$ = GetPathPart(Filename$)
Extension$ = GetFilePart(Filename$)
Size = FileSize(FileName$)
MessageRequester("Retrieved Data","Filepath: "+Path$+""+Extension$+" "+"File Size: "+Str(Size) )
EndIf
EndIf
EndProcedure
FileRequester("Title","hello","Text file | *.txt | Image Formats | *.bmp;*.jpg",1,1,1)
Posted: Thu Jun 10, 2004 6:12 am
by Danilo
Contact Fantaisie Software at
alphasnd@purebasic.com
and ask there - they can answer it for your specific product
if you show them source examples.
What you do is wrapping of PureBasic's commands, even if you
add 3 or 4 lines to every procedure.
User Mike wrote:I then do 2 things.
1.) I load the dll into my DarkBasic Pro Program, use it, and then sell the program.
2.) I sell the dll for anyone who wants to utilize the message requester.
The PureBasic help says:
Code: Select all
All components, libraries, and binaries are copyrighted by Fantaisie Software and can't be used in any form (static libraries, DLL and more) in another programming langage, except for PureBasic owners. This includes the simple DLL or static library wrapping of PureBasic commandset.
This means your point 2 is definitely not allowed with the code
you write, point 1 should be OK if you dont write documents for
the DLL (so other people cant use it) and the DLL is *only* used
by your program.
The only way you really know whats safe with your code and
whats not: contact Fantaisie Software directly.
Posted: Thu Jun 10, 2004 6:25 am
by User Mike
Ok, thanks Danilo, I'm contacting Fantasie software as we speak.

-----------------
(I'll then post the results as I know this has been asked numerous times.)
Posted: Thu Jun 10, 2004 7:07 am
by blueznl
i think the discussion has gone on before, i guess it simply boils down to this:
if it is a new application / tool / dll substantially different from a wrapper, you could sell it as a component (the clue is what is substantially different

)
if it is not, the only way to sell it is as a part of a larger whole where the part cannot be used by itself as a functional wrapper
at least that's how i told myself how things should work

Posted: Thu Jun 10, 2004 8:14 am
by User Mike
E-mail has been sent. Hopefully we'll get a final anwser on this.
----------------------
Unfortuantly from my FileRequester snippet above, it's not what I consider substansially different so I may be out of luck. Never know though, it's binding two commands into one so that might make the situation different.
Anyone have any ideas for turning a messagerequester into something totally different, but then still being able to use the messagerequester command.
This is me trying to figure things out. ---->

Posted: Thu Jun 10, 2004 9:08 am
by blueznl
the way around: use winapi calls, fred's not gonna' complain about that, and they're not that difficult to implement

Posted: Thu Jun 10, 2004 9:26 am
by BalrogSoft
Hi, i will explain how i understand the licence of PB. You can use a dll wrap of PB functions if you will use personally for your project, eg. you made a DBPro program that need GUI commands, and you made a dll to use with DBPro, but only can be used in your project. Some of your functions posted here can be considered a wrap, but the final answer for is the answer of Fred, because functions like this can be a litle confused to know if it is legal with licence or not:
Code: Select all
ProcedureDLL FileRequester(Title$,Text$,Pattern,PatternPosition,Flag)
If Flag=1
SaveFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
EndIf
If Flag=2
OpenFileRequester(Title$, DefaultFile$, Pattern$, PatternPosition)
EndIf
EndProcedure
You can made it with windows API, and you will made your own functions for this procedure you can use GetOpenFileName and GetSaveFileName to made open and save requesters through windows API and will be totally legal. For example, i added to ScriptVM sprites functions, but i use directly DirectDraw because i dont want to use Fred work of sprites as my own commands commands, this is not banned on licence but made sprites commands of my language a direct wrap to PB commands its like use a dll to implement not existing functions of a language. Is not the same made a interpreter that a dll, but this is my opinion. Bye...