15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file.
45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <windows.h>
65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)
75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Display the command line. This program is designed to be called from
85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// another process to display assertions. Since the other process has
95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// complete control of our command line, we assume that it did *not*
105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// add the program name as the first parameter. This allows us to just
115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// show the command line directly as the message.
125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)                     LPSTR lpCmdLine, int nCmdShow) {
145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  LPWSTR cmdline = GetCommandLineW();
155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  MessageBox(NULL, cmdline, L"Kr\x00d8m", MB_TOPMOST);
165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)  return 0;
175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}
18