|
Echo
May 17, 2004 13:53:08 GMT -5
Post by Z!plink on May 17, 2004 13:53:08 GMT -5
Im trying to get like //dll argh.dll echo bah and this returns: /bah is not connected to enyserver or something..........so im not sure what im doing wrong i have tryied eny thing but nothing works!!!! #define echo(x) { lstrcpy(data,x); return 2; }
extern "C" int WINAPI echo(HWND,HWND,char *data,char*,BOOL,BOOL) { char *p = data; while (*p == ' '); echo(p); }
|
|
|
Echo
May 17, 2004 15:59:22 GMT -5
Post by Dangermouse on May 17, 2004 15:59:22 GMT -5
I dont know where to start.. your prototype isnt the same as your function data is already a char pointer why assign it to another one your function is going to keep calling itself because you are calling 'echo' inside the 'echo' function Read up on the return codes again, you need to copy something like /echo -a wee to 'data' Ive said it before, i know you wont listen but ill say it again. You cant just use trial and error, C/C++ is not as easy as mirc, its like 1000 times harder, you need to learn at least some basics of C/C++ before you try to make a dll READ SOME d**n TUTORIALS!
|
|
|
Echo
May 18, 2004 0:11:09 GMT -5
Post by Z!plink on May 18, 2004 0:11:09 GMT -5
i am!
|
|
Trad
New Member
Posts: 1,122
|
Echo
May 18, 2004 16:45:41 GMT -5
Post by Trad on May 18, 2004 16:45:41 GMT -5
extern "C" int WINAPI echo(HWND,HWND,char *data,char*,BOOL,BOOL) { char command[20]; lstrcpy(command,"//echo -a "); lstrcat(command,data); return 2; }
thats all you need...
command[] holds the command "echo -a" and data holds what you want to echo..
lstrcat attatches it together so you have "//echo -a" + "what you passed to be echoed"
and it returns it and does it.
|
|