Do you have an other method?
Thank you.
----- 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
- Visit your group "delphi-en" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

