In a very simplistic manner and basically;
A wrapper basically opens a dll library and provides access to the functions within the .dll library.
A library adds functionality that doesn't already exist in PureBasic in the form of new methods or functionality.
so I have a few questions...
1. If you produce a wrapper that adds a new method or access to new functions in a .dll file, and those functions or methods do not currently exist in PureBasic, is it classed as a wrapper or a library?
2. If you want to distribute such a wrapper (or library) for free is it correct to do so using the original .dll function names? (probably wouldn't do this anyway)
3. When is it necessary to produce a new .dll file (for free distribution) if your using the new functions or methods if those functions or methods do not already exist in PureBasic? (or is this just a personal choice thing)
4. And last...if the new functions and methods are not already in PureBasic and you produce this wrapper, library, or .dll, for free distribution and compile it within PureBasic, what portions of the Purebasic license apply? (because the functions and methods do not currently exist in PureBasic)
Maybe dumb questions...but my boss is asking me about some things because I used PureBasic in an internal project (non-commercial project) which was distributed freely in a very limited scope using some of the new functionality in Vista and the project used all API (no PureBasic commands - it was a requirement of the project) but was compiled in PureBasic. Just a few questions because the legal department asked, nothing serious. (and...i'm not in trouble - personally I think the world would be better off without lawyers)
			
			
									
									
						When does a wrapper become a library, and when to use DLL's?
- 
				dell_jockey
- Enthusiast 
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
1. a wrapper is linked statically into your exe, so you could call your wrapper a library (of sorts.).   The wrapper still needs the .dll though...
2. a function name is just part of the interface to the code proper. You're not duplicating the implementation code, so that I guess it would be ok to use the function names. In free projects (using free dll's) it will even be less of a problem...
3. new code can either be distributed for static linking (i.e. a library) or a .dll. A dll would allow other languages to use your code as well.
4. Merely wrapping the libraries that already came with PureBasic is a no-no.
			
			
									
									
						2. a function name is just part of the interface to the code proper. You're not duplicating the implementation code, so that I guess it would be ok to use the function names. In free projects (using free dll's) it will even be less of a problem...
3. new code can either be distributed for static linking (i.e. a library) or a .dll. A dll would allow other languages to use your code as well.
4. Merely wrapping the libraries that already came with PureBasic is a no-no.
OK, dell_jockey, you mentioned something that I should have clarified a little. I am not wrapping any libraries, files, functions, that come with PureBasic (your right that is a no-no, I would never do that). Thanks for mentioning that.dell_jockey wrote:1. a wrapper is linked statically into your exe, so you could call your wrapper a library (of sorts.). The wrapper still needs the .dll though...
2. a function name is just part of the interface to the code proper. You're not duplicating the implementation code, so that I guess it would be ok to use the function names. In free projects (using free dll's) it will even be less of a problem...
3. new code can either be distributed for static linking (i.e. a library) or a .dll. A dll would allow other languages to use your code as well.
4. Merely wrapping the libraries that already came with PureBasic is a no-no.
- Kaeru Gaman
- Addict 
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
