Unfortunately D6 'Rio.pas' unit is not fully Windows XP SP2 compatible.
Below is a patch - that seem to work for me - that fixes the AccessViolation
that would normally occur.. (If NX is enabled)
Thanks,
Willi
--- D:\dev\clxpatches\soap.orig\SOAP\Rio.pas Mon Mar 08 20:10:22 2004
+++ D:\dev\clxpatches\soap.001\SOAP\Rio.pas Tue Aug 10 22:11:52 2004
@@ -260,9 +260,17 @@
{ Allocate two blocks - one for the vtable itself, one for }
{ the thunks. }
GetMem(IntfTable, (Length(IntfMD.MDA) + NumEntriesInIInterface) * 4);
IntfTableP := @IntfTable;
+
+ { TODO -owilli -cpatch : windows xp NX patch }
+ {$IFDEF MSWINDOWS}
+ IntfStubs := Virtualalloc (Nil,(Length( IntfMD.MDA) +
NumEntriesInIInterface) * StubSize,MEM_COMMIT,PAGE_EXECUTE_READWRITE);
+ {$ENDIF}
+ {$IFDEF LINUX}
GetMem(IntfStubs, (Length( IntfMD.MDA) + NumEntriesInIInterface) *
StubSize );
+ {$ENDIF}
+
{ Load the IUnknown vtable entries }
VTable := PPointer(IntfTable);
Crack.QIFn := QueryInterface;
@@ -372,10 +380,18 @@
destructor TRIO.Destroy;
begin
if IntfTable <> nil then
FreeMem(IntfTable);
+
+ { TODO -owilli -cpatch : windows xp NX patch }
if IntfStubs <> nil then
- FreeMem(IntfStubs);
+ {$IFDEF MSWINDOWS}
+ Virtualfree (IntfStubs,0,MEM_RELEASE);
+ {$ENDIF}
+ {$IFDEF LINUX}
+ FreeMem(IntfStubs);
+ {$ENDIF}
+
if FContext <> nil then
FContext.Free;
inherited;
end;