Skip to main content

I am connecting to Micro Focus Rumba ObjectX Pro Control Container (Web based TN3270 emulator) version 6 using WHLLAPI. While I am able to connect, copy string to PS, copy PS to string etc. certain APIs are failing.

 

Failing APIs are 

99 (Convert) - convert row column, to position

32 (FindFieldLength) - Find field length. 

 

My observation is that that APIs which require character(s) as input, does not. The API connection input/output details (for both working and not-working APIs are provided below. Any help to resolve this will be highly appreciated. 

 

WinHLLAPIStartup()
Return code: 0 (WHLLOK)
Version: 1.0
Description: Wall Data Incorporated

Function: 1 (ConnectPresentationSpace)
Input string: 41 A
Input length: 1
Return code: 1 (WHLLNOTCONNECTED)

Function: 1 (ConnectPresentationSpace)
Input string: 41 A
Input length: 1
Return code: 0 (WHLLOK)

Function: 15 (CopyStringToPresentationSpace)
Input string: 48656C6C6F Hello
Input length: 5
Input PS pos.: 250
Return code: 0 (WHLLOK)

Function: 7 (QueryCursorLocation)
Return length: 321
Return code: 0 (WHLLOK)

Function: 99 (Convert)
Input string: 4152 AR
Input length: 2
Input PS pos.: 1
Return length: 2
Return code: 9999 (WHLLINVALIDRC)

Function: 32 (FindFieldLength)
Input string: 4E50 NP
Input PS pos.: 1
Return length: 2
Return code: 2 (WHLLPARAMETERERROR)

 


#Rumba

I am connecting to Micro Focus Rumba ObjectX Pro Control Container (Web based TN3270 emulator) version 6 using WHLLAPI. While I am able to connect, copy string to PS, copy PS to string etc. certain APIs are failing.

 

Failing APIs are 

99 (Convert) - convert row column, to position

32 (FindFieldLength) - Find field length. 

 

My observation is that that APIs which require character(s) as input, does not. The API connection input/output details (for both working and not-working APIs are provided below. Any help to resolve this will be highly appreciated. 

 

WinHLLAPIStartup()
Return code: 0 (WHLLOK)
Version: 1.0
Description: Wall Data Incorporated

Function: 1 (ConnectPresentationSpace)
Input string: 41 A
Input length: 1
Return code: 1 (WHLLNOTCONNECTED)

Function: 1 (ConnectPresentationSpace)
Input string: 41 A
Input length: 1
Return code: 0 (WHLLOK)

Function: 15 (CopyStringToPresentationSpace)
Input string: 48656C6C6F Hello
Input length: 5
Input PS pos.: 250
Return code: 0 (WHLLOK)

Function: 7 (QueryCursorLocation)
Return length: 321
Return code: 0 (WHLLOK)

Function: 99 (Convert)
Input string: 4152 AR
Input length: 2
Input PS pos.: 1
Return length: 2
Return code: 9999 (WHLLINVALIDRC)

Function: 32 (FindFieldLength)
Input string: 4E50 NP
Input PS pos.: 1
Return length: 2
Return code: 2 (WHLLPARAMETERERROR)

 


#Rumba

Hi subinp,

the following code works for me.

Private Declare Function WinHLLAPIStartup Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\system\\WHLLAPI.DLL" (ByVal Version%, ByVal Buffer$) As Long
Private Declare Function WinHLLAPI Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\system\\WHLLAPI.DLL" (Func%, ByVal Buffer$, bSize%, RetC%) As Long
Private Declare Function WinHLLAPICleanup Lib "C:\\Program Files (x86)\\Micro Focus\\RUMBA\\system\\WHLLAPI.DLL" () As Long

Sub Test()

ShortNameIndex = 257
ShortNameList = Space(100)
WinHLLAPIStartup ShortNameIndex, ShortNameList

Func = 1 '(ConnectPresentationSpace)
Astr = "M"
Alen = 1
WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Func " & Func & ": RetC = " & RetC

Func = 15 '(CopyStringToPresentationSpace)
Astr = "Hello"
Alen = Len(Astr)
RetC = 740

WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Func " & Func & ": RetC = " & RetC

Func = 7 '(QueryCursorLocation)
Astr = ""
Alen = 0
WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Func " & Func & ": Alen = " & Alen & ", RetC = " & RetC
Arow = Int(Alen / 80) 1
Acol = Alen Mod 80
MsgBox "Row = " & Arow & ", Col = " & Acol

Func = 99 '(Convert)
Astr = "MP" 'Convert to Row Col
RetC = Alen 'Position
Alen = &H0
WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Via Convert: Row = " & Alen & ", Col = " & RetC

Func = 99 '(Convert)
Astr = "MR" 'Convert to Position
RetC = Acol 'Column
Alen = Arow 'Row
WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Via Convert: Position = " & RetC

Func = 32 '(FindFieldLength)
Astr = " " 'Field
RetC = 580 'Position
'Alen = &H0 'Reflection
Alen = 2 'Rumba

WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Func 32, Field Len = " & Alen & ": RetC = " & RetC

Astr = "NP" 'Next Protected Field
RetC = 580 'Position
Alen = 2

WinHLLAPI Func, Astr, Alen, RetC
MsgBox "Func 32, Field Len = " & Alen & ": RetC = " & RetC

Func = 2 '(DisconnectPresentationSpace)
Astr = ""
Alen = 0
WinHLLAPI Func, Astr, Lstr, RetC
MsgBox "Func " & Func & ": RetC = " & RetC

WinHLLAPICleanup
End Sub

Note: I am running Rumba 9.5

You do not mention which version of WebToHost which you are running. The current release is 6.9. You can find details of the supported versions of OnWeb Web to Host at https://supportline.microfocus.com/prodavail.aspx?Prod=OnWeb Web to Host&Ver=99

If you are having a problem getting any of the above to work then you should contact support and request assistance.

 Tom