After install Version Insight Plus Setup 8 Beta the TwineCompile 3.3.1.231 stop working correctly.
When I try to make or rebuild project standard compiler is used instead of twine compile.
The DesignIDEPro package does hook @Projectgroupbuilder@BuildProjects$qqrp29Projectintf@TProjectBuildListrx22Compintf@TBuildControl
in the coreide package (coreide150.bpl/coreide160.bpl). Maybe the TwineCompile issue is related to that. I can install multiple plugins that hook that method and all do work correctly.
In order to find out if that hook is the reason for the TwineCompile failure you could modify the @Projectgroupbuilder@BuildProjects$qqrp29Projectintf@TProjectBuildListrx22Compintf@TBuildControl string with a hex editor in designidepro150.bpl/designidepro160.bpl. Note it is an unicode string and changing a single char of it would be enough to prevent that hook from being installed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TwineCompile hooks that method using madCodeHook. What hooking method do you use to hook it?
Also, in your hook method, do you call the original method based on the address read, or the stored address of the original function? I'm just wondering if your hook method is calling the IDE's function directly instead of calling the hook that TwineCompile places there.
Jon
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am hooking it with a jump at the beginning of the method at it's original address. The method itself looks like this
function NewProjectgroupbuilderBuildProjects(ProjectBuildList: TObject; const BuildControl: TBuildControl): Boolean;
begin
CodeRestore(HookProjectgroupbuilderBuildProjects);//<- this restores the original bytes at the beginning of the method
try
Result := OrgProjectgroupbuilderBuildProjects(ProjectBuildList, BuildControl);
finally
CodeRedirect(@OrgProjectgroupbuilderBuildProjects, @NewProjectgroupbuilderBuildProjects,
HookProjectgroupbuilderBuildProjects);//<- reinstalls the hook
end;
end;
That ensures that I hook and execute the method that I did found and multiple hooks do work. Maybe madCodeHook does only work when the method isn't hook already?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
After install Version Insight Plus Setup 8 Beta the TwineCompile 3.3.1.231 stop working correctly.
When I try to make or rebuild project standard compiler is used instead of twine compile.
http://www.jomitech.com/forums/viewtopic.php?f=8&t=2349&p=5160#p5160
Any help appreciated.
Best Regards
macma
The DesignIDEPro package does hook @Projectgroupbuilder@BuildProjects$qqrp29Projectintf@TProjectBuildListrx22Compintf@TBuildControl
in the coreide package (coreide150.bpl/coreide160.bpl). Maybe the TwineCompile issue is related to that. I can install multiple plugins that hook that method and all do work correctly.
In order to find out if that hook is the reason for the TwineCompile failure you could modify the @Projectgroupbuilder@BuildProjects$qqrp29Projectintf@TProjectBuildListrx22Compintf@TBuildControl string with a hex editor in designidepro150.bpl/designidepro160.bpl. Note it is an unicode string and changing a single char of it would be enough to prevent that hook from being installed.
Hi,
I did what You suggest and TwineCompile start to work. I try to forward Your suggestion to JomiTech maybe they will find the issue.
Best Regards,
macma
TwineCompile hooks that method using madCodeHook. What hooking method do you use to hook it?
Also, in your hook method, do you call the original method based on the address read, or the stored address of the original function? I'm just wondering if your hook method is calling the IDE's function directly instead of calling the hook that TwineCompile places there.
Jon
I am hooking it with a jump at the beginning of the method at it's original address. The method itself looks like this
function NewProjectgroupbuilderBuildProjects(ProjectBuildList: TObject; const BuildControl: TBuildControl): Boolean;
begin
CodeRestore(HookProjectgroupbuilderBuildProjects);//<- this restores the original bytes at the beginning of the method
try
Result := OrgProjectgroupbuilderBuildProjects(ProjectBuildList, BuildControl);
finally
CodeRedirect(@OrgProjectgroupbuilderBuildProjects, @NewProjectgroupbuilderBuildProjects,
HookProjectgroupbuilderBuildProjects);//<- reinstalls the hook
end;
end;
That ensures that I hook and execute the method that I did found and multiple hooks do work. Maybe madCodeHook does only work when the method isn't hook already?