• Welcome to Theos PowerBasic Museum 2017.

Datacap Controls DSI ClientX OCX

Started by Douglas Martin, August 03, 2009, 08:24:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Douglas Martin

What is the syntax for calling a member of an OCX control?

I got the following code gerenated from PBROW.

I added

GLOBAL PTCLIENT as DSICLIENTXDSICLientX

' ------------------------------------------------------------
' Library Name:      DSICLientX ActiveX Control module 3.0
' Library File:      D:\WINDOWS\DatacapControls\DSICLientX.ocx
' ------------------------------------------------------------
' Version Info:
' -------------
' Comments:         
' Company Name:      Datacap Systems, Inc.
' File Description:  DSICLientX ActiveX Control Module
' File Version:      3.60
' Internal Name:     DSICLientX
' Legal Copyright:   Copyright (C) 2002-2006
' Legal Trademarks: 
' Original Filename: DSICLientX.OCX
' Private Build:     
' Product Name:      DSICLientX ActiveX Control Module
' Product Version:   3.60
' Special Build:     
' ------------------------------------------------------------
' ProgID:            DSICLIENTX.DSICLientXCtrl.
' Interface Name:    DSICLIENTXDSICLientX (Control)
'
' Interface Prefix:  DSICLIENTX
' ------------------------------------------------------------

$PROGID_DSICLIENTXDSICLientXCtrl = "DSICLIENTX.DSICLientXCtrl."


Interface Dispatch DSICLIENTXDSICLientX   ' (Control)
    Member Call ProcessTransaction<&H00000001>(XMLCommand As String<&H00000000>, ProcessControl As Integer<&H00000001>, ClientServerPassword As String<&H00000002>, UserTraceData As String<&H00000003>) As String
    Member Call ServerIPConfig<&H00000002>(HostList As String<&H00000000>, ProcessControl As Integer<&H00000001>) As String
    Member Call PingStoredServerList<&H00000003>(IpPort As String<&H00000000>, ProcessControl As Integer<&H00000001>) As String
    Member Call CancelRequest<&H00000004>()
    Member Call GetIPAddressFromHostName<&H00000005>(HostName As String<&H00000000>, ProcessControl As Integer<&H00000001>) As String
    Member Call PingServer<&H00000006>(IpAddress As String<&H00000000>, IpPort As String<&H00000001>, ProcessControl As Integer<&H00000002>) As String
    Member Call SetConnectTimeout<&H00000007>(Timeout As Integer<&H00000000>) As Integer
    Member Call SetResponseTimeout<&H00000008>(Timeout As Integer<&H00000000>) As Integer
    Member Call ProcessCanadianTransaction<&H00000009>(XMLCommand As String<&H00000000>, ProcessControl As Integer<&H00000001>, ClientServerPassword As String<&H00000002>, UserTraceData As String<&H00000003>) As String
End Interface

Doug

José Roca

 
Well, you seem to be using an old version of the compiler (7x or 8x), therefore you need to use OBJECT CALL and use variants for the parameters.

Douglas Martin

We are still using PB8.  I did get the following code to work in case anyone else is interested.

  LOCAL vEdstr AS variant
  LOCAL PTDSICLient AS DISPATCH
  LOCAL vOne AS variant
  LOCAL vTwo AS variant
  LOCAL vThree AS variant
  LOCAL vFour AS variant
  LOCAL vFive AS variant
  LOCAL EdStr$
  vOne= XMLStr   '"g1.mercurypay.com"
  vTwo=1
  vThree=""
  vFour=""
  vFive=""
  LET PTDSICLient = NEW DISPATCH IN "DSICLIENTX.DSICLientXCtrl."

  OBJECT CALL PTDSICLient.ProcessTransaction (vOne, vTwo, vThree, vFour) TO vFive
Doug