diff --git a/EndPointController/EndPointController.cpp b/EndPointController/EndPointController.cpp index 50a0946..3faf26c 100644 --- a/EndPointController/EndPointController.cpp +++ b/EndPointController/EndPointController.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "windows.h" #include "Mmdeviceapi.h" #include "PolicyConfig.h" @@ -41,6 +42,12 @@ int _tmain(int argc, LPCWSTR argv[]) { TGlobalState state; + // Set the locale to system's locale + if (setlocale(LC_CTYPE, "") == NULL) { + wprintf_s(_T("Cannot set the locale.")); + exit(1); + } + // Process command line arguments state.option = 0; // 0 indicates list devices. state.strDefaultDeviceID = '\0';