I'm finidng a different way,

but i need to know

a) how to ceonvert a method in a TMethod variable.
b) how to call the method using the TMethod variable.

Thank yuo again.

----- Original Message -----
From: "Rob Kennedy" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, May 16, 2006 9:40 PM
Subject: Re: [delphi-en] Pointers casting


> Mauro Russo wrote:
> > i'm working on Delphi 7.
> >
> >  have a code like that:
> >
> > type TArrayOfPointers = array of Pointer;
> >
> > ...
> >
> > ParamsMethodDLLecov : TArrayOfPointers;
> >
> > ...
> >
> > ParamsMethodDLLecov[0] := @my_int_var; //integer var
> >
> > The question is how to 'go back', to get the value of my_int_var
> > from ParamsMethodDLLecov[0].
>
> The easiest way to "go back" is when you've never left at all. Change your
> array to hold PInteger instead of Pointer.
>
> > I tried
> >
> > type Pinteger = ^integer;
>
> PInteger is already declared for you, either in the System or Windows
unit.
>
> > ParamsMethodDLLecov[0]  as Pinteger
>
> "As" type-casting only works on classes and interfaces. What you need is
> just a regular type-cast.
>
> PInteger(ParamsMethodDLLecov[0])
>
> --
> Rob
>
>
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]




YAHOO! GROUPS LINKS




Reply via email to