× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: HLLAPI and how to make VB wrappers-Help required
  • From: "DAVID BULOG" <d2ba@xxxxxxxxxx>
  • Date: Sat, 4 Sep 1999 10:33:39 +1200

Im learning aboubt how to use APIs (In this case HLLAPI) and I have come
unstuck trying to design Functions
and how to use them.The API declarations are correct but the functions are
from copied from 
another vendors HLLAPI system (IBM CA) so the parameters are different.The
Wall data examples are all in C so Im having a hard time trying to
translate in Visual Basic.
I have pasted at the end the required info from the Wall Data help files.
Any help from more experianced programmers would be very welcome.
thanks David

'  WallData APIs
Declare Function WD_ConnectPS Lib "EEHLLAPI.DLL" (ByVal hInstance As
Integer, ByVal lShortName As String) As Integer
Declare Function WD_SendKey Lib "EEHLLAPI.DLL" (ByVal hInstance As Integer,
ByVal lBuffer As String) As Integer

'PN these functions have incorrect parameters--the parameter are for IBM
not Walldata 
Public Function WD_ConnectPS_A(ByVal hInstance As Long, ByVal lShortName As
String) As Integer
    HllFunctionNo = 1
    HllData = lShortName
    HllLength = 4
    HllReturnCode = 0
    dummy& = hllapi&(HllFunctionNo, HllData, HllLength, HllReturnCode)
    WD_ConnectPS = Str$(HllReturnCode)
End Function


Public Function WD_SendKey_A(ByVal hInstance As Long, ByVal lBuffer As
String) As Integer
    HllFunctionNo = 3
    HllData = lBuffer
    HllLength = Len(lBuffer)
    HllReturnCode = 0
    dummy& = hllapi&(HllFunctionNo, HllData, HllLength, HllReturnCode)
    WD_SendKey = Str$(HllReturnCode)
End Function
'***************************************************************************
*******************************
Wall Data equivalent functions are modified from the IBM EHLLAPI convention
to make them easier to use. The Wall Data format uses only the parameters
required to make the function call, and provides a consistent return code
style. Unlike the IBM EHLLAPI format where the return code is part of the
parameter string, the Wall Data EHLLAPI format returns the code as part of
the function.

The IBM format is a standard format that passes four parameters regardless
of how many are needed. The first parameter always specifies the function
being called. The remaining parameters are ignored or used, depending on
the particular function's requirements.

Connect Presentation Space establishes a connection between your EHLLAPI
application and the specified RUMBA session. The screen region of a RUMBA
session is called the presentation space (PS). 
This function is affected by the Set Session Parameters options
CONLOG/CONPHYS. See Remarks for details. 

Prerequisite Function

None.

Wall Data 

WORD WINAPI WD_ConnectPS(HWND Id, LPSTR ShortName);

IBM

VOID WINAPI hllapi(WORD FAR * Function, LPSTR String, WORD FAR * Length,
WORD FAR * ReturnCode);

Call Parameters

Wall Data       IBM     Description

Function        Must be 1.
Id              A unique ID of your application, for example, the instance 
handle.
ShortName       String  The RUMBA session identifier (A-Z). 
        Length  Length of the String parameter (1 is implied).
        ReturnCode      NA

'***************************************************************************
********************************
Send Key sends keystrokes to the connected RUMBA session using a data
string of up to 128 characters. These keystrokes appear to the target
session as if they were entered by a user.
This function is affected by the Set Session Parameters options
AUTORESET/NORESET (default is underlined) and ESC=c. See Remarks for
details.

Prerequisite Function

Connect Presentation Space (1)

Wall Data 

WORD WINAPI WD_SendKey (HWND Id, LPSTR Buffer);

IBM

VOID WINAPI hllapi(WORD FAR * Function, LPSTR String, WORD FAR * Length,
WORD FAR * ReturnCode); 

Call Parameters

Wall Data       IBM     Description

Function        Must be 3.
Id              A unique ID of your application, for example, the instance 
handle.
Buffer          A null-terminated string of up to 128 keystrokes.
        String  A string of up to 128 keystrokes.
        Length  Length of the String parameter. 
        ReturnCode      NA

...

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.