Trying to mimic a specific DLL interface

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.
Hehe :). I simply hope than you willn't do a simple wrapper for all PureBasic commands and call them on the Blitz side :). DLL support is NOT to intented to do that.
Fred - AlphaSND
Just a friendly word of advice... don't ever allow the demo version of PB to create DLL's. Whether or not that is what DLL support is intended for, it really doesn't matter... that is what will happen :(
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.
Just a friendly word of advice... don't ever allow the demo version of PB to create DLL's. Whether or not that is what DLL support is intended for, it really doesn't matter... that is what will happen :(
Yes, the demo willn't allow DLL making, that's sure. And if I found a DLL which simply wrap a purebasic library (like movie, sprite etc...) I will add a portion in the licence to disallow this. That's sound a bit strange but it would say than any langage could have highly optimized PureBasic commands for free. Sound not good to me. Anyway, I think than the DLL creation is a must have and users will use it correctly. Please report any abuse to my address.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.
Yes, the demo willn't allow DLL making, that's sure. And if I found a DLL which simply wrap a purebasic library (like movie, sprite etc...) I will add a portion in the licence to disallow this. That's sound a bit strange but it would say than any langage could have highly optimized PureBasic commands for free. Sound not good to me. Anyway, I think than the DLL creation is a must have and users will use it correctly. Please report any abuse to my address.
This step would be logical Fred, otherwise Blitz don't need to be improved anymore by himself.
Only make a PureBasic DLL and sell it with Blitz: voila! all new commands needed are available, with your work!!!
And no Blitz user need to convert to or buy PureBasic anymore...
That would be really bad for Fantaisie Software.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Franco.

BTW:
what if somebody wants to create a new programming language with PureBasic?

You can do it with every other available language like C, Delphi, VB, etc.
Languages like DevC, DevPascal, Profan, Euphoria etc. are coded with an existing language.

I don't think that you can restrict what a coder is coding.

Or what if somebody want to make a PureBasic extension as DLL or LIB and want/need to make money with it in any way?

Are Microsoft, Borland and Co. restricting something like that in any way?

Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.

Edited by - franco on 30 January 2002 17:19:56
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

I don't think that creating a programming language with PureBasic is restricted, neither coding a PureBasic DLL. But if you do the last, you should pay for each copy you sell, shouldn't you? And a PB DLL will never go as fast as coding in PureBasic directly.

And what's wrong about creating a programming language with PureBasic? It's the same thing, it would always go slower, but could be useful to create dedicated languages, for example: a programming language that's good to make requesters fast, or whatever.

Bye,



El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mystik.

So are you saying that it is wrong for me to make a dll in purebasic (which I bought a long time ago) using the features of Purebasic and then use that DLL in a program that I'm making in Blitz Basic (that I also own)

Now excuse me, but I dont see any problem here. I own Purebasic so that I can make use of it's features to create my own programs.

Now if I can make a DLL that extends Blitz in some way, what difference does that make to anyone else. I still paid for both lanuages with the intention of making programs for other people.

I mean this is what DLL's are intended for is it not. Not a lot of point being able to make them if you can't use them from another language.

Perhaps you could clear this up a bit, Fred.

Steve Smith
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.


Steve, if you create a DLL to use in your own program, there is no problem at all about it. What I mean is to distribute this DLL with PureBasic high-level function to anyone which don't have PureBasic.

Imagine the following (extrem) case: A guy take a C compiler, adapt it to a basic friendly syntax, take a big (not so big) DLL with all PureBasic commands commands in it and sell the whole. What should I think about it ?

I hope you understand my point of view. Anyway, as El_Choni say, there is lot performances lost against calling directly in PureBasic.


Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by mystik.

Hi Fred,

Thanks for the reply :)

Steve.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

El_Choni:

>And what's wrong about creating a programming language
>with PureBasic? It's the same thing, it would always
>go slower,

Totally wrong, El_Choni !!

The resulting programming language speed
has nothing to do with the language the
compiler is written in.
You can write a programming language with
VisualBasic that is faster than PureBasic.
Yes, you can write a Assembler with PureBasic
and also with VB. No problem.

The thing that you meant is the compile speed.
If i write a compiler with PB it would probably
be slower as if i write it in assembly.

But IMO **compile speed isnt everything**.
If i compile a 20.000 line project, i better
wait 1 or 2 seconds longer and have a better
result (smaller and faster .EXE).

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

What I meant by slower is this: imagine that your programming language has a String() command. What this command really would do, in this case, would be calling PureBasic's Str(). Two calls, while if you do it in PureBasic directly is only one call. And this would happen for every PureBasic function your programming language uses. Just this.

Bye,


El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

Thats right El_Choni, but thats not the
way you write a (professional) compiler.

cya,
...Danilo

(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wickedRush.

Hello,
I am new to purebasic. I found out about purebasic through the BlitzBasic forum while trying to find a good way to make dll's.
Just to get my two cents in;
I think that creating a wrapper for BB using purebasic is wrong, IF, the wrapper is freely distibuted with the needed BB source code (not compiled). If both the .dll and the BB.exe(compiled) are distributed then there should be no problem because the .dll cannot be used by another BB user(please correct me if I am wrong!) In other words, if you make a .dll with purebasic that basically wraps the win32 api and then create the bb source needed to access the .dll and post this as freeware for BB users this is wrong. I have not used purebasic much but i think it is great and would not want to see either BB or Purebasic loose from this cooperation.

Thanks
Post Reply