Author Topic: help me to find error!  (Read 8465 times)

0 Members and 1 Guest are viewing this topic.

Vaulter

  • Guest
help me to find error!
« on: January 09, 2004, 01:56:23 PM »
i write plugin (on VC++ 6.0)
part:

Code: [Select]
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: [Select]
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]

Vaulter_unreg

  • Guest
help me to find error!
« Reply #1 on: January 11, 2004, 04:54:47 PM »
where is error in this packet:
Code: [Select]
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

Offline Vaulter

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
help me to find error!
« Reply #2 on: January 12, 2004, 09:08:59 AM »
so i will go to another projects.

Offline rejetto

  • Administrator
  • Insane programmer
  • *
  • Posts: 12853
    • View Profile
help me to find error!
« Reply #3 on: January 12, 2004, 12:06:26 PM »
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

Anonymous

  • Guest
help me to find error!
« Reply #4 on: January 14, 2004, 09: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]

Offline Vaulter

  • Occasional poster
  • *
  • Posts: 3
    • View Profile
help me to find error!
« Reply #5 on: January 14, 2004, 09:53:12 AM »
I was above...