rejetto forum

Software => &RQ => Developers => Topic started by: TC on May 24, 2002, 11:28:13 PM

Title: Write plugins in C: some resources
Post by: TC on May 24, 2002, 11:28:13 PM
At the address http://www.ebcorp.org/devel/&rq/ there are some docs and resources about writing C plugins for &rq 0.9+.
I think that my work can be helpful for others potential C-developers...
now some docs are in Italian; I'm working on translations in eng.
I'm also working on pluginUtils pack: I want expand it with a rich set of functions.

Greetings, TC <tc@yesis.com> - #56979793
Title: Write plugins in C: some resources
Post by: rejetto on May 26, 2002, 02:00:59 AM
many thanks, and keep up :)
Title: Re: Write plugins in C: some resources
Post by: Gilmour on June 28, 2002, 07:02:59 PM
The sample plugin doesn't work... i can't take this for example... :(
It may be that there is a problem with the new version released?
Title: help me to find error in my plugin
Post by: Vaulter on January 09, 2004, 01:55:25 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]