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




Reply via email to