Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
pguajardo Absent Member.
Absent Member.
1680 views

activex data mapping

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

 

 

Tags (1)
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: activex data mapping

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

0 Likes
pguajardo Absent Member.
Absent Member.

RE: activex data mapping

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......

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.