Skip to main content

activex data mapping

  • August 24, 2012
  • 3 replies
  • 0 views

how I can translate this definition of variables in a VB6 ActiveX dll

Public Response Type
     Rcode As Integer
     Response As String
     Additional As String
     As Long RespLength
End Type

 

 


#activexdatamapping

3 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • August 27, 2012

how I can translate this definition of variables in a VB6 ActiveX dll

Public Response Type
     Rcode As Integer
     Response As String
     Additional As String
     As Long RespLength
End Type

 

 


#activexdatamapping

A Guide to Interoperating with ACUCOBOL-GT ... Chapter 3: Working with Windows Technologies > 3.5 Accessing the Windows API > 3.5.3 Calling a Windows API function from ACUCOBOL-GT or

Chapter 4: Using ActiveX Controls and COM Objects > 4.3 Properties, Styles, and Methods >

4.3.2 Using COBOL Data Types as ActiveX and COM Object Parameters

Rcode is VT_I4 is a 4-byte signed integer.

Response and Additional  ... 1.You must terminate any strings that you pass to a function. Use x"00" (LOW-VALUES) as in the following examples:

STRING "My example" LOW-VALUES DELIMITED BY SIZE INTO

target-string.

or

INSPECT target-string REPLACING TRAILING SPACES BY

x"00".

Resplength ...

long, int

PIC X(4) COMP-N

or

PIC S9(9) COMP-5

4 bytes


  • Author
  • Rocketeer
  • 19312 replies
  • August 27, 2012

how I can translate this definition of variables in a VB6 ActiveX dll

Public Response Type
     Rcode As Integer
     Response As String
     Additional As String
     As Long RespLength
End Type

 

 


#activexdatamapping

variable definition

      01 Estado-FiscalKC4.

         02 Estado-FiscalKC4-Rcode       PIC X(4) COMP-N.

         02 Estado-FiscalKC4-Response    pic  x(80).

         02 Estado-FiscalKC4-Adicional   pic  x(80).

         02 Estado-FiscalKC4-RespLength  PIC X(4) COMP-N.

Initialize data

          inspect Estado-FiscalKC4-Response    

                  REPLACING TRAILING SPACES BY x"00".

          inspect Estado-FiscalKC4-Adicional  

                 REPLACING TRAILING SPACES BY x"00".

or

   move low-values to Estado-FiscalKC4.

function call

          Modify handle-fiscalKC4 FiscalKC4_OpenPort

                 (puerto-com, write-log )

                 returning Estado-FiscalKC4.

Does not work, still says wrong types......


  • Author
  • Rocketeer
  • 19312 replies
  • August 27, 2012

how I can translate this definition of variables in a VB6 ActiveX dll

Public Response Type
     Rcode As Integer
     Response As String
     Additional As String
     As Long RespLength
End Type

 

 


#activexdatamapping

variable definition

      01 Estado-FiscalKC4.

         02 Estado-FiscalKC4-Rcode       PIC X(4) COMP-N.

         02 Estado-FiscalKC4-Response    pic  x(80).

         02 Estado-FiscalKC4-Adicional   pic  x(80).

         02 Estado-FiscalKC4-RespLength  PIC X(4) COMP-N.

Initialize data

          inspect Estado-FiscalKC4-Response    

                  REPLACING TRAILING SPACES BY x"00".

          inspect Estado-FiscalKC4-Adicional  

                 REPLACING TRAILING SPACES BY x"00".

or

   move low-values to Estado-FiscalKC4.

function call

          Modify handle-fiscalKC4 FiscalKC4_OpenPort

                 (puerto-com, write-log )

                 returning Estado-FiscalKC4.

Does not work, still says wrong types......