Revision: 8114 https://osdn.net/projects/ttssh2/scm/svn/commits/8114 Author: yutakapon Date: 2019-09-11 23:29:57 +0900 (Wed, 11 Sep 2019) Log Message: ----------- r8079 の説明にある comportinfo.cpp の修正をマクロ定義化した。 Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/8079 Modified Paths: -------------- branches/comportinfo/teraterm/ttpcmn/comportinfo.cpp -------------- next part -------------- Modified: branches/comportinfo/teraterm/ttpcmn/comportinfo.cpp =================================================================== --- branches/comportinfo/teraterm/ttpcmn/comportinfo.cpp 2019-09-11 14:00:59 UTC (rev 8113) +++ branches/comportinfo/teraterm/ttpcmn/comportinfo.cpp 2019-09-11 14:29:57 UTC (rev 8114) @@ -26,6 +26,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +// for comportinfo_test +//#define TEST_FOR_NT +//#define TEST_FOR_9X + #include <windows.h> #include <devguid.h> #include <setupapi.h> @@ -40,10 +44,17 @@ #include "devpkey_teraterm.h" #endif +#if defined(TEST_FOR_NT) || defined(TEST_FOR_9X) +#else #include "ttlib.h" +#endif + #define DllExport __declspec(dllexport) #include "comportinfo.h" +#if defined(TEST_FOR_NT) || defined(TEST_FOR_9X) +#define MAX_UIMSG 1000 +#endif typedef BOOL (WINAPI *TSetupDiGetDevicePropertyW)( HDEVINFO DeviceInfoSet, @@ -77,12 +88,18 @@ static BOOL IsWindows9X() { +#if defined(TEST_FOR_NT) + return FALSE; +#elif defined(TEST_FOR_9X) + return TRUE; +#else // return TRUE; // return FAKSE; return !IsWindowsNTKernel(); +#endif } -#if 0 +#if defined(TEST_FOR_NT) || defined(TEST_FOR_9X) static void GetI18nStrW(const char *section, const char *key, wchar_t *buf, int buf_len, const wchar_t *def, const char *iniFile) {