mIRC Home    About    Download    Register    News    Help

Print Thread
#138503 01/01/06 08:00 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
i made one of the many ingame irc things for irc

mine is for mirc and windows Q3type games

i made something that alows ppl to type /irc something

then the idea is the message arives at mirc and mirc will exec it as a mirc command

now i dont think mirc can evaluate a string into command so i tryed using the return 2 function of the .dll but sadly nothin happents

i call the dll by
Code:
$dll(script/dlls/ingame_irc.dll,GetConsole,)
the dll funtion is
Code:
int __declspec(dllexport) FAR PASCAL GetConsole(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause){
	//char charry = 0x0D;
	
	data = databuffer;
	
	MessageBox(NULL,va("return data ist %s",data),PROGNAME,MB_OK);

	return 2;
}
now the message box show it just fine but whit mirc itzelf nothing realy happents

does any1 got an idea

#138504 02/01/06 01:08 AM
Joined: Nov 2003
Posts: 227
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Nov 2003
Posts: 227
Not that I've made a .dll before.

But if you want your .dll call in mirc to return your databuffer variable, you'll need to strncpy(data, databuffer, 900). All you are doing is assigning the address of it to a local variable in the function.

Is this the problem?

#138505 02/01/06 05:25 PM
Joined: Sep 2005
Posts: 116
I
Vogon poet
OP Offline
Vogon poet
I
Joined: Sep 2005
Posts: 116
databuffer is a global variable but oke ill try

i dont think it matter much since data is a pointer anyway

Last edited by Im2good4u; 02/01/06 05:27 PM.

Link Copied to Clipboard