VirtualBox

Changeset 19751 in vbox


Ignore:
Timestamp:
May 15, 2009 5:41:03 PM (16 years ago)
Author:
vboxsync
Message:

tstXPCOMCCall.c: some query interface help.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/cbinding/tstXPCOMCCall.c

    r19743 r19751  
    263263static nsresult QueryInterface(nsISupports *pThis, const nsID *iid, void **resultp)
    264264{
    265     IConsoleCallback *that = (IConsoleCallback *)pThis;
    266     const nsID ivirtualboxCallbackUUID = IVIRTUALBOXCALLBACK_IID;
     265    static const nsID ivirtualboxCallbackUUID = IVIRTUALBOXCALLBACK_IID;
     266    static const nsID isupportIID = NS_ISUPPORTS_IID;
    267267
    268268    /* match iid */
    269     if (memcmp(iid, &ivirtualboxCallbackUUID, sizeof(nsID)) == 0)
     269    if (    memcmp(iid, &ivirtualboxCallbackUUID, sizeof(nsID)) == 0
     270        ||  memcmp(iid, &isupportIID, sizeof(nsID)) == 0)
    270271    {
    271272        ++g_refcount;
    272273        printf("QueryInterface: %d\n", g_refcount);
    273         *resultp = that;
     274        *resultp = pThis;
    274275        return NS_OK;
    275276    }
    276     else
    277     {
    278         printf("vboxCallback QueryInterface didn't find a matching interface\n");
    279         printUUID(iid);
    280         printUUID(&ivirtualboxCallbackUUID);
    281         return NS_NOINTERFACE;
    282     }
     277
     278    printf("vboxCallback QueryInterface didn't find a matching interface\n");
     279    printUUID(iid);
     280    printUUID(&ivirtualboxCallbackUUID);
     281    return NS_NOINTERFACE;
    283282}
    284283
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette