[API]
LocalFree

[INCLUDE]
PeekS
LocalAllocFromString

[DEFINE]
Private ctSSLayer_GetDeviceNameInt As Long
Private ctSSLayer_GetDeviceSSLIDInt As Long

[CODE]
Public Function ctSSLayer_GetDeviceFromSSLID(ByVal DeviceSSLID As String) As Long
  Dim xLong1 As Long

  If IsUnicode Then
    ctSSLayer_GetDeviceFromSSLID = CallFunction_Indirect(hModul, "ctSSLayer_GetDeviceFromSSLIDW", StrPtr(DeviceSSLID))
    Else
    xLong1 = LocalAllocFromString(DeviceSSLID)
    If Not xLong1 = 0& Then
      ctSSLayer_GetDeviceFromSSLID = CallFunction_Indirect(hModul, "ctSSLayer_GetDeviceFromSSLIDA", xLong1)
      Call LocalFree(xLong1)
      End If
    End If
  End Function

Public Function ctSSLayer_GetDeviceName(ByVal DeviceID As Long, ByRef Flags As Long) As String
  ctSSLayer_GetDeviceName = PeekS(CallFunction_Fast(ctSSLayer_GetDeviceNameInt, DeviceID, VarPtr(Flags)))
  End Function

Public Function ctSSLayer_GetDeviceSSLID(ByVal DeviceID As Long) As String
  ctSSLayer_GetDeviceSSLID = PeekS(CallFunction_Fast(ctSSLayer_GetDeviceSSLIDInt, DeviceID))
  End Function

#If ctSSLayer_RefreshDeviceList Then
  Public Function ctSSLayer_RefreshDeviceList(ByVal hWnd As Long)
    ctSSLayer_RefreshDeviceList = CallFunction_Indirect(hModul, "ctSSLayer_RefreshDeviceList", hWnd)
    End Function
  #End If