Prüfen ob bestimmte Dll registriert wurde

  • VB6

Es gibt 1 Antwort in diesem Thema. Der letzte Beitrag () ist von Mad Andy.

    Prüfen ob bestimmte Dll registriert wurde

    Hallo,

    ich habe da eine wichtige Frage zu Dlls...

    Ich benötige die DSOFile.dll welche es in zwei sich unterscheidenen Versionen gibt.

    Ich muss damit rechnen das auf dem Client Rechner, auf dem mein Tool ausgeführt wird nur eine von beiden Versionen registriert ist.

    Wie kann ich nun herrausfinden, welche bzw ob eine bestimmte Dll Datei Registriert wurde... um dann jenach Version eine andere Funktion aufrufen kann....

    Vielleicht geht das auch irgendwie anders, nämlich mit dem On Error GoTo aber weiß nicht wie....

    Ich poste einfach mal den Quellcode....


    Visual Basic-Quellcode

    1. '---------- DSOFile.dll 1.4.07 (alt)-------------
    2. Dim DSOReader As Object
    3. Dim DSODocument As Object
    4. Dim SummProps As Object
    5. Dim objProperty As Object
    6. Set DSOReader = CreateObject("DSOleFile.PropertyReader")
    7. Set DSODocument = DSOReader.GetDocumentProperties(file)
    8. Set SummProps = DSODocument.CustomProperties
    9. 'For Each objProperty In SummProps
    10. ' MsgBox (objProperty.Value)
    11. 'Next
    12. Set DSODocument = Nothing
    13. Set DSOReader = Nothing
    14. Set objFile = Nothing
    15. Set SummProps = Nothing
    16. '-----------------------
    17. '--------- DSOFile.dll 2.1.2841 (neu)--------------
    18. 'Dim DSODocument As Object
    19. 'Dim SummProps As Object
    20. 'Dim objProperty As Object
    21. 'Dim objFile As Object
    22. Set objFile = CreateObject("DSOFile.OleDocumentProperties")
    23. objFile.Open (file)
    24. Set SummProps = objFile.CustomProperties
    25. 'For Each objProperty In SummProps
    26. ' MsgBox (objProperty.Value)
    27. 'Next
    28. objFile.save
    29. '-----------------------