Data Grid and ADO controls

Data Grid and ADO controls

does any know how to define argument $ARG1 in following subroutine? i have to set data source for datagrid control (i already did it on the dialog but i do not get data from database).

this part works...
lret= DlgGet(dlg,IDC_ADO,ado,DLG_IDISPATCH)
lret= DlgGet(dlg,IDC_DATAGRID,dgrid,DLG_IDISPATCH)

and i have to set IDC_ADO for Data Source for datagrid control, but i do not know how to get $ARG1.
i think that $OBJECT should be variable dgrid.

this function is from module wizard:

SUBROUTINE IDataGrid_SetDataSource($OBJECT,$ARG1,$STATUS)
!DEC$ ATTRIBUTES DLLEXPORT :: IDataGrid_SetDataSource
IMPLICIT NONE
INTEGER(INT_PTR_KIND()), INTENT(IN) :: $OBJECT
! Object Pointer
!DEC$ ATTRIBUTES VALUE :: $OBJECT
INTEGER(INT_PTR_KIND()), INTENT(IN) :: $ARG1 !IUnknown
!DEC$ ATTRIBUTES REFERENCE :: $ARG1
INTEGER(4), INTENT(OUT), OPTIONAL :: $STATUS ! Method status
!DEC$ ATTRIBUTES REFERENCE :: $STATUS
INTEGER(4) $$STATUS
INTEGER(INT_PTR_KIND()) invokeargs
invokeargs = AUTOALLOCATEINVOKEARGS()

CALL AUTOADDARG(invokeargs, 'DataSource',$ARG1,UTO_ARG_IN, VT_UNKNOWN)

$$STATUS = AUTOSETPROPERTYBYID($OBJECT, 42, invokeargs)

IF (PRESENT($STATUS)) $STATUS = $$STATUS
CALL AUTODEALLOCATEINVOKEARGS (invokeargs)

END SUBROUTINE IDataGrid_SetDataSource

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.