How do I read LoggingPath (for modem) in the directory HKey_Local_M...

How do I read LoggingPath (for modem) in the directory


HKey_Local_MachineSystemCurrentControlSetServicesClassModem000 ?


Thank you in advance,

Andras


Comments

  • If you are trying to read the registry, you will need to use the Win32 API calls the registry functions.


    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





Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories