but it works like this...

Code:
extern "C" int WINAPI StoreKey(HWND, HWND, char *data, char *parms, BOOL, BOOL) {

	string channel = GetTok(data, 1, 32);
	string key = GetTok(data, 2, 32);

	KeyStorer.insert(MapFunction::value_type(channel, key));

	MapFunction::iterator it = KeyStorer.find( channel );

	if ( it != KeyStorer.end( ) ) 
		lstrcpy( data, (*it).second.c_str( ) );
	else  
		lstrcpy( data, "Key Not Found" );
	
	return 3;
}


//echo -a $dll(Test.dll, StoreKey, #channel key) echos key

but it just doesnt return the key from a seperate function :S

Last edited by pouncer; 25/01/06 02:31 PM.