| 
		
			| Is this illigal? [message #257189] | Fri, 04 May 2007 00:15  |  
			| 
				
				|  |  jnz Messages: 3396
 Registered: July 2006
 Location: 30th century
 
	Karma: 0
 | General (3 Stars) |  |  |  
	| I'm trying to create a closed source dll that has access to the engine calls in scripts.dll. The GNU doesn't say anything about calling custom code with a function pointer, But then, it doesn't say much else either.
 
 So, here's what i did:
 
 Scripts.dll
 
 
//.h
#include <string>
using namespace std;
typedef void (*CI)(string);
typedef void (*CO)(string);
void Con_In(string Str);
void Con_Out(string Str);
//.cpp
#include "scripts.h"
#include "engine.h"
void Con_In(string Str)
{
	Console_Input(Str.c_str());
}
void Con_Out(string Str)
{
	Console_Output("%s", Str.c_str());
}
 MyDLl
 
 
#include <string>
using namespace std;
typedef void (*CI)(string);
typedef void (*CO)(string);
CI Console_Input;
CO Console_Output;
extern "C" 
{
	__declspec(dllexport) void InitCustomCommands(CI ConIn, CO ConOut)
	{
		Console_Output = ConOut;
		Console_Input = ConIn;
		
		Console_Output("myDll Loaded.\n");
	}
}
 |  
	|  |  | 
	| 
		
			| Re: Is this illigal? [message #257200 is a reply to message #257189] | Fri, 04 May 2007 01:18   |  
			| 
				
				
					|  dead6re Messages: 602
 Registered: September 2003
 
	Karma: 0
 | Colonel |  |  |  
	| It has been said before that it is highly unlikely that the license provided by the scripts.dll source is legal reguarding calling Memory Locations. 
 Or am I wrong?
 
 Let all your wishes be granted except one, so you will still have something to strieve for.
 |  
	|  |  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  | 
	|  | 
	| 
		
			| Re: Is this illigal? [message #257250 is a reply to message #257189] | Fri, 04 May 2007 09:39   |  
			| 
				
				|  |  Viking Messages: 1692
 Registered: July 2005
 Location: Earth
 
	Karma: 0
 | General (1 Star) |  |  |  
	| You should disasimble game.exe!   
 Unless thats what you are doin, I dunno im not a coder...
   
 
 
QUOTES  
"The Renegade community revolves around having something awesome, and not sharing it so you can be on top of the mountain." -Canadacdn
 | Crimson wrote on Thu, 17 May 2007 05:22 |  | 
 | Memphis wrote on Tue, 15 May 2007 03:54 |  | ...fatally die to death...
 
 | 
 
 I don't know if you meant to do that, but triple redundancy for teh win. I LOL'ed.
 
 | 
 
Awesome l337 people= Icedog90, Blazea58, Canadacdn, Crimson, jonwil |  
	|  |  | 
	|  | 
	|  |