儲存庫 vbox 的更動 4737
- 時間撮記:
- 2007-9-12 下午03:44:32 (17 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/glue/initterm.cpp
r4557 r4737 184 184 * brute force method: */ 185 185 186 enum { MaxTries = 10000 }; 187 int tries = MaxTries; 188 while (rc == RPC_E_CHANGED_MODE && tries --) 186 if (rc == RPC_E_CHANGED_MODE) 189 187 { 190 188 LogFlowFunc (("COM already initialized in wrong apartment mode, " 191 189 "will reinitialize.\n")); 192 190 193 CoUninitialize(); 194 rc = CoInitializeEx (NULL, flags); 195 if (rc == S_OK) 196 { 197 /* We've successfully reinitialized COM; restore the 198 * initialization reference counter */ 199 200 LogFlowFunc (("Will call CoInitializeEx() %d times.\n", 201 MaxTries - tries)); 202 203 while (tries ++ < MaxTries) 204 { 205 rc = CoInitializeEx (NULL, flags); 206 Assert (rc == S_FALSE); 207 } 208 } 209 } 210 211 /* the overall result must be either S_OK or S_FALSE */ 191 enum { MaxTries = 10000 }; 192 int tries = MaxTries; 193 while (rc == RPC_E_CHANGED_MODE && tries --) 194 { 195 CoUninitialize(); 196 rc = CoInitializeEx (NULL, flags); 197 if (rc == S_OK) 198 { 199 /* We've successfully reinitialized COM; restore the 200 * initialization reference counter */ 201 202 LogFlowFunc (("Will call CoInitializeEx() %d times.\n", 203 MaxTries - tries)); 204 205 while (tries ++ < MaxTries) 206 { 207 rc = CoInitializeEx (NULL, flags); 208 Assert (rc == S_FALSE); 209 } 210 } 211 } 212 } 213 214 /* the overall result must be either S_OK or S_FALSE (S_FALSE means 215 * "already initialized using the same apartment model") */ 212 216 AssertMsg (rc == S_OK || rc == S_FALSE, ("rc=%08X\n", rc)); 213 217
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器