From: Nick Friend on
I have an ActiveX control with an Access that returns a struture
defined like this

STRUCTURE XLSRectangle
MEMBER FromRow AS LONGINT
MEMBER ToRow AS LONGINT
MEMBER FromCol AS LONGINT
MEMBER ToCol AS LONGINT

How do I get this structure back from the access... the VO generated
access is this...

ACCESS Item(;
Index; // AS LONG
) CLASS IRangeRects

LOCAL oMethod AS cOleMethod
LOCAL uRetValue AS USUAL

oMethod := cOleMethod{}
oMethod:symName := String2Symbol("Item")
oMethod:iMemberid := 3
oMethod:wInvokeKind := INVOKE_PROPERTYGET
oMethod:nParams := 1
oMethod:lNamedArgs := FALSE
oMethod:cParamTypes := VTS_I4
oMethod:bRetType := 29

uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())
IF (IsInstanceOfUsual(uRetValue, #IDispatch))
// To use a pre-defined class here,
// change OLEAutoObject to desired class name
uRetValue := OLEAutoObject{uRetValue}
ENDIF

RETURN (uRetValue)

TIA

Nick
From: Nick Friend on
Talking to myself...

I've solved this by simply using a different technique that doesn't
require the use of this method, but I'd still be interested in knowing
how this is done, if anyone knows!

Nick

On 11 June, 17:28, Nick Friend <nicktek...(a)googlemail.com> wrote:
> I have an ActiveX control with an Access that returns a struture
> defined like this
>
> STRUCTURE XLSRectangle
>         MEMBER FromRow AS LONGINT
>         MEMBER ToRow AS LONGINT
>         MEMBER FromCol AS LONGINT
>         MEMBER ToCol AS LONGINT
>
> How do I get this structure back from the access... the VO generated
> access is this...
>
> ACCESS Item(;
>                 Index;          // AS LONG
>                 ) CLASS IRangeRects
>
>         LOCAL oMethod   AS cOleMethod
>         LOCAL uRetValue AS USUAL
>
>         oMethod                 := cOleMethod{}
>         oMethod:symName         := String2Symbol("Item")
>         oMethod:iMemberid       := 3
>         oMethod:wInvokeKind     := INVOKE_PROPERTYGET
>         oMethod:nParams         := 1
>         oMethod:lNamedArgs      := FALSE
>         oMethod:cParamTypes     := VTS_I4
>         oMethod:bRetType        := 29
>
>         uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())
>         IF (IsInstanceOfUsual(uRetValue, #IDispatch))
>         // To use a pre-defined class here,
>         // change OLEAutoObject to desired class name
>                 uRetValue := OLEAutoObject{uRetValue}
>         ENDIF
>
>         RETURN (uRetValue)
>
> TIA
>
> Nick

From: Philippe Mermod on
Hi Nick,

Certainly something like :
- oObj:[Item,"FromRow"]:Value
- oObj:[Item,"ToRow"]:Value
- oObj:[Item,"FromCol"]:Value
- oObj:[Item,"ToCol"]:Value

HTH,

--
Phil Mermod
Crystal Reports Library for Visual Objects
http://www.pkl.ch/dev/


Nick Friend wrote:

> Talking to myself...
>
> I've solved this by simply using a different technique that
> doesn't require the use of this method, but I'd still be
> interested in knowing how this is done, if anyone knows!
>
> Nick
>
> On 11 June, 17:28, Nick Friend <nicktek...(a)googlemail.com>
> wrote:
> > I have an ActiveX control with an Access that returns a
> > struture defined like this
> >
> > STRUCTURE XLSRectangle
> > � � � � MEMBER FromRow AS LONGINT
> > � � � � MEMBER ToRow AS LONGINT
> > � � � � MEMBER FromCol AS LONGINT
> > � � � � MEMBER ToCol AS LONGINT
> >
> > How do I get this structure back from the access... the VO
> > generated access is this...
> >
> > ACCESS Item(;
> > � � � � � � � � Index; � � � � �// AS LONG
> > � � � � � � � � ) CLASS IRangeRects
> >
> > � � � � LOCAL oMethod � AS cOleMethod
> > � � � � LOCAL uRetValue AS USUAL
> >
> > � � � � oMethod � � � � � � � � := cOleMethod{}
> > � � � � oMethod:symName � � � � := String2Symbol("Item")
> > � � � � oMethod:iMemberid � � � := 3
> > � � � � oMethod:wInvokeKind � � := INVOKE_PROPERTYGET
> > � � � � oMethod:nParams � � � � := 1
> > � � � � oMethod:lNamedArgs � � �:= FALSE
> > � � � � oMethod:cParamTypes � � := VTS_I4
> > � � � � oMethod:bRetType � � � �:= 29
> >
> > � � � � uRetValue := SELF:__Invoke(oMethod,
> > DWORD(_BP+16),PCount()) � � � � IF
> > (IsInstanceOfUsual(uRetValue, #IDispatch)) � � � � // To use
> > a pre-defined class here, � � � � // change OLEAutoObject to
> > desired class name � � � � � � � � uRetValue :=
> > OLEAutoObject{uRetValue} � � � � ENDIF
> >
> > � � � � RETURN (uRetValue)
> >
> > TIA
> >
> > Nick