diff options
Diffstat (limited to 'src/test/examples/TestEngine/ExampleTestEngine.cpp')
| -rw-r--r-- | src/test/examples/TestEngine/ExampleTestEngine.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp index 848b385c..a378c9a3 100644 --- a/src/test/examples/TestEngine/ExampleTestEngine.cpp +++ b/src/test/examples/TestEngine/ExampleTestEngine.cpp | |||
| @@ -5,16 +5,30 @@ | |||
| 5 | int __cdecl wmain(int argc, LPWSTR argv[]) | 5 | int __cdecl wmain(int argc, LPWSTR argv[]) |
| 6 | { | 6 | { |
| 7 | HRESULT hr = E_INVALIDARG; | 7 | HRESULT hr = E_INVALIDARG; |
| 8 | BOOL fShowUsage = FALSE; | ||
| 8 | 9 | ||
| 9 | ConsoleInitialize(); | 10 | ConsoleInitialize(); |
| 10 | 11 | ||
| 11 | if (argc != 3) | 12 | if (argc != 4) |
| 12 | { | 13 | { |
| 13 | ConsoleWriteError(hr, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe Bundle.exe BA.dll"); | 14 | fShowUsage = TRUE; |
| 15 | } | ||
| 16 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1)) | ||
| 17 | { | ||
| 18 | hr = RunReloadEngine(argv[2], argv[3]); | ||
| 19 | } | ||
| 20 | else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1)) | ||
| 21 | { | ||
| 22 | hr = RunShutdownEngine(argv[2], argv[3]); | ||
| 14 | } | 23 | } |
| 15 | else | 24 | else |
| 16 | { | 25 | { |
| 17 | hr = RunShutdownEngine(argv[1], argv[2]); | 26 | fShowUsage = TRUE; |
| 27 | } | ||
| 28 | |||
| 29 | if (fShowUsage) | ||
| 30 | { | ||
| 31 | ConsoleWriteError(hr, CONSOLE_COLOR_RED, "Usage: {reload|shutdown} Example.TestEngine.exe Bundle.exe BA.dll"); | ||
| 18 | } | 32 | } |
| 19 | 33 | ||
| 20 | ConsoleUninitialize(); | 34 | ConsoleUninitialize(); |
