|
-
September 19th, 2001, 02:48 PM
#1
Re; Remote API calls with VB
I'm trying to use this rapi function to execute a dll on my remote machine. I've been able to run the dll with a C++ program but not with my VB program. I don't need to pass in any arguments its the matter of getting the return value from the dll in this pcbOutput variable. In C all I have to do is this:
DWORD cbOutput;
PBYTE pOutput;
HRESULT hres = CeRapiInvoke(L"\\FFX1\\HwRev", L"RaeGetHw", 0, 0, &cbOutput, &pOutput, NULL, 0);
But in VB I have this so far:
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
private Sub Command2_Click()
Dim lret as Long
Dim FilePath as string
Dim FileName as string
Dim ppOutput(100) as Byte
Dim pcbOutput as Long
Dim findData as CE_FIND_DATA
pcbOutput = 100
'Initialize RAPI
FileSelBackupCEInit
FilePath = "FFX1\HwRev.dll"
FileName = "RaeGetHw"
lret = CeFindFirstFile(FilePath, findData)
lret = CeRapiInvoke(FilePath, FileName, 0, 0, pcbOutput, ppOutput, 0, 0)
FileSelBackupCEUnInit
End Sub
any help would be trully appreciated
Thanks Drew A
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|