CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2001
    Location
    Maine
    Posts
    15

    Using Remote API Calls With VB

    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.


  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: Using Remote API Calls With VB

    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





Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured