Function Whatever() As Dictionary
#if TargetWin32
Declare Function CBIOS_GetBoxInfoAdvI Lib "CBIOSVB6.Dll" alias "CBIOS_VB6_GetBoxInfoAdvI"_
(iCount as Integer, stInfo as Ptr) as integer
Dim stInfo As MemoryBlock
Dim iCount, OSErr As Integer
Dim ReturnDict As New Dictionary
iCount = [Whatever]
stInfo = NewMemoryBlock(-- number of bytes required --)
OSErr = CBIOS_GetBoxInfoAdvI(iCount, stInfo)
ReturnDict.Value("OSErr") = OSErr
ReturnDict.Value("stInfo") = stInfo
// Set most values from the memoryblock
ReturnDict.Value("dwBoxName") = stInfo.Long(0)
ReturnDict.Value("dwModel") = stInfo.Long(4)
ReturnDict.Value("dwApp") = stInfo.Long(8)
ReturnDict.Value("wCBIOS") = stInfo.Long(12)
ReturnDict.Value("bAppPolicy") = stInfo.Byte(16)
ReturnDict.Value("bLogin") = stInfo.Byte(17)
ReturnDict.Value("bHiVersion") = stInfo.Byte(18)
ReturnDict.Value("bLoVersion") = stInfo.Byte(19)
ReturnDict.Value("dwRAMLen") = stInfo.Long(20)
ReturnDict.Value("dwSize_RAM1") = stInfo.Long(24)
ReturnDict.Value("dwSize_RAM2") = stInfo.Long(28)
ReturnDict.Value("dwSize_RAM3") = stInfo.Long(32)
// for
// bBoxLabel As String * CBIOS_LABEL_LEN ' Box label
// dwDeveloperID As Long ' DevelpoerID
// bMPI As Byte ' MPI flag
// I'd need CBIOS_LABEL_LEN to calculate the rest
Return ReturnDict
#Endif
End Function