Subject:
[ruby-ffi] Newbie ? about porting code from VB to Ruby
From:
JesseFair
Date:
6/6/11 6:09 PM
To:
ruby-ffi

Hi there I am new to Ruby programming and I am trying to port the
below code over to Ruby:



Declare Function WinHLLAPI Lib "\\Wally\WinApps
\SYNAPSE5.32\Whllapi.dll" (lpwFunction As Long, ByVal lpbyString As
Any, lpwLength As Any, lpwReturnCode As Long) As Long


Declare Function WinHLLAPIStartup Lib "\\Wally\WinApps
\SYNAPSE5.32\Whllapi.dll" (ByVal wVersionRequired As Long, lpData As
WHLLAPIDATA) As Long

Public tHLLAPIData As WHLLAPIDATA


Public Type WHLLAPIDATA
    wVersion As Long
    'szDescription(128) As Byte
    szDescription As String * 128
End Type


    VersionRequired = 3
    tHLLAPIData.wVersion = 3

hold = WinHLLAPIStartup(VersionRequired, tHLLAPIData)



Any help would be greatly appreciated.