Changeset 66121 in vbox for trunk/src/VBox/Main/src-server/win
- Timestamp:
- Mar 16, 2017 9:44:53 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/svcmain.cpp
r65543 r66121 39 39 #include <iprt/getopt.h> 40 40 #include <iprt/message.h> 41 #include <iprt \asm.h>41 #include <iprt/asm.h> 42 42 43 43 class CExeModule : public ATL::CComModule … … 151 151 * This function defined starting from Vista only. 152 152 */ 153 BOOL ShutdownBlockReasonCreateAPI(HWND hWnd,LPCWSTR pwszReason)153 static BOOL ShutdownBlockReasonCreateAPI(HWND hWnd, LPCWSTR pwszReason) 154 154 { 155 155 BOOL fResult = FALSE; … … 158 158 PFNSHUTDOWNBLOCKREASONCREATE pfn = (PFNSHUTDOWNBLOCKREASONCREATE)GetProcAddress( 159 159 GetModuleHandle(L"User32.dll"), "ShutdownBlockReasonCreate"); 160 _ASSERTE(pfn);160 AssertPtrValid(pfn); 161 161 if (pfn) 162 162 fResult = pfn(hWnd, pwszReason); … … 168 168 * This function defined starting from Vista only. 169 169 */ 170 BOOL ShutdownBlockReasonDestroyAPI(HWND hWnd)170 static BOOL ShutdownBlockReasonDestroyAPI(HWND hWnd) 171 171 { 172 172 BOOL fResult = FALSE; … … 175 175 PFNSHUTDOWNBLOCKREASONDESTROY pfn = (PFNSHUTDOWNBLOCKREASONDESTROY)GetProcAddress( 176 176 GetModuleHandle(L"User32.dll"), "ShutdownBlockReasonDestroy"); 177 _ASSERTE(pfn);177 AssertPtrValid(pfn); 178 178 if (pfn) 179 179 fResult = pfn(hWnd); … … 181 181 } 182 182 183 184 LRESULT CALLBACK WinMainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 183 static LRESULT CALLBACK WinMainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 185 184 { 186 185 LRESULT rc = 0; … … 231 230 } 232 231 233 234 int CreateMainWindow() 232 static int CreateMainWindow() 235 233 { 236 234 int rc = VINF_SUCCESS; 237 _ASSERTE(g_hMainWindow == NULL);235 Assert(g_hMainWindow == NULL); 238 236 239 237 LogFlow(("CreateMainWindow\n")); … … 280 278 281 279 282 void DestroyMainWindow()283 { 284 _ASSERTE(g_hMainWindow != NULL);280 static void DestroyMainWindow() 281 { 282 Assert(g_hMainWindow != NULL); 285 283 Log(("SVCMain: DestroyMainWindow \n")); 286 284 if (g_hMainWindow != NULL) … … 333 331 RTR3InitExe(argc, &argv, 0); 334 332 335 336 /* Note that all options are given lowercase/camel case/uppercase to337 * approximate case insensitive matching, which RTGetOpt doesn't offer. */338 333 static const RTGETOPTDEF s_aOptions[] = 339 334 { … … 502 497 int nRet = 0; 503 498 HRESULT hRes = com::Initialize(false /*fGui*/, fRun /*fAutoRegUpdate*/); 504 _ASSERTE(SUCCEEDED(hRes));499 AssertLogRelMsg(SUCCEEDED(hRes), ("SVCMAIN: init failed: %Rhrc\n", hRes)); 505 500 506 501 g_pModule = new CExeModule();
Note:
See TracChangeset
for help on using the changeset viewer.