Click to See Complete Forum and Search --> : Using Remote API Calls With VB


Drew A
September 5th, 2001, 10:18 AM
I am having trouble with this one RAPI call to my CE device. The call is CeRapiInvoke from the rapi.dll I keep getting invalid parameter returned when I try to use this call. My Declare is as follows:
[Declare Function CeRapiInvoke Lib "rapi.dll" ( _
ByVal pDllPath As String, _
ByVal pFunctionName As String, _
ByVal cbInput As Long, _
ByVal pInput As Long, _
ByVal pcbOutput As Long, _
ByVal ppOutput As Long, _
ByVal ppIRAPIStream As Long, _
ByVal dwReserved As Long) As Long]
I believe the error is with the ppOutput argument of the function. Thanks in advance for any help.

DSJ
September 5th, 2001, 10:37 AM
I think the pInput and ppOutput need to be defined as Byte ie...


[Declare Function CeRapiInvoke Lib "rapi.dll" ( _
byval pDllPath as string, _
byval pFunctionName as string, _
byval cbInput as Long, _
byval pInput as Byte, _
byval pcbOutput as Long, _
byval ppOutput as Byte, _
byval ppIRAPIStream as Long, _
byval dwReserved as Long) as Long]




cbInput would then have to be the len of pInput as in


dim pInput(100) as byte
dim cbInput as long
cbInput = 100