// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A // PARTICULAR PURPOSE. // // Copyright (c) Microsoft Corporation. All rights reserved. #include "Subscription.h" //Handling Different Options available typedef enum _ACTION { ActionCreate = 0, ActionDelete, ActionEnumerate, ActionGetRuntimeStatus, ActionGetSubscription, ActionRetry, ActionHelp, } ACTION; //Command Line Arguments const LPCWSTR CREATE_SUBSCRIPTION = L"CS"; const LPCWSTR DELETE_SUBSCRIPTION = L"DS"; const LPCWSTR ENUM_SUBSCRIPTION = L"ES"; const LPCWSTR GET_RUNTIME_STATUS = L"GR"; const LPCWSTR GET_SUBSCRIPTION = L"GS"; const LPCWSTR RETRY_SUBSCRIPTION = L"RS"; const LPCWSTR HELP = L"?"; const std::wstring DEFAULT_URI = L"http://schemas.microsoft.com/wbem/wsman/1/windows/EventLog"; const std::wstring DEFAULT_QUERY = L""; const std::wstring DEFAULT_LOG = L"ForwardedEvents"; const std::wstring DEFAULT_EVENTSOURCE = L"Localhost"; const std::wstring DEFAULT_USERNAME = L"TestUser"; const std::wstring DEFAULT_PASSWORD = L"MyTestPassword"; // The Default Query translates to Select any event that is raised to the // Application log on the event source machine (localhost in this sample) /* ]]> */ //Display the Usage void DisplayUsage(void) { wprintf(L"Usage: " L"Subscription.exe