A while ago, Nic kindly came up with an answer to my query about a callback
proceedure. Well today I implimented the procs as below.
The callback works, but it causes an access violation error, and that is
with NOTHING being done in the callback proc at all - it should just go
there and return. But in going to the call (and it does reach it) and
returning, there is some violation.
Could it be that stdcall is expecting something to be returned??
the docs say that Stdcall is a function, but recommend using it.
Any suggestions appreciated.
> Type TMyClass = class
>   procedure mycallback;
> end;
> var
>   myclass : TMyClass;
> implementation
> procedure TMyClass.myCallBack;
> begin
>   //do whatever - you need to add params no doubt.
> end;
> procedure CallBack;stdcall;
> begin
>   myClass.myCallBack; //just throw it into the object for more
> processing
> //you could do it all here, tho....
> end;

> initilization
>   myClass := TMyClass.Create;
> end.

    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to