1 /* 2 * Copyright Andrey Semashev 2018. 3 * Distributed under the Boost Software License, Version 1.0. 4 * (See accompanying file LICENSE_1_0.txt or copy at 5 * http://www.boost.org/LICENSE_1_0.txt) 6 */ 7 /*! 8 * \file process_abi.cpp 9 * \author Andrey Semashev 10 * \date 10.03.2018 11 * 12 * \brief This file contains ABI test for process.hpp 13 */ 14 15 #include <boost/winapi/process.hpp> 16 #include <windows.h> 17 #include <boost/predef/platform/windows_uwp.h> 18 #include "abi_test_tools.hpp" 19 main()20int main() 21 { 22 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 23 24 BOOST_WINAPI_TEST_CONSTANT(DEBUG_PROCESS); 25 BOOST_WINAPI_TEST_CONSTANT(DEBUG_ONLY_THIS_PROCESS); 26 BOOST_WINAPI_TEST_CONSTANT(CREATE_SUSPENDED); 27 BOOST_WINAPI_TEST_CONSTANT(DETACHED_PROCESS); 28 BOOST_WINAPI_TEST_CONSTANT(CREATE_NEW_CONSOLE); 29 BOOST_WINAPI_TEST_CONSTANT(CREATE_NEW_PROCESS_GROUP); 30 BOOST_WINAPI_TEST_CONSTANT(CREATE_UNICODE_ENVIRONMENT); 31 BOOST_WINAPI_TEST_CONSTANT(CREATE_SEPARATE_WOW_VDM); 32 BOOST_WINAPI_TEST_CONSTANT(CREATE_SHARED_WOW_VDM); 33 BOOST_WINAPI_TEST_CONSTANT(CREATE_FORCEDOS); 34 BOOST_WINAPI_TEST_CONSTANT(CREATE_BREAKAWAY_FROM_JOB); 35 BOOST_WINAPI_TEST_CONSTANT(CREATE_DEFAULT_ERROR_MODE); 36 BOOST_WINAPI_TEST_CONSTANT(CREATE_NO_WINDOW); 37 38 BOOST_WINAPI_TEST_CONSTANT(PROFILE_USER); 39 BOOST_WINAPI_TEST_CONSTANT(PROFILE_KERNEL); 40 BOOST_WINAPI_TEST_CONSTANT(PROFILE_SERVER); 41 42 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 43 BOOST_WINAPI_TEST_CONSTANT(CREATE_PROTECTED_PROCESS); 44 BOOST_WINAPI_TEST_CONSTANT(EXTENDED_STARTUPINFO_PRESENT); 45 #endif 46 47 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 48 BOOST_WINAPI_TEST_CONSTANT(INHERIT_PARENT_AFFINITY); 49 #endif 50 51 #if defined(UNDER_CE) 52 BOOST_WINAPI_TEST_CONSTANT(INHERIT_CALLER_PRIORITY); 53 #endif 54 55 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM 56 57 #if BOOST_WINAPI_PARTITION_DESKTOP 58 59 BOOST_WINAPI_TEST_CONSTANT(STARTF_USESHOWWINDOW); 60 BOOST_WINAPI_TEST_CONSTANT(STARTF_USESIZE); 61 BOOST_WINAPI_TEST_CONSTANT(STARTF_USEPOSITION); 62 BOOST_WINAPI_TEST_CONSTANT(STARTF_USECOUNTCHARS); 63 BOOST_WINAPI_TEST_CONSTANT(STARTF_USEFILLATTRIBUTE); 64 BOOST_WINAPI_TEST_CONSTANT(STARTF_RUNFULLSCREEN); 65 BOOST_WINAPI_TEST_CONSTANT(STARTF_FORCEONFEEDBACK); 66 BOOST_WINAPI_TEST_CONSTANT(STARTF_FORCEOFFFEEDBACK); 67 BOOST_WINAPI_TEST_CONSTANT(STARTF_USESTDHANDLES); 68 BOOST_WINAPI_TEST_CONSTANT(STARTF_USEHOTKEY); 69 70 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN7 71 BOOST_WINAPI_TEST_CONSTANT(STARTF_TITLEISLINKNAME); 72 BOOST_WINAPI_TEST_CONSTANT(STARTF_TITLEISAPPID); 73 BOOST_WINAPI_TEST_CONSTANT(STARTF_PREVENTPINNING); 74 #endif 75 76 #endif // BOOST_WINAPI_PARTITION_DESKTOP 77 78 BOOST_WINAPI_TEST_CONSTANT(PROCESS_TERMINATE); 79 BOOST_WINAPI_TEST_CONSTANT(PROCESS_CREATE_THREAD); 80 BOOST_WINAPI_TEST_CONSTANT(PROCESS_SET_SESSIONID); 81 BOOST_WINAPI_TEST_CONSTANT(PROCESS_VM_OPERATION); 82 BOOST_WINAPI_TEST_CONSTANT(PROCESS_VM_READ); 83 BOOST_WINAPI_TEST_CONSTANT(PROCESS_VM_WRITE); 84 BOOST_WINAPI_TEST_CONSTANT(PROCESS_DUP_HANDLE); 85 BOOST_WINAPI_TEST_CONSTANT(PROCESS_CREATE_PROCESS); 86 BOOST_WINAPI_TEST_CONSTANT(PROCESS_SET_QUOTA); 87 BOOST_WINAPI_TEST_CONSTANT(PROCESS_SET_INFORMATION); 88 BOOST_WINAPI_TEST_CONSTANT(PROCESS_QUERY_INFORMATION); 89 BOOST_WINAPI_TEST_CONSTANT(PROCESS_SUSPEND_RESUME); 90 BOOST_WINAPI_TEST_CONSTANT(PROCESS_ALL_ACCESS); 91 92 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 93 #if !defined(BOOST_WINAPI_IS_MINGW) 94 BOOST_WINAPI_TEST_CONSTANT(CREATE_PRESERVE_CODE_AUTHZ_LEVEL); 95 BOOST_WINAPI_TEST_CONSTANT(CREATE_IGNORE_SYSTEM_DEFAULT); 96 #endif 97 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM 98 99 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 100 BOOST_WINAPI_TEST_STRUCT(PROCESS_INFORMATION, (hProcess)(hThread)(dwProcessId)(dwThreadId)); 101 102 #if !defined(BOOST_NO_ANSI_APIS) 103 BOOST_WINAPI_TEST_STRUCT(STARTUPINFOA, (cb)(lpDesktop)(lpTitle)(dwX)(dwY)(dwXSize)(dwYSize)(dwXCountChars)(dwYCountChars)(dwFillAttribute)(dwFlags)(wShowWindow)(hStdInput)(hStdOutput)(hStdError)); 104 #endif // !defined(BOOST_NO_ANSI_APIS) 105 BOOST_WINAPI_TEST_STRUCT(STARTUPINFOW, (cb)(lpDesktop)(lpTitle)(dwX)(dwY)(dwXSize)(dwYSize)(dwXCountChars)(dwYCountChars)(dwFillAttribute)(dwFlags)(wShowWindow)(hStdInput)(hStdOutput)(hStdError)); 106 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM 107 108 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 109 #if BOOST_WINAPI_PARTITION_DESKTOP 110 #if !defined(BOOST_NO_ANSI_APIS) 111 BOOST_WINAPI_TEST_STRUCT(STARTUPINFOEXA, (StartupInfo)(lpAttributeList)); 112 #endif // !defined(BOOST_NO_ANSI_APIS) 113 BOOST_WINAPI_TEST_STRUCT(STARTUPINFOEXW, (StartupInfo)(lpAttributeList)); 114 #endif // BOOST_WINAPI_PARTITION_DESKTOP 115 #endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6 116 117 #if BOOST_WINAPI_PARTITION_APP_SYSTEM 118 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(TerminateProcess); 119 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(OpenProcess); 120 #endif // BOOST_WINAPI_PARTITION_APP_SYSTEM 121 122 #if BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM 123 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(GetExitCodeProcess); 124 BOOST_WINAPI_TEST_FUNCTION_SIGNATURE(ExitProcess); 125 #endif // BOOST_WINAPI_PARTITION_DESKTOP_SYSTEM 126 127 return boost::report_errors(); 128 } 129