添加项目文件。

This commit is contained in:
琴心
2022-04-26 15:31:46 +08:00
parent 4f1d4343fe
commit a1b66995e4
134 changed files with 18302 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
cmake_minimum_required ( VERSION 2.8...3.21 )
project (test_case1)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set (srcs
main.cpp
)
set (hdrs
)
add_executable ( ${PROJECT_NAME} ${hdrs} ${srcs})
#install
INSTALL( TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT ${PROJECT_NAME} )

View File

@@ -0,0 +1,29 @@
#include <windows.h>
#include <stdio.h>
int popup_message1()
{
SYSTEMTIME SystemTime;
GetSystemTime(&SystemTime);
TCHAR pszDate[200];
GetDateFormatA( LOCALE_USER_DEFAULT, DATE_LONGDATE, &SystemTime, NULL, pszDate, 200 );
return MessageBoxA(NULL, pszDate, "Test Case 1", MB_OK);
}
int popup_message2()
{
return MessageBoxW(NULL, L"Checking wide strings", L"Test Case 1", MB_OK);
}
int main()
{
if (popup_message1() == 1337) {
if (popup_message2() == 1338) {
return MessageBoxW(NULL, L"Hooking test passed", L"Test Case 1", MB_OK);
}
}
printf("Test Case 1 finished\n");
return 0;
}