rejetto forum
February 09, 2012, 04:44:23 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: help me to find error!  (Read 5222 times)
0 Members and 1 Guest are viewing this topic.
Vaulter
Guest
« on: January 09, 2004, 07:56:23 AM »

i write plugin (on VC++ 6.0)
part:

Code:
case PE_INITIALIZE:           // plugin initialization, issued only by &RQ
_irqver ver;
currpos+=readfrombuff(comm,currpos,&ver,sizeof(ver));
if(ver.api_version!=APIversion)
{
//api error
return 0;
}
int UIN;
int strlen;
char RQ_path[MAX_PATH];memset(RQ_path,0,MAX_PATH);
char user_path[MAX_PATH];memset(user_path,0,MAX_PATH);
//
currpos+=readfrombuff(comm,currpos,&strlen,sizeof(int));
currpos+=readfrombuff(comm,currpos,RQ_path,strlen);
currpos+=readfrombuff(comm,currpos,&strlen,sizeof(int));
currpos+=readfrombuff(comm,currpos,user_path,strlen);
currpos+=readfrombuff(comm,currpos,&UIN,sizeof(int));
MessageBox(0,lstrcat(lstrcat(RQ_path,"\n"),user_path),"",0);

result+=(char)PM_DATA;
result+=(BYTE*)_istring("Test plugin");
result+=(BYTE*)_int(APIversion);
break;
then i send packet:
Code:
LPSTR retpacket=(LPSTR)LocalAlloc(LPTR,result.size()+sizeof(int));
len=result.size();
memcpy(retpacket,&len,sizeof(int));
if(len)memcpy(retpacket+sizeof(int),result.c_str(),len);
return retpacket;

there is access violation of memory exeption in &RQ!!!

but i saw the packet byte by byte - all right!
what the problem?[/code]
Logged
Vaulter_unreg
Guest
« Reply #1 on: January 11, 2004, 10:54:47 AM »

where is error in this packet:
Code:
020 0x14 
000 0x00
000 0x00
000 0x00
002 0x02 
011 0x0b
000 0x00
000 0x00
000 0x00
084 0x54 T
101 0x65 e
115 0x73 s
116 0x74 t
032 0x20
112 0x70 p
108 0x6c l
117 0x75 u
103 0x67 g
105 0x69 i
110 0x6e n
004 0x04 
000 0x00
000 0x00
000 0x00
Logged
Vaulter
Occasional poster
*
Offline Offline

Posts: 3

5748332
View Profile
« Reply #2 on: January 12, 2004, 03:08:59 AM »

so i will go to another projects.
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11756


View Profile
« Reply #3 on: January 12, 2004, 06:06:26 AM »

sorry but i can't fix that bug in a very short time
it is sad but i have to spent the little time i have on other &RQ matters now
but i added it to the buglist
Logged
Anonymous
Guest
« Reply #4 on: January 14, 2004, 03:51:32 AM »

rejetto just tell me: is packet right, and its only a bug of &RQ. 'Cause i'll dig my code in order to find my own bug, if it is mine ))[/b]
Logged
Vaulter
Occasional poster
*
Offline Offline

Posts: 3

5748332
View Profile
« Reply #5 on: January 14, 2004, 03:53:12 AM »

I was above...
Logged
rejetto forum
« Reply #5 on: January 14, 2004, 03:53:12 AM »

Do you like this software? Consider even $2
 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page February 08, 2012, 02:42:22 AM
anything