HKey_Local_MachineSystemCurrentControlSetServicesClassModem000 ?
Thank you in advance,Andras
example - uses regcreatekey but should use regopenkey
Private Sub GetRegValue(hRootKey As Long, sSubKey As String, sKeyName As String, sKeyValue As String)On Error Resume Next
Dim hSubKey, lrc, lValueLength, lValueType As LongDim sValue, sTemp As String
'Open Key that contains value to readlrc = RegCreateKey(hRootKey, sSubKey, hSubKey)
'Get the value from the registrysValue = String$(1024, 0)sTemp = CStr(sValue)lValueLength = 1024lrc = RegQueryValueEx(hSubKey, sKeyName, 0, lValueType, sTemp, lValueLength)
If lrc = 0 Then lValueLength = lValueLength - 1 sKeyValue = Left(sTemp, lValueLength)Else sKeyValue = ""End If
'close keylrc = RegCloseKey(hSubKey)
End Sub
then in you code call the function -
Dim Path As StringCall GetRegValue(HKEY_LOCAL_MACHINE, "SystemCurrentControlSetServicesClassModem", "0000", Path)
: How do I read LoggingPath (for modem) in the directory
: HKey_Local_MachineSystemCurrentControlSetServicesClassModem000 ?
: Thank you in advance,: Andras
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
example - uses regcreatekey but should use regopenkey
Private Sub GetRegValue(hRootKey As Long, sSubKey As String, sKeyName As String, sKeyValue As String)
On Error Resume Next
Dim hSubKey, lrc, lValueLength, lValueType As Long
Dim sValue, sTemp As String
'Open Key that contains value to read
lrc = RegCreateKey(hRootKey, sSubKey, hSubKey)
'Get the value from the registry
sValue = String$(1024, 0)
sTemp = CStr(sValue)
lValueLength = 1024
lrc = RegQueryValueEx(hSubKey, sKeyName, 0, lValueType, sTemp, lValueLength)
If lrc = 0 Then
lValueLength = lValueLength - 1
sKeyValue = Left(sTemp, lValueLength)
Else
sKeyValue = ""
End If
'close key
lrc = RegCloseKey(hSubKey)
End Sub
then in you code call the function -
Dim Path As String
Call GetRegValue(HKEY_LOCAL_MACHINE, "SystemCurrentControlSetServicesClassModem", "0000", Path)
: How do I read LoggingPath (for modem) in the directory
: HKey_Local_MachineSystemCurrentControlSetServicesClassModem000 ?
: Thank you in advance,
: Andras