Einzelnen Beitrag anzeigen

Benutzerbild von Orakel-von-Delphi
Orakel-von-Delphi

Registriert seit: 27. Jan 2004
Ort: Mittelhessen
45 Beiträge
 
Delphi 2007 Professional
 
#1

Fehler 0x8007007E bei CoCreateInstance

  Alt 28. Mär 2009, 12:47
Hallo Gemeinde !

Ich bei komme einen Fehler 0x8007007E beim Aufruf von CoCreateInstance:

Code:
.
.
.
    HRESULT hResult;
    IShellDispatch *pISD;
.
.
.
    CoInitialize(NULL);

    CLSID clsID;
    if (SUCCEEDED(hResult = ::CLSIDFromProgID(L"Shell.Application", &clsID)))
    {
        hResult = CoCreateInstance(clsID, NULL, CLSCTX_INPROC_SERVER, IID_IShellDispatch, (void **)&pISD);

        if (SUCCEEDED(hResult) && pISD != NULL)
        {
            .
            .
            .
        }
        else
        {
            printf ("CoCreateInstance fails with 0x%8.8X.\n", hResult);
        }
    }
    else
    {
        printf ("Could not get CLSID (0x%8.8X).\n", hResult);
    }

    CoUninitialize();
.
.
.
Auf einer anderen XP Maschine läuft der Code. Reparatur Tools haben an der Registry (auch solche die Geld kosten) versagt. Was kann denn noch die Ursache für das Problem sein ???
Michael
  Mit Zitat antworten Zitat