actually this is correct, but when i think about it, there is no need for each of them to be re-sent to the plugins, i will correct this.
Replies
also i was playing with Ziron_SetFileBuffer ,so i made this
int32 len = H_strlen(strCode);
if(len > 0)
{
pointer mem = H_GetTmpMem(len); //allocate memory
char tmp[1024];
edi = strGetLine(strCode, @tmp);
while(edi > 0)
{
H_strcat(mem,@tmp);
edi = strGetLine(edi, @tmp);
}
if(Ziron_SetFileBuffer(handle, mem ,H_strlen(mem)) == false)
{
Ziron_FatalError('error when set File Buffer');
}
}
it always faild , is there something wrong here?
http://www.freewebs.com/ogremagic/index.htm
ok has no answer , i will ask it in deferent way.
does Ziron_SetFileBuffer function works okay with windows7 system , or it has a problem?
and if it works well , why my test did not work , all my test made is that takes a line from
buffer code then it adds that line to a new buffer , then it sets the new buffer by Ziron_SetFileBuffer function.
any help please ?
http://www.freewebs.com/ogremagic/index.htm
please but a test plugin together that reproduces the issue - that i can assemble, as soon as i get the time i will compile it and test to see what is the problem.
actually you can test it with any program , here is simple one.
program WIN32CUI 'ssleep test';
Eax = 10;
ExitProcess(0);
http://www.freewebs.com/ogremagic/index.htm
i do not see any call to setbuffer in that code.... i require a plugin code not a test code.
ok , here it is
plugins off;
program WIN32DLL 'test PLUGIN';
#include 'zirplug/framework.zir';
#include 'zirutils.zir';
#include 'strings.zir';
//////////////////////////////
const strLoaded = 'test plugin has loaded!';
//////////////////////////////
function H_strlen(char* str) {
Eax = str;
while(char[eax] != 0) {
Eax++;
}
sub Eax, str
}
function H_strcat(Dword dst,src)
{
uses edx ebx;
Eax = dst;
Edx = src;
push Eax;
while (byte[Eax] != 0) { Eax++; }
while (byte[Edx] != 0)
{
BL = char[Edx];
char[Eax] = BL;
Edx++; Eax++;
}
char[Eax] = 0;
pop Eax;
}
inline procedure H_strjoin(;)
{
$temp = 1;
$to = $argc - 1;
$repeat $to:
H_strcat($arg[0],$arg[$temp]);
$temp++;
$end
}
function H_GetTmpMem(DWord sizeInByte)
{
uses Ebx Ecx;
const len = 1024;
global int32 StrCnt;
global char* StrFunc[len];
if(sizeInByte == nil)
{
for (Ecx = 0 to StrCnt)
{
Ebx=@StrFunc;
lea Ebx,[Ebx+Ecx]
Eax=Dword[Ebx];
if( Eax> 0)
{
freemem( Eax);
}
}
return nil;
}
Eax = StrCnt;
Eax++;
and Eax,len
StrCnt = Eax;
Ebx = @StrFunc;
lea Ebx,[Ebx+Eax]
Eax=Dword[Ebx];
if( Eax> 0)
{
freemem( Eax);
}
Dword[Ebx]= malloc(sizeInByte);
char[Eax]=0; // make sure string is nil
}
procedure FileEntry(DWord handle; char* strCode)
{
int32 len = H_strlen(strCode);
if(len > 0)
{
pointer mem = H_GetTmpMem(len); //allocate memory
char tmp[1024];
edi = strGetLine(strCode, @tmp);
while(edi > 0)
{
H_strcat(mem,@tmp);
edi = strGetLine(edi, @tmp);
}
if(Ziron_SetFileBuffer(handle, mem ,H_strlen(mem)) == false)
{
Ziron_FatalError('error when set File Buffer');
}
}
}
function InitPlugin(pointer pGetF) {
Ziron_LoadAll(pGetF); //use framework utility function to load all
return strLoaded;
}
entry function DLLMain(DWord iDLL; DWord iReason; Pointer iResult) {
if (iReason == DLL_PROCESS_ATTACH) {
return true;
}
return false;
}
exports InitPlugin,FileEntry;
http://www.freewebs.com/ogremagic/index.htm
any progress here?
l hope you get the solution , i know you will be busy next 2 months , as soon as possible.
this function will help me a lot if it works correctly.
http://www.freewebs.com/ogremagic/index.htm