Changeset 19743 in vbox
- Timestamp:
- May 15, 2009 2:45:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/tstXPCOMCCall.c
r19728 r19743 48 48 int volatile g_refcount = 0; 49 49 50 /* #define for printing nsID type UUID's */ 51 52 #define printUUID(iid) \ 53 {\ 54 printf(#iid ": {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",\ 55 (unsigned)(iid)->m0,\ 56 (unsigned)(iid)->m1,\ 57 (unsigned)(iid)->m2,\ 58 (unsigned)(iid)->m3[0],\ 59 (unsigned)(iid)->m3[1],\ 60 (unsigned)(iid)->m3[2],\ 61 (unsigned)(iid)->m3[3],\ 62 (unsigned)(iid)->m3[4],\ 63 (unsigned)(iid)->m3[5],\ 64 (unsigned)(iid)->m3[6],\ 65 (unsigned)(iid)->m3[7]);\ 66 }\ 67 50 68 /** 51 69 * Callback functions … … 246 264 { 247 265 IConsoleCallback *that = (IConsoleCallback *)pThis; 266 const nsID ivirtualboxCallbackUUID = IVIRTUALBOXCALLBACK_IID; 248 267 249 268 /* match iid */ 250 ++g_refcount; 251 printf("QueryInterface: %d\n", g_refcount); 252 *resultp = that; 253 return NS_OK; 269 if (memcmp(iid, &ivirtualboxCallbackUUID, sizeof(nsID)) == 0) 270 { 271 ++g_refcount; 272 printf("QueryInterface: %d\n", g_refcount); 273 *resultp = that; 274 return NS_OK; 275 } 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 } 254 283 } 255 284
Note:
See TracChangeset
for help on using the changeset viewer.