1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Public Declare Function GetAllPumpItem Lib "NomDll.dll" (ByVal Index as Long) as Long
Private Function Get_AllPumpItem(Index As Long) As String
Dim lPnt As Long
lPnt = GetAllPumpItem(Index)
Get_AllPumpItem = PtrToStrW(lPnt)
End Function
Private Function PtrToStrW(ByVal nStrPtr As Long) As String
Dim sString As String
Dim nStrlen As Long
sString = ""
If nStrPtr <> 0 Then
nStrlen = lstrlenW(nStrPtr) * 2
If nStrlen > 0 Then
sString = String(nStrlen, " ")
Call lstrcpyW(sString, nStrPtr)
End If
End If
PtrToStrW = StrConv(sString, vbFromUnicode)
End Function |
Partager