Changeset 19081 in vbox for trunk/src/VBox
- Timestamp:
- Apr 21, 2009 2:17:41 PM (16 years ago)
- Location:
- trunk/src/VBox/Main/cbinding
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/cbinding/VBoxXPCOMC.cpp
r19078 r19081 77 77 78 78 static void 79 VBoxComInitialize(IVirtualBox **virtualBox, ISession **session) 79 VBoxComInitialize(const char *pszVirtualBoxIID, IVirtualBox **ppVirtualBox, 80 const char *pszSessionIID, ISession **ppSession) 80 81 { 81 82 nsresult rc; 82 83 83 *session = NULL; 84 *virtualBox = NULL; 85 86 Session = *session; 87 Ivirtualbox = *virtualBox; 84 *ppSession = NULL; 85 *ppVirtualBox = NULL; 86 87 /** @todo r=bird: what exactly is this supposed to acomplish? */ 88 Session = *ppSession; 89 Ivirtualbox = *ppVirtualBox; 88 90 89 91 rc = com::Initialize(); 90 92 if (NS_FAILED(rc)) 91 93 { 92 Log(("Cbinding: XPCOM could not be initialized! rc=%Rhrc\n", rc));94 Log(("Cbinding: XPCOM could not be initialized! rc=%Rhrc\n", rc)); 93 95 VBoxComUninitialize(); 94 96 return; … … 98 100 if (NS_FAILED(rc)) 99 101 { 100 Log(("Cbinding: Could not get component manager! rc=%Rhrc\n", rc));102 Log(("Cbinding: Could not get component manager! rc=%Rhrc\n", rc)); 101 103 VBoxComUninitialize(); 102 104 return; … … 106 108 if (NS_FAILED(rc)) 107 109 { 108 Log(("Cbinding: Could not get xpcom event queue! rc=%Rhrc\n", rc));110 Log(("Cbinding: Could not get xpcom event queue! rc=%Rhrc\n", rc)); 109 111 VBoxComUninitialize(); 110 112 return; … … 113 115 rc = manager->CreateInstanceByContractID(NS_VIRTUALBOX_CONTRACTID, 114 116 nsnull, 115 NS_GET_IID(IVirtualBox), 116 (void **) virtualBox);117 NS_GET_IID(IVirtualBox), /** @todo Use pszVirtualBoxIID here! */ 118 (void **)ppVirtualBox); 117 119 if (NS_FAILED(rc)) 118 120 { … … 126 128 rc = manager->CreateInstanceByContractID (NS_SESSION_CONTRACTID, 127 129 nsnull, 128 NS_GET_IID(ISession), 129 (void **) session);130 NS_GET_IID(ISession), /** @todo Use */ 131 (void **)ppSession); 130 132 if (NS_FAILED(rc)) 131 133 { … … 136 138 137 139 Log(("Cbinding: ISession object created.\n")); 140 } 141 142 static void 143 VBoxComInitializeV1(IVirtualBox **ppVirtualBox, ISession **ppSession) 144 { 145 /* stub that always fails. */ 146 *ppVirtualBox = NULL; 147 *ppSession = NULL; 138 148 } 139 149 … … 233 243 VBoxVersion, 234 244 235 VBoxComInitialize ,245 VBoxComInitializeV1, 236 246 VBoxComUninitialize, 237 247 -
trunk/src/VBox/Main/cbinding/tstXPCOMCGlue.c
r19028 r19081 326 326 } 327 327 328 g_pVBoxFuncs->pfnComInitialize(&vbox, &session); 328 g_pVBoxFuncs->pfnComInitialize(IVIRTUALBOX_IID_STR, &vbox, 329 ISESSION_IID_STR, &session); 329 330 if (vbox == NULL) 330 331 { -
trunk/src/VBox/Main/cbinding/xpcidl.xsl
r19063 r19081 960 960 unsigned int (*pfnGetVersion)(void); 961 961 962 void (*pfnComInitialize)(IVirtualBox **virtualBox, ISession **session); 963 void (*pfnComUninitialize)(void); 962 void (*pfnComInitialize)(const char *pszVirtualBoxIID, 963 IVirtualBox **ppVirtualBox, 964 const char *pszSessionIID, 965 ISession **ppSession); 966 void (*pfnComUninitialize)(void); 964 967 965 968 void (*pfnComUnallocMem)(void *pv);
Note:
See TracChangeset
for help on using the changeset viewer.