Hello andreip,

I'd like you to do a code review.  Please execute
        g4 diff -c 10197601

or point your web browser to
        http://mondrian/10197601

to review the following code:

Change 10197601 by stevebl...@steveblock-gears1 on 2009/02/18 12:39:57 *pending*

        Modifies ProcessRestarter to use CreateProcess rather than 
ShellExecuteEx, as ShellExecuteEx seems not to be implemented on some versions 
of Windows Mobile.
        
        R=andreip
        [email protected]
        DELTA=14  (6 added, 0 deleted, 8 changed)
        OCL=10197601

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/installer/common/process_restarter.cc#2
 edit

14 delta lines: 6 added, 0 deleted, 8 changed

Also consider running:
        g4 lint -c 10197601

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [email protected].
Change 10197601 by stevebl...@steveblock-gears1 on 2009/02/18 12:39:57 *pending*

        Modifies ProcessRestarter to use CreateProcess rather than 
ShellExecuteEx, as ShellExecuteEx seems not to be implemented on some versions 
of Windows Mobile.

Affected files ...

... 
//depot/googleclient/gears/opensource/gears/installer/common/process_restarter.cc#2
 edit

==== 
//depot/googleclient/gears/opensource/gears/installer/common/process_restarter.cc#2
 - 
c:\MyDocs\Gears1/googleclient/gears/opensource/gears/installer/common/process_restarter.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/installer/common/process_restarter.cc   
2009-02-18 12:47:08.000000000 +0000
+++ googleclient/gears/opensource/gears/installer/common/process_restarter.cc   
2009-02-18 12:36:15.000000000 +0000
@@ -172,14 +172,20 @@
     // Process is already running. Bail out.
     return S_FALSE;
   }
-  SHELLEXECUTEINFO info;
-  ZeroMemory(&info, sizeof(SHELLEXECUTEINFO));
-  info.cbSize = sizeof(SHELLEXECUTEINFO);
-  info.fMask = SEE_MASK_FLAG_NO_UI | SEE_MASK_NOCLOSEPROCESS;
-  info.lpFile = process_name_;
-  info.lpParameters = args.c_str();
-  info.nShow = SW_SHOWNORMAL;
-  if (::ShellExecuteEx(&info) == TRUE) return S_OK;
+
+  PROCESS_INFORMATION info;
+  if (CreateProcess(process_name_,
+                    args.c_str(),
+                    NULL,
+                    NULL,
+                    NULL,
+                    0,
+                    NULL,
+                    NULL,
+                    NULL,
+                    &info) == TRUE) {
+    return S_OK;
+  }
   return HRESULT_FROM_WIN32(::GetLastError());
 }
 

Reply via email to