Access violation in Win98
From: Johan Smit (smitjsno_at_spamlantic.net)
Date: 09/28/04
- Previous message: Rob Kennedy: "Re: IdFTP, Threads and TTimer?"
- Next in thread: L D Blake: "Re: Access violation in Win98"
- Reply: Jamie: "Re: Access violation in Win98"
- Reply: AlanGLLoyd: "Re: Access violation in Win98"
- Reply: J French: "Re: Access violation in Win98"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 05:49:37 GMT
Hi,
In Delphi5, I do the following:
Type TTwoPChar = Procedure(Char1, Char2 : PChar);stdcall;
..
procedure TfrmMain.PlugsClick(Sender: TObject);
var TwoPChar : TTwoPChar;
begin
..
TheDLL := LoadLibrary(PChar(str));
if GetProcAddress(TheDLL,'ExecuteProcess') <> nil then begin
@TwoPChar := GetProcAddress(TheDLL,'ExecuteProcess');
TwoPChar(PChar(aStr), PChar(InitDir));
end;
end;
This works fine in Windows XP,
but if the app is run in Win98, there is an access violation on
executing the line
TwoPChar(PChar(aStr), PChar(InitDir));
What could I possibly do about it?
Thank you
Johan Smit
- Previous message: Rob Kennedy: "Re: IdFTP, Threads and TTimer?"
- Next in thread: L D Blake: "Re: Access violation in Win98"
- Reply: Jamie: "Re: Access violation in Win98"
- Reply: AlanGLLoyd: "Re: Access violation in Win98"
- Reply: J French: "Re: Access violation in Win98"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]