diff options
Diffstat (limited to 'private/oleauto/tools/win16/hdos')
78 files changed, 26736 insertions, 0 deletions
diff --git a/private/oleauto/tools/win16/hdos/bin/ml.err b/private/oleauto/tools/win16/hdos/bin/ml.err new file mode 100644 index 000000000..7b3386fb3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/bin/ml.err @@ -0,0 +1,259 @@ +FATAL +cannot open file +I/O error closing file +I/O error writing file +I/O error reading file +out of far memory +assembler limit : macro parameter name table full +invalid command-line option +nesting level too deep +unmatched macro nesting +line too long +unmatched block nesting +directive must be in control block +error count exceeds 100; stopping assembly +invalid numerical command-line argument +too many arguments +statement too complex +N/A +missing source filename +SEVERE +memory operand not allowed in context +immediate operand not allowed +cannot have more than one ELSE clause per IF block +extra characters after statement +symbol type conflict +symbol redefinition +undefined symbol +non-benign record redefinition +syntax error +syntax error in expression +invalid type expression +distance invalid for word size of current segment +PROC, MACRO, or macro repeat directive must precede LOCAL +.MODEL must precede this directive +cannot define as public or external +segment attributes cannot change +expression expected +operator expected +invalid use of external symbol +operand must be RECORD type or field +identifier not a record +record constants may not span line breaks +instruction operands must be the same size +instruction operand must have size +invalid operand size for instruction +operands must be in same segment +constant expected +operand must be a memory expression +expression must be a code address +multiple base registers not allowed +multiple index registers not allowed +must be index or base register +invalid use of register +invalid INVOKE argument +must be in segment block +DUP too complex +too many initial values for structure +statement not allowed inside structure definition +missing operand for macro operator +line too long +segment register not allowed in context +string or text literal too long +statement too complex +identifier too long +invalid character in file +missing angle bracket or brace in literal +missing single or double quotation mark in string +empty (null) string +nondigit in number +syntax error in floating-point constant +real or BCD number not allowed +text item required +forced error +forced error : value equal to 0 +forced error : value not equal to 0 +forced error : symbol not defined +forced error : symbol defined +forced error : string blank +forced error : string not blank +forced error : strings equal +forced error : strings not equal +[ELSE]IF2/.ERR2 not allowed : single-pass assembler +expression too complex for .UNTILCXZ +can ALIGN only to power of 2 +structure alignment must be 1, 2, or 4 +expected +incompatable CPU mode and segment size +LOCK must be followed by a memory operation +instruction prefix not allowed +no operands allowed for this instruction +invalid instruction operands +initializer magnitude too large for specified size +cannot access symbol in given segment or group +operands have different frames +cannot access label through segment registers +jump destination too far +jump destination must specify a label +instruction does not allow NEAR indirect addressing +instruction does not allow FAR indirect addressing +instruction does not allow FAR direct addressing +jump distance not possible in current CPU mode +missing operand after unary operator +cannot mix 16- and 32-bit registers +invalid scale value +constant value too large +instruction or register not accepted in current CPU mode +reserved word expected +instruction form requires 80386/486 +END directive required at end of file +too many bits in RECORD +positive value expected +index value past end of string +count must be positive or zero +count value too large +operand must be relocatable +constant or relocatable label expected +segment, group, or segment register expected +segment expected +invalid operand for OFFSET +invalid use of external absolute +segment or group not allowed +cannot add two relocatable labels +cannot add memory expression and code label +segment exceeds 64K limit +invalid type for a data declaration +HIGH and LOW require immediate operands +N/A +cannot have implicit far jump or call to near label +use of register assumed to ERROR +only white space or comment can follow backslash +COMMENT delimiter expected +conflicting parameter definition +PROC and prototype calling conventions conflict +invalid radix tag +INVOKE argument type mismatch : argument +invalid coprocessor register +instructions and initialized data not allowed in AT segments +/AT switch requires the TINY memory model +cannot have segment address references with TINY model +language type must be specified +PROLOGUE must be macro function +EPILOGUE must be macro procedure +alternate identifier not allowed with EXTERNDEF +text macro nesting level too deep +N/A +missing macro argument +EXITM used inconsistently +macro function argument list too long +N/A +VARARG parameter must be last parameter +VARARG parameter not allowed with LOCAL +VARARG parameter requires C calling convention +ORG needs a constant or local offset +register value overwritten by INVOKE +structure too large to pass with INVOKE : argument +not overriding private proc as public +too many arguments to INVOKE +too few arguments to INVOKE +invalid data initializer +N/A +RET operand too large +too many operands to instruction +cannot have more than one .ELSE clause per .IF block +expected data label +cannot nest procedures +EXPORT must be FAR +procedure declared with two visibility attributes +macro label not defined +invalid symbol type in expression +byte register cannot be first operand +word register cannot be first operand +special register cannot be first operand +coprocessor register cannot be first operand +cannot change size of expression computations +syntax error in control-flow directive +cannot use 16-bit register with a 32-bit address +constant value out of range +missing right parenthesis +type is wrong size for register +structure cannot be instanced +non-benign structure redefinition: label incorrect +non-benign structure redefinition: too few labels +OLDSTRUCTS/NOOLDSTRUCTS state cannot be changed +non-benign structure redefinition: incorrect initializers +non-benign structure redefinition: too few initializers +non-benign structure redefinition: label has incorrect offset +structure field expected +unexpected literal found in expression +N/A +divide by zero in expression +directive must appear inside a macro +cannot expand macro function +too few bits in RECORD +macro function cannot redefine itself +N/A +invalid qualified type +floating-point initializer on an integer variable +nested structure improperly initialized +invalid use of FLAT +structure improperly initialized +improper list initialization +initializer must be a string or single item +initializer must be a single item +initializer must be a single byte +improper use of list initializer +improper literal initialization +extra characters in literal initialization +must use floating-point initializer +cannot use .EXIT for OS_OS2 with .8086 +invalid combination with segment alignment +INVOKE requires prototype for procedure +cannot include structure in self +symbol language attribute conflict +non-benign COMM redefinition +COMM variable exceeds 64K +parameter or local cannot have void type +cannot use TINY model with OS_OS2 +expression size must be 32 bits +.EXIT does not work with 32-bit segments +.STARTUP does not work with 32-bit segments +ORG directive not allowed in unions +D/T +illegal use of segment register +cannot declare scoped code label as PUBLIC +.MSFLOAT directive is obsolete : .MSFLOAT ignored +ESC instruction is obsolete : ESC ignored +missing operator in expression +missing right parenthesis in expression +missing left parenthesis in expression +reference to forward macro definition +LEVEL 1 +cannot modify READONLY segment +N/A +non-unique STRUCT/UNION field used without qualification +start address on END directive ignored with .STARTUP +cannot ASSUME CS +unknown default prologue argument +too many arguments in macro call +option untranslated, directive required +invalid command-line option value, default is used +insufficent memory for /EP : /EP ignored +expected '>' on text literal +multiple .MODEL directives found : .MODEL ignored +line number information for segment without class 'CODE' +instructions and initialized data not supported in AT segments +LEVEL 2 +@@: label defined but not referenced +expression expected, assume value 0 +EXTERNDEF previously assumed to be external +length of symbol previously assumed to be different +symbol previously assumed to not be in a group +types are different +LEVEL 3 +N/A +no return from procedure +N/A +conditional jump lengthened +procedure argument or local not referenced +expression may be pass-dependent diff --git a/private/oleauto/tools/win16/hdos/bin/rcpp.err b/private/oleauto/tools/win16/hdos/bin/rcpp.err new file mode 100644 index 000000000..d26c8494d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/bin/rcpp.err @@ -0,0 +1,334 @@ +/* SCCSWHAT( "@(#)c1.err 2.29 88/02/25 18:18:00 " ) */ + /* fatals */ + +1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Technical Support" +1002 "out of heap space" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected EOF" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1008 "no input file specified" +1009 "compiler limit : macros too deeply nested" +1010 "compiler limit : macro expansion too big" +1012 "bad parenthesis nesting - missing '%c'" +1013 "cannot open source file '%s'" +1014 "too many include files" +1015 "cannot open include file '%s'" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected '#elif'" +1019 "unexpected '#else'" +1020 "unexpected '#endif'" +1021 "bad preprocessor command '%s'" +1022 "expected '#endif'" +1023 "no int size specified" +1024 "no ptr size specified" +1025 "no function size specified" +1026 "parser stack overflow, please simplify your program" +1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */ +1028 "%s segment allocation exceeds 64K" /* QC */ +1031 "compiler limit : function calls too deeply nested" /* QC, c23 */ +1032 "cannot open object listing file '%s'" /* QC, c23 */ +1035 "expression too complex, please simplify" /* QC, c23 */ +1037 "cannot open object file '%s'" /* QC, c23 */ +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "floating point overflow" +1047 "too many %s flags, '%s'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1052 "too many #if/#ifdef's" +1053 "compiler limit : struct/union nesting" +1054 "compiler limit : initializers too deeply nested" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected EOF in macro expansion (missing ')'?)" +1059 "out of near heap space" +1060 "out of far heap space" +1061 "compiler limit : blocks too deeply nested" /* QC */ +1062 "error writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" /* QC */ +1064 "compiler limit : identifier overflowed internal buffer" +1065 "compiler limit : declarator too complex" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Technical Support" + + /* errors */ + +2001 "newline in constant" +2002 "out of macro actual parameter space" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%s'" +2006 "#include expected a file name, found '%s'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%s'" +2010 "'%c' : unexpected in formal list" +2011 "'%s' : definition too big" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first non-whitespace" +2015 "too many chars in constant" +2016 "no closing single quote" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor command, found '%c'" +2020 "bad octal number '%c'" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for char" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" +2026 "'%s' : member of enum redefinition" +2028 "struct/union member needs to be inside a struct/union" +2029 "'%Fs' : bit-fields only allowed in structs" +2030 "'%Fs' : struct/union member redefinition" +2031 "'%Fs' : function cannot be struct/union member" +2032 "'%Fs' : base type with near/far/huge not allowed" +2033 "'%Fs' : bit-field cannot have indirection" +2034 "'%Fs' : bit-field type too small for number of bits" +2035 "enum/struct/union '%Fs' : unknown size" +2036 "left of '%s%s' must have a struct/union type" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" +2039 "'->' requires struct/union pointer" +2040 "'.' requires struct/union name" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%s' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2050 "non-integral switch expression" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "case value %d already used" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%s'" +2060 "syntax error : EOF" +2061 "syntax error : identifier '%s'" +2062 "type '%s' unexpected" +2063 "'%s' : not a function" +2064 "term does not evaluate to a function" +2065 "'%s' : undefined" +2066 "cast to function returning . . . is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast" +2069 "cast of 'void' term to non-void" +2070 "illegal sizeof operand" +2071 "'%Fs' : bad storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : cannot initialize array in function" +2074 "'%Fs' : cannot initialize struct/union in function" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" +2077 "non-integral field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined struct/union '%Fs'" +2082 "redefinition of formal parameter '%Fs'" +2083 "array '%Fs' already has a size" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "use of undefined enum/struct/union '%s'" +2089 "typedef specifies a near/far function" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "cannot initialize a static or struct with address of automatic vars" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual has type void : parameter %d" +2096 "struct/union comparison illegal" +2097 "illegal initialization" +2098 "non-address expression" +2099 "non-constant offset" +2100 "illegal indirection" +2101 "'&' on constant" +2102 "'&' requires lvalue" +2103 "'&' on register variable" +2104 "'&' on bit-field ignored" +2105 "'%s' needs lvalue" +2106 "'%s' : left operand must be lvalue" +2107 "illegal index, indirection not allowed" +2108 "non-integral index" +2109 "subscript on non-array" +2110 "'+' : 2 pointers" +2111 "pointer + non-integral value" +2112 "illegal pointer subtraction" +2113 "'-' : right operand pointer" +2114 "'%s' : pointer on left; needs integral right" +2115 "'%s' : incompatible types" +2116 "'%s' : bad %s operand" +2117 "'%s' : illegal for struct/union" +2118 "negative subscript" +2119 "'typedefs' both define indirection" +2120 "'void' illegal with all types" +2121 "typedef specifies different enum" +2122 "typedef specifies different struct" +2123 "typedef specifies different union" +2125 "%Fs : allocation exceeds 64K" /* QC, c23 */ +2126 "%Fs : auto allocation exceeds %s" /* QC, c23 */ +2127 "parameter allocation exceeds 32K" /* QC, c23 */ +2130 "#line expected a string containing the file name, found '%s'" +2131 "attributes specify more than one near/far/huge" +2132 "syntax error : unexpected identifier" +2133 "array '%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" +2135 "missing ')' in macro expansion" +2137 "empty character constant" +2138 "unmatched close comment '*/'" +2139 "type following '%s' is illegal" +2140 "argument type cannot be function returning . . ." +2141 "value out of range for enum constant" +2142 "ellipsis requires three periods" +2143 "syntax error : missing '%s' before '%s'" +2144 "syntax error : missing '%s' before type '%Fs'" +2145 "syntax error : missing '%s' before identifier" +2146 "syntax error : missing '%s' before identifier '%s'" +2147 "unknown size" +2148 "array too large" +2149 "'%Fs' : named bit-field cannot have 0 width" +2150 "'%Fs' : bit-field must have type int, signed int, or unsigned int" +2151 "more than one cdecl/fortran/pascal attribute specified" +2152 "'%s' : pointers to functions with different attributes" +2153 "hex constants must have at least 1 hex digit" +2154 "'%s' : does not refer to a segment" +2155 "'%s' : already in a segment" +2156 "pragma must be at outer level" +2157 "'%s' : must be declared before use in pragma list" +2158 "'%s' : is a function" +2159 "more than one storage class specified" +2160 "## cannot occur at the beginning of a macro definition" +2161 "## cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%s' : not available as an intrinsic" +2164 "'%s' : intrinsic was not declared" +2165 "'%s' : cannot modify pointers to data" +2166 "lval specifies 'const' object" +2167 "'%Fs' : too many actual parameters for intrinsic" +2168 "'%Fs' : too few actual parameters for intrinsic" +2169 "'%Fs' : is an intrinsic, it cannot be defined" +2170 "'%s' : intrinsic not declared as a function" +2171 "'%s' : bad operand" +2172 "'%Fs' : actual is not a pointer : parameter %d" +2173 "'%Fs' : actual is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual has type void : parameter %d, parameter list %d" +2175 "'%Fs' : unresolved external" /* QC */ +2176 "static far data not supported" /* QC */ +2177 "constant too big" +2178 "'%s' : storage class for same_seg variables must be 'extern'" +2179 "'%Fs' : was used in same_seg, but storage class is no longer 'extern'" +2180 "controlling expression has type 'void'" +2181 "pragma requires command line option '%s'" /* QC */ +2182 "'%Fs' : 'void' on variable" +2183 "'%Fs' : 'interrupt' function must be 'far'" +2184 "'%Fs' : '%s' function cannot be 'pascal/fortran'" +2186 "'%Fs' : 'saveregs/interrupt' modifiers mutually exclusive" +2187 "cast of near function pointer to far function pointer" +2188 "#error : %s" +2190 "'%s' : is a text segment" +2191 "'%s' : is a data segment" +2192 "'%s' : function has already been defined" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Technical Support" + + /* warnings */ + +4001 "macro '%s' requires parameters" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "missing close parenthesis after 'defined'" +4005 "'%s' : redefinition" +4006 "#undef expected an identifier" +4009 "string too big, trailing chars truncated" +4011 "identifier truncated to '%s'" +4012 "float constant in a cross compilation" +4013 "constant too big" +4014 "'%Fs' : bit-field type must be unsigned" +4015 "'%Fs' : bit-field type must be integral" +4016 "'%s' : no function return type, using 'int' as default" +4017 "cast of int expression to far pointer" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch : parameter %d" +4024 "'%Fs' : different types : parameter %d" +4025 "function declaration specified variable argument list" +4026 "function was declared with formal argument list" +4027 "function was declared without formal argument list" +4028 "parameter %d declaration different" +4029 "declared parameter list different from definition" +4030 "first parameter list is longer than the second" +4031 "second parameter list is longer than the first" +4032 "unnamed struct/union as parameter" +4033 "function must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unexpected formal parameter list" +4037 "'%Fs' : formal parameters ignored" +4038 "'%Fs' : formal parameter has bad storage class" +4039 "'%Fs' : function used as an argument" +4040 "near/far/huge on '%Fs' ignored" +4041 "formal parameter '%s' is redefined" +4042 "'%Fs' : has bad storage class" +4044 "huge on '%Fs' ignored, must be an array" +4045 "'%s' : array bounds overflow" +4046 "'&' on function/array, ignored" +4047 "'%s' : different levels of indirection" +4048 "array's declared subscripts different" +4049 "'%s' : indirection to different types" +4051 "data conversion" +4052 "different enum types" +4053 "at least one void operand" +4060 "conversion of long address to short address" /* QC, c23 */ +4061 "long/short mismatch in argument : conversion supplied" /* QC, c23 */ +4062 "near/far mismatch in argument : conversion supplied" /* QC, c23 */ +4067 "unexpected characters following '%s' directive - newline expected" +4068 "unknown pragma" +4071 "'%Fs' : no function prototype given" +4074 "non standard extension used - '%s'" +4075 "size of switch expression or case constant too large - converted to int" +4076 "'%s' : may be used on integral types only" +4077 "unknown check_stack option" +4079 "unexpected token '%s'" +4080 "expected 'identifier' for segment name, found '%s'" +4081 "expected a comma, found '%s'" +4082 "expected an identifier, found '%s'" +4083 "expected '(', found '%s'" +4084 "expected a pragma keyword, found '%s'" +4085 "expected [on | off]" +4086 "expected [1 | 2 | 4]" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch : parameter %d, parameter list %d" +4089 "'%Fs' : different types : parameter %d, parameter list %d" +4090 "different 'const' attributes" +4091 "no symbols were declared" +4092 "untagged enum/struct/union declared no symbols" +4093 "unescaped newline in character constant in non-active code" +4094 "unexpected newline" +4095 "expected ')', found '%s'" +4096 "huge treated as far" /* QC */ +4098 "void function returning a value" +4099 "expected ')', (too many arguments?)" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : function definition used as prototype" +4104 "'%s' : near data in same_seg pragma, ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires integer between 1 and 127" +4107 "pragma requires integer between 15 and 255" +4108 "pragma requires integer between 79 and 132" +4109 "unexpected identifier '%s'" +4110 "unexpected token 'int constant'" +4111 "unexpected token 'string'" +4112 "macro name '%s' is reserved, %s ignored" +4113 "function parameter lists differed" +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Technical Support" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/c1.err b/private/oleauto/tools/win16/hdos/c800/bin/c1.err new file mode 100644 index 000000000..fa4b34783 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/c1.err @@ -0,0 +1,1088 @@ +/* SCCSWHAT( "@(#)c1.err 3.56 89/12/06 13:43:09 " ) */ + /* warnings */ + +4001 "nonstandard extension 'single line comment' was used" +4002 "too many actual parameters for macro '%s'" +4003 "not enough actual parameters for macro '%s'" +4004 "incorrect construction after 'defined'" +4005 "'%Fs' : macro redefinition" +4006 "#undef expected an identifier" +4007 "'%Fs' : must be '%Fs'" +4008 "'%Fs' : '%Fs' attribute ignored" +4009 "string too big; trailing characters truncated" +4010 "single-line comment contains line-continuation character" +4011 "'%Fs' : identifier was truncated to '%d' characters" +4012 "float constant in a cross compilation" /* XC */ +4013 "'%Fs' undefined; assuming extern returning int" +4014 "concatenating mismatched wide strings" +4015 "'%Fs' : type of bit field must be integral" +4016 "'%s' : no function return type; using 'int' as default" /* C6 */ +4017 "cast of 'int' expression to far pointer" +4018 "'%Fs' : signed/unsigned mismatch" +4019 "empty statement at global scope" +4020 "'%Fs' : too many actual parameters" +4021 "'%Fs' : too few actual parameters" +4022 "'%Fs' : pointer mismatch for actual parameter %d" +4023 "'%Fs' : based pointer passed to unprototyped function : parameter %d" +4024 "'%Fs' : different types for formal and actual parameter %d" +4025 "'%Fs' : based pointer passed to function with variable arguments: parameter %d" +4026 "function declared with formal parameter list" +4027 "function declared without formal parameter list" +4028 "formal parameter %d different from declaration" +4029 "declared formal parameter list different from definition" +4030 "first formal parameter list longer than the second list" +4031 "second formal parameter list longer than the first list" +4032 "formal parameter %d has different type when promoted" +4033 "'%Fs' must return a value" +4034 "sizeof returns 0" +4035 "'%Fs' : no return value" +4036 "unnamed %Fs as actual parameter" +4037 "conflicting ambient class modifiers" +4038 "'%Fs' : illegal ambient class modifier" +4039 "ambient class modifier on reference ignored" +4040 "memory attribute on '%Fs' ignored" +4041 "compiler limit : terminating browser output" +4042 "'%Fs' : has bad storage class" +4043 "function specifier used more than once" +4044 "specifier __huge on '%Fs' ignored; can only be applied to array" +4045 "'%Fs' : array bounds overflow" +4046 "'%Fs' : unsized array treated as %Fs" +4047 "'%Fs' : different levels of indirection" +4048 "different declared array subscripts" +4049 "'%Fs' : indirection to different types" +4050 "'%Fs' : different code attributes" +4051 "type conversion; possible loss of data" +4052 "function declarations different; one contains variable arguments" +4053 "one void operand for '?:'" +4054 "'%Fs' : from function pointer '%Fs' to data pointer '%Fs'" +4055 "'%Fs' : from data pointer '%Fs' to function pointer '%Fs'" +4056 "overflow in floating-point constant arithmetic" +4057 "'%Fs' : indirection to slightly different base types" +4058 "unions are now aligned on alignment requirement, not size" +4059 "pascal string too big, length byte is length % 256" + +4060 "switch statement contains no 'case' or 'default' labels" +4061 "enumerate '%Fs' in switch of enum '%Fs' is not explicitly handled by a case label" +4062 "enumerate '%Fs' in switch of enum '%Fs' is not handled" +4063 "case '%ld' is not a valid value for switch of enum '%Fs'" +4064 "switch of incomplete enum '%Fs'" +4065 "switch statement contains 'default' but no 'case' labels" + +4067 "unexpected characters following '%Fs' directive - newline expected" +4068 "unknown pragma" +4069 "long double is the same precision as double" +4070 "return of a 'void' expression" +4071 "'%Fs' : no function prototype given" +4072 "'%Fs' : no function prototype on __fastcall function" +4073 "initializers put in library initialization area" +4074 "initializers put in compiler reserved initialization area" +4075 "initializers put in unrecognized initialization area" +4076 "'%Fs' : can be used on integral types only" +4077 "unknown check_stack option" +4078 "case constant '%ld' too big for the type of the switch expression" +4079 "unexpected token '%Fs'" +4080 "expected identifier for segment name; found '%Fs'" +4081 "expected a comma; found '%Fs'" +4082 "expected an identifier; found '%Fs'" +4083 "expected '('; found '%Fs'" +4084 "expected a pragma directive; found '%Fs'" +4085 "expected pragma parameter to be 'on' or 'off'" +4086 "expected pragma parameter to be '1', '2', '4', '8', or '16'" +4087 "'%Fs' : declared with 'void' parameter list" +4088 "'%Fs' : pointer mismatch in actual parameter %d, formal parameter %d" +4089 "'%Fs' : different types in actual parameter %d, formal parameter %d" +4090 "'%Fs' : different const or volatile qualifiers" +4091 "no symbols were declared" +4092 "sizeof returns 'unsigned long'" +4093 "unescaped newline in character constant in inactive code" +4094 "untagged '%Fs' declared no symbols" +4095 "expected ')'; found '%Fs'" +4096 "'%Fs' must be used with '%Fs'" +4097 "nonstandard extension : typedef-name '%Fs' used as synonym for class-name '%Fs'" +4098 "'%Fs' : 'void' function returning a value" +4099 "'%Fs' : type name first seen using '%Fs' now seen using '%Fs'" +4100 "'%Fs' : unreferenced formal parameter" +4101 "'%Fs' : unreferenced local variable" +4102 "'%Fs' : unreferenced label" +4103 "'%Fs' : used #pragma pack to change alignment" +4104 "'%Fs' : near data in same_seg pragma; ignored" +4105 "'%Fs' : code modifiers only on function or pointer to function" +4106 "pragma requires an integer between 1 and 127" +4107 "pragma requires an integer between 15 and 255" +4108 "pragma requires an integer between 79 and 132" +4109 "unexpected identifier '%Fs'" +4110 "unexpected token 'number'" +4111 "unexpected token 'string'" +4112 "#line requires an integer between 1 and 32767" +4113 "function parameter lists differed" +4114 "same type qualifier used more than once" +4115 "'%Fs' : named type definition in parentheses" +4116 "unnamed type definition in parentheses" +4117 "macro name '%Fs' is reserved, '%Fs' ignored" +4118 "pragma not supported during fast compile" +4119 "different bases '%Fs' and '%Fs' specified" +4120 "based/unbased mismatch" +4121 "'%Fs' : alignment of a member was sensitive to packing" +4122 "'%Fs' : alloc_text applicable only to functions with C linkage" +4123 "different base expressions specified" +4124 "__fastcall with stack checking is inefficient" +4125 "decimal digit terminates octal escape sequence" +4126 "'%c' : unknown memory-model command-line option" +4127 "conditional expression is constant" +4128 "storage-class specifier after type" +4129 "'%c' : unrecognized character escape sequence" +4130 "'%Fs' : logical operation on address of string constant" +4131 "'%Fs' : uses old-style declarator" +4132 "'%Fs' : const object should be initialized" +4133 "'%Fs' : incompatible types - pointer to 'void' combined with pointer to type" +4134 "conversion between pointers to members of same class" +4135 "conversion between different integral types" +4136 "conversion between different floating-point types" +4137 "'%Fs' : no return value from floating-point function" +4138 "'*/' found outside of comment" +4139 "'0x%lx' : hex escape sequence is out of range" +4140 "'%Fs' : redefined, preceding references may be invalid" /* QC */ +4141 "'%Fs' : used more than once" +4142 "benign redefinition of type" +4143 "pragma 'same_seg' not supported; use __based allocation" +4144 "'%Fs' : relational expression as switch expression" +4145 "'%Fs' : relational expression as switch expression; possible confusion with '%Fs'" +4146 "unary minus operator applied to unsigned type, result still unsigned" +4147 "'%Fs' : '%Fs' ignored on pointer and reference declarations" +4148 "'%Fs' : DS != SS for '__near' '%Fs'" +4149 "'%Fs' : different ambient model than base class '%Fs'" +4150 "deletion of pointer to incomplete type '%Fs'; no destructor called" +4151 "'%Fs' : operator should be explicitly '%Fs'" +4152 "nonstandard extension, function/data pointer conversion in expression" +4153 "function/data pointer conversion in expression" +4154 "deletion of an array expression; conversion to pointer supplied" +4155 "deletion of an array expression without using the array form of 'delete'" +4156 "deletion of an array expression without using the array form of 'delete'; array form substituted" +4157 "pragma was ignored by C compiler" +4158 "assuming #pragma pointers_to_members(full_generality, %Fs_inheritance)" + +4184 "near call to thunk for '%Fs' in a different segment" + +4200 "nonstandard extension used : zero-sized array in struct/union" +4201 "nonstandard extension used : nameless struct/union" +4202 "nonstandard extension used : '...': prototype parameter in name list illegal" +4203 "nonstandard extension used : union with static member variable" +4204 "nonstandard extension used : non-constant aggregate initializer" +4205 "nonstandard extension used : static function declaration in function scope" +4206 "nonstandard extension used : translation unit is empty" +4207 "nonstandard extension used : extended initializer form" +4208 "nonstandard extension used : delete [exp] - exp evaluated but ignored" +4209 "nonstandard extension used : benign typedef redefinition" +4210 "nonstandard extension used : function given file scope" +4211 "nonstandard extension used : redefined extern to static" +4212 "nonstandard extension used : function declaration used ellipsis" +4213 "nonstandard extension used : cast on l-value" +4214 "nonstandard extension used : bit field types other than int" +4215 "nonstandard extension used : long float" +4216 "nonstandard extension used : float long" +4217 "nonstandard extension used : function declaration from a previous block" +4218 "nonstandard extension used : must specify at least a storage class or a type" +4219 "nonstandard extension used : trailing ',' used for variable argument list" +4220 "varargs matches remaining parameters" +4221 "nonstandard extension used : '%Fs' : cannot be initialized using address of automatic variable '%Fs'" +4222 "nonstandard extension used : '%Fs' : 'static' should not be used on member functions defined at file scope" +4223 "nonstandard extension used : non-lvalue array converted to pointer" + +4241 "'%Fs' : member access is restricted" + +4243 "%Fs conversion from '%Fs' to '%Fs' exists, but is inaccessible" + +4245 "'friend' specified for nonexistent function '%Fs'" + +4247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +4248 "'%Fs' : cannot access %Fs %Fs declared in class '%Fs'" +4249 "'%Fs' : no path to %Fs %Fs declared in virtual base '%Fs'" +4250 "'%Fs' : inherits '%Fs::%Fs' via dominance" +4251 "'%Fs' : base type '%Fs' should be exported to export %Fs '%Fs'" +4252 "'%Fs' is not defined; cannot specify CodeView information" + +4260 "no override, '%Fs::%Fs' has %Fs 'this' memory model whereas '%Fs::%Fs' has %Fs 'this' memory model" +4261 "no override, '%Fs::%Fs' has %Fs calling convention whereas '%Fs::%Fs' has %Fs calling convention" +4262 "no override, '%Fs::%Fs' has %Fs 'this' whereas '%Fs::%Fs' has %Fs 'this'" + +4270 "'%Fs' : do not initialize a non-const '%Fs' with a non-lvalue '%Fs' function return" + +4300 "conversion of pointer to nonintegral type" + +4305 "'%Fs' : truncation from '%Fs' to '%Fs'" +4306 "'%Fs' : conversion from '%Fs' to '%Fs' of greater size" +4307 "'%Fs' : integral constant overflow" +4308 "negative integral constant converted to unsigned type" +4309 "'%Fs' : truncation of constant value" + +4341 "'%Fs' : signed value is out of range for enum constant" +4342 "precision lost in initialization of enum constant" + +4354 "'%Fs' : initialization of reference to member requires a temporary variable" +4355 "'this' : used in base member initializer list" + +4385 "%Fs the '%Fs' in base '%Fs'" +4386 "%Fs to the '%Fs' in base '%Fs'" +4387 "'%Fs' : was considered" + +4401 "'%Fs' : member is bit field" +4402 "must use PTR operator" +4403 "illegal PTR operator" +4404 "period on directive ignored" +4405 "'%Fs' : identifier is reserved word" +4406 "operand on directive ignored" + +4409 "illegal instruction size" +4410 "illegal size for operand" +4411 "'%Fs' : symbol resolves to displacement register" + +4414 "'%Fs' : short jump to function converted to near" + +4500 "'%Fs' : class has private/protected data members; user-defined constructor advised" +4501 "'%Fs' : use of '::' unnecessary here" +4502 "'linkage' requires use of keyword 'extern'" + +4504 "type still ambiguous after parsing %d tokens, assuming declaration" +4505 "'%Fs' : unreferenced local function has been removed" +4506 "no definition for inline function '%Fs'" +4507 "explicit linkage specified after default linkage was used" +4508 "'%Fs' : function should return a value; 'void' return type assumed" + +4510 "'%Fs' : default constructor could not be generated" +4511 "'%Fs' : copy constructor could not be generated" +4512 "'%Fs' : assignment operator could not be generated" +4513 "'%Fs' : destructor could not be generated" + +4520 "'%Fs' : multiple default constructors specified" +4521 "'%Fs' : multiple copy constructors specified" +4522 "'%Fs' : multiple assignment operators specified" +4523 "'%Fs' : multiple destructors specified" +4524 "'%Fs' : redundant use of 'friend' on destructor" +4525 "'%Fs' : redundant use of 'friend' on constructor" + +4527 "instances of %Fs '%Fs' can never be destroyed - user-defined destructor required" +4528 "illegal 'pure' syntax, must be '= 0'" + +4607 "'%Fs' : must be initialized in constructor base/member initializer list" + +4610 "%Fs '%Fs' can never be instantiated - user defined constructor required" + +4612 "bad #pragma syntax, pragma ignored" +4613 "'%Fs' : class of segment cannot be changed" +4614 "'%Fs' : varargs parameters with this type were promoted" /* /NT */ +4615 "#pragma warning : unknown user warning type" +4616 "#pragma warning : warning number '%d' out of range, must be between '%d' and '%d'" +4617 "#pragma warning : invalid warning number" + +4620 "no postfix form of 'operator ++' found for type '%Fs', using prefix form" +4621 "no postfix form of 'operator --' found for type '%Fs', using prefix form" +4622 "overwriting debug information formed during creation of the precompiled header in object file: '%s'" + +4630 "'%Fs' : '%Fs' storage-class specifier illegal on member definition" + +4650 "debugging information not in precompiled header; only global symbols from the header will be available" +4651 "'/D%s' specified for precompiled header but not for current compile" +4652 "command-line option '%Fs' inconsistent with precompiled header; precompiled header option ignored" + +4699 "Note: %Fs" + +4706 "assignment within conditional expression" /* QC, c23 */ + +4710 "'%Fs' : function not expanded" /* QC, c23 */ + +4726 "'%c' : unknown memory model command-line option" +4727 "conditional expression is constant" + +4741 "/Oq option ignored for __fastcall function '%Fs'" + +4746 "'%Fs' : unsized array given size %Fs" + +4756 "overflow in constant arithmetic" /* QC2, c1, c23 */ + +4758 "address of automatic (local) variable taken, DS != SS" /* QC, c23 */ +4759 "segment lost in conversion" /* QC, c23 */ +4760 "'%Fs' : segment lost in initialization" /* QC, c23 */ + +4761 "integral size mismatch in argument : conversion supplied" /* QC, c23 */ +4762 "near/far mismatch in argument : conversion supplied" /* QC, c23 */ + +4769 "conversion of near pointer to long integer" /* QC, c23 */ + +4785 "near call to '%Fs' in different segment" /* QC, c23 */ + +4788 "'%Fs' : identifier was truncated to '%d' characters" + +4793 "native code generated for p-code function '%Fs' with inline assembly" + +4900 "intermediate language mismatch between '%s' version '%ld' and '%s' version '%ld'" + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" + /* errors */ + +2001 "newline in constant" +2002 "invalid wide-character constant" +2003 "expected 'defined id'" +2004 "expected 'defined(id)'" +2005 "#line expected a line number, found '%Fs'" +2006 "#include expected a filename, found '%Fs'" +2007 "#define syntax" +2008 "'%c' : unexpected in macro definition" +2009 "reuse of macro formal '%Fs'" +2010 "'%c' : unexpected in macro formal parameter list" +2011 "'%Fs' : '%Fs' type redefinition" +2012 "missing name following '<'" +2013 "missing '>'" +2014 "preprocessor command must start as first nonwhite space" +2015 "too many characters in constant" +2016 "no closing single quotation mark" +2017 "illegal escape sequence" +2018 "unknown character '0x%x'" +2019 "expected preprocessor directive, found '%c'" +2020 "'%Fs' : '%Fs' member redefinition" +2021 "expected exponent value, not '%c'" +2022 "'%ld' : too big for character" +2023 "divide by 0" +2024 "mod by 0" +2025 "'%s' : enum/struct/union type redefinition" /* QC 2.5 */ +2026 "string too big, trailing characters truncated" +2027 "use of undefined type '%Fs'" +2028 "struct/union member must be inside a struct/union" +2029 "left of '%s' specifies undefined class/struct/union '%Fs'" +2030 "'%Fs' : struct/union member redefinition" /* QC 2.5 */ +2031 "'%Fs' : function cannot be struct/union member" /* QC 2.5 */ +2032 "'%Fs' : function cannot be member of %Fs '%Fs'" +2033 "'%Fs' : bit field cannot have indirection" +2034 "'%Fs' : type of bit field too small for number of bits" +2035 "struct/union '%Fs' : unknown size" /* QC 2.5 */ +2036 "'%Fs' : unknown size" +2037 "left of '%s' specifies undefined struct/union '%Fs'" +2038 "'%s' : not struct/union member" /* QC 2.5 */ +2039 "'%Fs' : is not a member of '%Fs'" +2040 "'%Fs' : different levels of indirection" +2041 "illegal digit '%c' for base '%d'" +2042 "signed/unsigned keywords mutually exclusive" +2043 "illegal break" +2044 "illegal continue" +2045 "'%Fs' : label redefined" +2046 "illegal case" +2047 "illegal default" +2048 "more than one default" +2049 "case value '%ld' already used" +2050 "switch expression not integral" +2051 "case expression not constant" +2052 "case expression not integral" +2053 "'%Fs' : wide string mismatch" +2054 "expected '(' to follow '%Fs'" +2055 "expected formal parameter list, not a type list" +2056 "illegal expression" +2057 "expected constant expression" +2058 "constant expression is not integral" +2059 "syntax error : '%Fs'" +2060 "syntax error : end of file found" +2061 "syntax error : identifier '%Fs'" +2062 "type '%Fs' unexpected" +2063 "'%Fs' : not a function" +2064 "term does not evaluate to a function" +2065 "'%Fs' : undeclared identifier" +2066 "cast to function type is illegal" +2067 "cast to array type is illegal" +2068 "illegal cast from '%Fs' to '%Fs'" +2069 "cast of 'void' term to non-'void'" +2070 "illegal sizeof operand" +2071 "'%Fs' : illegal storage class" +2072 "'%Fs' : initialization of a function" +2073 "'%Fs' : partially initialized array requires a default constructor" +2074 "'%Fs' : '%Fs' initialization needs curly braces" +2075 "'%Fs' : array initialization needs curly braces" +2076 "'%Fs' : struct/union initialization needs curly braces" /* QC 2.5 */ +2077 "nonscalar field initializer '%Fs'" +2078 "too many initializers" +2079 "'%Fs' uses undefined class/struct/union '%Fs'" +2080 "illegal __far __fastcall function or __saveregs function" +2081 "'%Fs' : name in formal parameter list illegal" +2082 "redefinition of formal parameter '%Fs'" +2083 "%Fs comparison illegal" +2084 "function '%Fs' already has a body" +2085 "'%Fs' : not in formal parameter list" +2086 "'%Fs' : redefinition" +2087 "'%Fs' : missing subscript" +2088 "'%Fs' : illegal for %Fs" +2089 "'%Fs' : '%Fs' too large" +2090 "function returns array" +2091 "function returns function" +2092 "array element type cannot be function" +2093 "'%Fs' : cannot be initialized using address of automatic variable '%Fs'" +2094 "label '%Fs' was undefined" +2095 "'%Fs' : actual parameter has type 'void' : parameter %d" +2096 "struct/union comparison illegal" /* QC 2.5 */ +2097 "illegal initialization" +2098 "expression is not an address" +2099 "initializer is not a constant" +2100 "illegal indirection" +2101 "'%Fs' on constant" +2102 "'%Fs' requires l-value" +2103 "'%Fs' on register variable" +2104 "'%Fs' on bit field ignored" +2105 "'%Fs' needs l-value" +2106 "'%Fs' : left operand must be l-value" +2107 "illegal index, indirection not allowed" +2108 "subscript is not of integral type" +2109 "subscript requires array or pointer type" +2110 "cannot add two pointers" +2111 "pointer addition requires integral operand" +2112 "pointer subtraction requires integral or pointer operand" +2113 "pointer can only be subtracted from another pointer" +2114 "'%Fs' : pointer on left; needs integral value on right" +2115 "'%Fs' : incompatible types" +2116 "function parameter lists differed" +2117 "'%Fs' : array bounds overflow" +2118 "negative subscript" +2119 "typedef types both define indirection" +2120 "'void' illegal with all types" +2121 "'%Fs' : bad %Fs operand" +2122 "'%Fs' : prototype parameter in name list illegal" +2123 "'%Fs' : cannot call __fastcall function '%Fs' from p-code" +2124 "divide or mod by zero" +2125 "'%Fs' : allocation exceeds 64K" /* QC, c23 */ +2126 "'%Fs' : incorrect operand" +2127 "parameter allocation exceeds 32K" /* QC, c23 */ +2128 "'%Fs' : alloc_text/same_seg applicable only to functions with C linkage" +2129 "static function '%Fs' declared but not defined" +2130 "#line expected a string containing the filename, found '%Fs'" +2131 "more than one memory attribute" +2132 "syntax error : unexpected identifier" +2133 "'%Fs' : unknown size" +2134 "'%Fs' : struct/union too large" /* QC 2.5 */ +2135 "'%Fs' : illegal bit field operation" +2136 "'%Fs' : prototype must have parameter types" +2137 "empty character constant" +2138 "illegal to define an enumeration without any members" +2139 "type following '%s' is illegal" +2140 "parameter cannot be function type" +2141 "value out of range for enum constant" +2142 "function declarations differ, variable parameters specified only in one of them" +2143 "syntax error : missing '%Fs' before '%Fs'" +2144 "syntax error : missing '%Fs' before type '%Fs'" +2145 "syntax error : missing '%Fs' before identifier" +2146 "syntax error : missing '%Fs' before identifier '%Fs'" +2147 "'%Fs' : const array must be fully initialized" +2148 "array too large" +2149 "'%Fs' : named bit field cannot have zero width" +2150 "'%Fs' : bit field must have type 'int', 'signed int', or 'unsigned int'" +2151 "more than one language attribute" +2152 "'%Fs' : pointers to functions with different attributes" +2153 "hex constants must have at least one hex digit" +2154 "'%Fs' : does not refer to a segment name" +2155 "'?' : invalid left operand, expected arithmetic or pointer type" +2156 "pragma must be outside function" +2157 "'%Fs' : must be declared before use in pragma list" +2158 "'%Fs' : is a function" +2159 "more than one storage class specified" +2160 "'##' cannot occur at the beginning of a macro definition" +2161 "'##' cannot occur at the end of a macro definition" +2162 "expected macro formal parameter" +2163 "'%Fs' : not available as an intrinsic function" +2164 "'%Fs' : intrinsic function not declared" +2165 "'%Fs' : cannot modify pointers to data" +2166 "l-value specifies const object" +2167 "'%Fs' : too many actual parameters for intrinsic function" +2168 "'%Fs' : too few actual parameters for intrinsic function" +2169 "'%Fs' : intrinsic function, cannot be defined" +2170 "'%Fs' : not declared as a function, cannot be intrinsic" +2171 "'%Fs' : illegal operand" +2172 "'%Fs' : actual parameter is not a pointer : parameter %d" +2173 "'%Fs' : actual parameter is not a pointer : parameter %d, parameter list %d" +2174 "'%Fs' : actual parameter has type 'void' : parameter %d, parameter list %d" +2175 "'%Fs' : invalid locale" +2176 "static huge data not supported by '%Fs'" /* QC & Pcode */ +2177 "constant too big" +2178 "'%Fs' : storage class for same_seg variables must be extern" +2179 "'%Fs' : was used in same_seg, but storage class is no longer extern" +2180 "controlling expression has type 'void'" +2181 "illegal else without matching if" +2182 "'%Fs' : has type 'void'" +2183 "syntax error: translation unit is empty" +2184 "illegal return of a 'void' value" +2185 "'%Fs' : illegal based allocation" +2186 "'%Fs' : illegal operand of type 'void'" +2187 "cast of near function pointer to far function pointer" +2188 "'%ld' : too big for wide character" +2189 "#error : %Fs" +2190 "first parameter list longer than second" +2191 "second parameter list longer than first" +2192 "parameter '%d' declaration different" +2193 "'%Fs' : already in a segment" +2194 "'%Fs' : is a text segment" +2195 "'%Fs' : is a data segment" +2197 "'%Fs' : too many actual parameters" +2198 "'%Fs' : too few actual parameters" +2199 "syntax error : found '%Fs (' at global scope (was a declaration intended?)" +2200 "'%Fs' : function has already been defined" +2201 "'%Fs' : cannot export static declarations" +2202 "'%Fs' : not all control paths return a value" +2203 "delete operator cannot specify bounds for an array" +2204 "'%Fs' : type definition found within parentheses" +2205 "'%Fs' : cannot initialize extern variables with block scope" +2206 "'%Fs' : typedef cannot be used for function definition" +2207 "'%Fs' in struct/union '%Fs' has a zero-sized array" /* QC 2.5 */ +2208 "'%Fs' : no members defined using this type" +2209 "type cast in __based construct must be (__segment)" +2210 "'%Fs' : must be near/far data pointer" +2211 "(__segment) applied to function identifier '%Fs'" +2212 "'%Fs' : __based not available for pointers to functions" +2213 "'%Fs' : illegal argument to __based" +2214 "pointers based on 'void' require the use of :>" +2215 "':>' operator only for objects based on 'void'" +2216 "'%Fs' cannot be used with '%Fs'" +2217 "'%Fs' must be used with '%Fs'" +2218 "type in __based construct must be 'void'" +2219 "syntax error : type qualifier must be after '*'" +2220 "warning treated as error - no object file generated" +2221 "'.' : left operand points to class/struct/union, use '->'" /* QC 2.5 */ +2222 "'->' : left operand has struct/union type, use '.'" /* QC 2.5 */ +2223 "left of '->%Fs' must point to class/struct/union" +2224 "left of '.%Fs' must have class/struct/union type" +2225 "'%Fs' : function allocation must be in a named segment" +2226 "syntax error : unexpected type '%Fs'" +2227 "left of '->%Fs' must point to class/struct/union" +2228 "left of '.%Fs' must have class/struct/union type" +2229 "%Fs '%Fs' has an illegal zero-sized array" +2230 "'%Fs' : indirection to different types" +2231 "'.' : left operand points to '%Fs', use '->'" +2232 "'->' : left operand has '%Fs' type, use '.'" +2233 "'%Fs' : arrays of objects containing zero-size arrays are illegal" +2234 "arrays of references are illegal" +2235 "';' in formal parameter list" +2236 "unexpected '%Fs' '%Fs'" +2237 "unexpected %Fs '%Fs'" +2238 "unexpected token[s] preceding '%s'" +2239 "unexpected token '%Fs' following declaration of '%Fs'" +2240 "unexpected '%Fs' following formal list (only modifiers are allowed)" +2241 "'%Fs' : member access is restricted" +2242 "typedef name cannot follow class/struct/union" +2243 "%Fs conversion from '%Fs' to '%Fs' exists, but is inaccessible" +2244 "'%Fs' : unable to resolve function overload" +2245 "nonexistent function '%Fs' specified as friend" +2246 "'%Fs' : illegal static data member in locally defined class" +2247 "'%Fs' not accessible because '%Fs' uses '%Fs' to inherit from '%Fs'" +2248 "'%Fs' : cannot access %Fs %Fs declared in class '%Fs'" +2249 "'%Fs' : no accessible path to %Fs %Fs declared in virtual base '%Fs'" +2250 "'%Fs' : ambiguous inheritance of '%Fs::%Fs'" +2251 "'%Fs' : defined but not declared" +2252 "'%Fs' : pure specifier can only be specified for functions" +2253 "'%Fs' : pure specifier only applies to virtual function - specifier ignored" +2254 "'%Fs' : pure specifier not allowed on friend functions" +2255 "'%Fs' : a friend function can only be declared in a class" +2256 "illegal use of friend specifier on '%Fs'" +2257 "p-code generation pragma not allowed without /Oq" +2258 "illegal pure syntax, must be '= 0'" +2259 "'%Fs' : illegal attempt to instantiate abstract class" +2260 "function pointer cast to a data pointer" +2261 "data pointer cast to a function pointer" +2262 "'%Fs' : cannot be destroyed" +2263 "function returns pointer based on __self" +2264 "'%Fs' : error in function definition or declaration; function not called" +2265 "'%Fs' : reference to a zero-sized array is illegal" +2266 "'%Fs' : reference to a nonconstant bounded array is illegal" +2267 "'%Fs' : static functions with block scope are illegal" +2268 "'%Fs' : different const or volatile qualifiers" +2269 "'%Fs' : different ambient model than base class '%Fs'" +2270 "'%Fs' : modifiers not allowed on nonmember functions" +2271 "'%Fs' : new/delete cannot have formal list modifiers" +2272 "'%Fs' : modifiers not allowed on static member functions" +2273 "'%Fs' : illegal as right side of '->' operator" +2274 "'%Fs' : illegal as right side of '.' operator" +2275 "'%Fs' : illegal use of this type as an expression" +2276 "'%Fs' : illegal operation on bound member function expression" +2277 "'%Fs' : cannot take the address of a constructor" +2278 "'%Fs' : no function with C linkage found" +2279 "cannot use braces to initialize default arguments" +2280 "missing '{' before identifier '%Fs'?" +2281 "'%Fs' : is not a function, but contains <function returning>; '%Fs' is unexpected" +2282 "'%Fs' is followed by '%Fs' (missing ','?)" +2283 "'%Fs' : pure specifier not allowed on unnamed %Fs" +2284 "unbalanced parenthesis found while processing a member function" +2285 "pointers to members representation has already been determined - pragma ignored" +2286 "pointers to members of '%Fs' representation is already set to %s inheritance - declaration ignored" +2287 "'%Fs': inheritance representation: '%Fs' is less general than the required '%Fs'" +2288 "typedef has a trailing __based which cannot be applied to the symbol's indirection" +2289 "same type qualifier used more than once" +2290 "C++ '%Fs' syntax is reserved for future use" +2291 "'%Fs' : illegal modifier '%Fs' for 'this' pointer" +2292 "'%Fs': best case inheritance representation: '%Fs' declared but '%Fs' required" +2293 "'%Fs': illegal to have a non-static member variable as a __based specifier" + +2300 "'%Fs' : class does not have a destructor called '~%Fs'" +2301 "left of '->~%Fs' must point to class/struct/union" +2302 "left of '.~%Fs' must have class/struct/union type" + +2350 "'%Fs' is not a static member" +2351 "obsolete C++ constructor initialization syntax" +2352 "'%Fs::%Fs' : illegal call of nonstatic member function" +2353 "'%Fs' : improper use of constructor initializers" +2354 "'%Fs' : initialization of reference member requires a temporary variable" +2355 "'this' : can only be referenced inside nonstatic member functions" +2356 "initialization segment must not change during translation unit" + +2360 "initialization of '%Fs' is skipped by 'case' label" +2361 "initialization of '%Fs' is skipped by 'default' label" +2362 "initialization of '%Fs' is skipped by 'goto %Fs'" + +2369 "'%Fs' : redefinition; different subscripts" +2370 "'%Fs' : redefinition; different storage class" +2371 "'%Fs' : redefinition; different basic types" +2372 "'%Fs' : redefinition; different types of indirection" +2373 "'%Fs' : redefinition; different type modifiers" +2374 "'%Fs' : redefinition; multiple initialization" +2375 "'%Fs' : redefinition; different linkage" +2376 "'%Fs' : redefinition; different based allocation" +2377 "'%Fs' : redefinition; typedef cannot be overloaded with any other symbol" +2378 "'%Fs' : redefinition; symbol cannot be overloaded with a typedef" +2379 "formal parameter %d has different type when promoted" +2380 "type[s] preceding '%Fs' (constructor with return type, or illegal redefinition of current class-name?)" + +2385 "'%Fs::%Fs' is ambiguous" +2386 "ambiguous conversion from '%Fs*' to '%Fs*'" +2387 "ambiguous conversion from '%Fs&' to '%Fs&'" + +2390 "'%Fs' : incorrect storage class '%Fs'" +2391 "'%Fs' : 'friend' cannot be used during type definition" + +2400 "inline syntax error in '%Fs'; found '%Fs'" +2401 "'%Fs' : register must be base in '%Fs'" +2402 "'%Fs' : register must be index in '%Fs'" +2403 "'%Fs' : register must be base/index in '%Fs'" +2404 "'%Fs' : illegal register in '%Fs'" +2405 "illegal short forward reference with offset" +2406 "'%Fs' : name undefined in '%Fs'" +2407 "illegal 'float' register in '%Fs'" +2408 "illegal type on PTR operator in '%Fs'" +2409 "illegal type used as operator in '%s'" +2410 "'%Fs' : ambiguous member name in '%Fs'" +2411 "'%Fs' : illegal struct/union member in '%Fs'" +2412 "'%Fs' : case-insensitive label redefined" +2413 "'%Fs' : illegal align size" +2414 "illegal number of operands" +2415 "improper operand type" +2416 "'%Fs' : illegal opcode for processor" +2417 "divide by zero in '%Fs'" +2418 "'%Fs' : not in a register" +2419 "mod by zero in '%Fs'" +2420 "'%Fs' : illegal symbol in %Fs" +2421 "PTR operator used with register in '%Fs'" +2422 "illegal segment override in '%Fs'" +2423 "'%ld' : illegal scale" +2424 "'%Fs' : improper expression in '%Fs'" +2425 "'%Fs' : nonconstant expression in '%Fs'" +2426 "'%Fs' : illegal operator in '%Fs'" +2427 "'%Fs' : jump referencing label is out of range" /* QC */ + +2429 "'%Fs' : illegal far label reference" +2430 "more than one index register in '%Fs'" +2431 "illegal index register in '%Fs'" +2432 "illegal reference to 16-bit data in '%Fs'" +2433 "'%Fs' : '%Fs' not permitted on data declarations" +2434 "'%Fs' : cannot convert default argument from '%Fs' to '%Fs'" +2435 "'%Fs' : function called before default arguments were resolved" +2436 "'%Fs' : cannot initialize member functions" +2437 "'%Fs' : already initialized" +2438 "'%Fs' : cannot initialize static class data via constructor" +2439 "'%Fs' : member could not be initialized" +2440 "'%Fs' : cannot convert from '%Fs' to '%Fs'" +2441 "function call through pointer before default arguments were resolved" +2442 "p-code expression too complex for setjmp or Catch" +2443 "operand size conflict" + +2446 "'%Fs' : no conversion from '%Fs' to '%Fs'" +2447 "missing function header (old-style formal list?)" +2448 "'%Fs' : function-style initializer appears to be a function definition" +2449 "found '{' at file scope (missing function header?)" +2450 "switch expression of type '%Fs' is illegal" +2451 "conditional expression of type '%Fs' is illegal" +2452 "array bound expression of type '%Fs' is illegal" +2453 "array bound expression uses function name" + +2458 "'%Fs' : redefinition within definition" +2459 "'%Fs' : is being defined; cannot add as an anonymous member" +2460 "'%Fs' : uses '%Fs', which is being defined" +2461 "'%Fs' : constructor syntax missing formal parameters" +2462 "'%Fs' : cannot define a type in a 'new-expression'" +2463 "cannot define an anonymous type in a 'new-expression'" +2464 "'%Fs' : cannot use 'new' to allocate a reference" +2465 "cannot define an anonymous type inside parentheses" +2466 "cannot allocate an array of constant size 0" +2467 "illegal declaration of anonymous '%Fs'" +2468 "'new' : cannot allocate 'const'/'volatile' objects (type is '%Fs')" +2470 "cannot open database '%Fs'" +2471 "cannot update database '%Fs'" + +2500 "'%Fs' : '%Fs' is already a direct base class" +2501 "'%Fs' : missing decl-specifiers" +2502 "'%Fs' : too many access modifiers on the base class" +2503 "'%Fs' : base classes cannot contain zero-sized arrays" +2504 "'%Fs' : base class undefined" +2505 "'%Fs' : is not a legal base class" +2506 "'%Fs' : ambiguous" +2507 "'%Fs' : too many virtual modifiers on the base class" +2508 "'%Fs' : access denied" +2509 "'%Fs' : member function not declared in '%Fs'" +2510 "'%Fs' : left of '::' must be a class/struct/union" +2511 "'%Fs' : overloaded member function not found in '%Fs'" +2512 "'%Fs' : no appropriate default constructor available" +2513 "'%Fs' : decl-specifier is missing a declarator before '='" +2514 "'%Fs' : class has no constructors" +2515 "'%Fs' : not in class '%Fs'" + +2517 "'%Fs' : right of '::' is undefined" + +2519 "cannot convert '%Fs *' to '%Fs *'" + +2523 "'%Fs::~%Fs' : destructor tag mismatch" +2524 "'%Fs' : destructors must have a 'void' formal parameter list" +2525 "'%Fs' : explicit destructor is named but not called" + +2527 "'%Fs' : array of references must be fully initialized" +2528 "illegal pointer to reference" +2529 "illegal reference to a reference" +2530 "'%Fs' : references must be initialized" +2531 "'%Fs' : reference to a bit field illegal" +2532 "'%s' : cannot modify references" +2533 "'%Fs' : constructors not allowed a return type" +2534 "'%Fs' : constructor cannot return a value" +2535 "'%Fs' : member function already defined or declared" +2536 "'%Fs::%Fs' : cannot specify explicit initializer for arrays" +2537 "'%Fs' : illegal linkage specification" +2538 "new : cannot specify initializer for arrays" +2539 "new : '%Fs' no default constructor to initialize arrays of objects" +2540 "nonconstant expression as array bound" +2541 "delete : cannot delete objects that are not pointers" +2542 "'%Fs' : class object has no constructor for initialization" +2543 "expected ']' for operator '[]'" +2544 "expected ')' for operator '()'" +2545 "'%Fs' : unable to find overloaded operator" +2546 "'%Fs' : illegal mix of 'void' pointer with pointer to type" +2547 "illegal cast of overloaded function" +2548 "'%Fs' : missing default parameter for parameter %s" +2549 "user-defined conversion cannot specify a return type" +2550 "'%Fs' : constructor initializer lists are only allowed on constructor definitions" +2551 "'void *' type needs explicit cast" +2552 "'%Fs' : nonaggregates cannot be initialized with initializer list" +2553 "no legal conversion of return value to return type '%Fs'" +2555 "'%Fs::%Fs' : overriding virtual function differs from '%Fs::%Fs' only by return type" +2556 "'%Fs' : overloaded functions only differ by return type" +2557 "'%Fs' : private and protected members cannot be initialized without a constructor" +2558 "'%Fs' : no copy constructor available" +2559 "'%Fs' : no match for specified operator" +2560 "'%Fs' : overloaded function differs only by calling convention/memory model" +2561 "'%Fs' : function must return a value" +2562 "'%Fs' : 'void' function returning a value" +2563 "mismatch in formal parameter list" +2564 "formal/actual parameters mismatch in call through pointer to function" +2565 "'::%Fs' was previously declared as a global function" +2566 "overloaded function in conditional expression" +2567 "'%Fs' : intrinsic function must have prototypes when using C++" +2568 "'%Fs' : unable to resolve function overload '%Fs'" +2569 "'%Fs' : union cannot be used as a base class" +2570 "'%Fs' : union cannot have base classes" +2571 "'%Fs' : union cannot have virtual function '%Fs'" +2572 "'%Fs' : redefinition of default parameter : parameter %s" +2573 "'%Fs' : simple type cast must have exactly one expression" +2574 "'%Fs' : illegal static destructor declaration" +2575 "'%Fs' : only member functions and bases can be virtual" +2576 "'%Fs' : virtual used for static member function" +2577 "'%Fs' : destructor cannot return a value" + +2579 "'%Fs::%Fs(%s)' : parameter list not sufficiently different to '%Fs::%Fs(%s)'" +2580 "redefinition of class name '%Fs'" +2581 "'%Fs' : static 'operator =' function is illegal" +2582 "'%Fs' : 'operator =' function is unavailable" +2583 "'%Fs' : illegal const/volatile 'this' pointer used for constructors/destructors" +2584 "'%Fs' : direct base '%Fs' is inaccessible; already a base of '%Fs'" +2585 "explicit conversion to '%Fs' is ambiguous" +2586 "incorrect user-defined conversion syntax : illegal indirections" +2587 "'%Fs' : illegal use of local variable as default parameter" +2588 "'::~%Fs' : illegal global destructor" +2589 "'%Fs' : illegal token on right side of '::'" +2590 "'%Fs' : ambiguous user-defined conversions in switch expression" +2591 "'%Fs' : ambiguous user-defined conversions in conditional expression" +2592 "no legal conversion of initialization expression to type '%Fs'" +2593 "'operator %Fs' is ambiguous" +2594 "'%Fs' : ambiguous conversions from '%Fs' to '%Fs'" +2595 "'%Fs' : qualified name already has a constructor" +2596 "'%Fs' : qualified name already has a destructor" +2597 "'%Fs' : does not specify an object" +2598 "linkage specification must be at global scope" +2599 "'%Fs' : local functions are not supported" +2601 "functions cannot be defined in local classes" +2602 "'%Fs::%Fs' is not a member of a base of '%Fs'" +2603 "illegal access declaration: '%Fs' is not a direct base of '%Fs'" +2604 "cannot declare %Fs access to %Fs member '%Fs::%Fs'" +2605 "overloaded functions '%Fs::%Fs' do not have same access" +2606 "'%Fs::%Fs': illegal private access declaration" +2607 "'%Fs' : cannot implicitly convert a '%Fs' to a '%Fs' that is not const" +2608 "illegal reference cast - operand not an l-value" +2609 "'%Fs' : cannot implicitly convert a non-lvalue '%Fs' function return to a '%Fs' that is not const" +2610 "%Fs '%Fs' can never be instantiated; user-defined constructor is required" +2611 "'%Fs' : illegal following '~' (expected identifier)" +2612 "trailing '%Fs' illegal in base/member initializer list" +2613 "trailing '%Fs' illegal in base class list" +2614 "'%Fs' : illegal member initialization: '%Fs' is not a base or member" +2615 "memory attribute must appear before class name in pointer to member" +2617 "'%Fs' : inconsistent return statement" +2618 "'%Fs' : inconsistent return statement" +2619 "union '%Fs' : cannot have static member variable '%Fs'" +2620 "union '%Fs' : member '%Fs' has default constructor" +2621 "union '%Fs' : member '%Fs' has copy constructor" +2622 "union '%Fs' : member '%Fs' has assignment operator" +2623 "union '%Fs' : member '%Fs' has destructor" +2624 "'%Fs' : references to 'void' are illegal" +2625 "anonymous union did not declare any data members" +2626 "anonymous union defines %Fs member '%Fs'" +2627 "member function defined in unnamed class" +2628 "'%Fs' followed by '%Fs' is illegal (did you forget a ';'?)" +2629 "unexpected '%s ('" +2630 "'%Fs' found in what should be a comma-separated list" +2631 "'%Fs' : destructors not allowed a return type" +2632 "'%Fs' followed by '%Fs' is illegal" +2633 "'%Fs' : 'inline' is the only legal storage class for constructors" +2634 "'&%Fs::%Fs' : pointer to reference member is illegal" +2635 "cannot convert a '%Fs*' to a '%Fs*'; conversion from a virtual base class is implied" +2636 "pointer to reference member is illegal" +2637 "'%s' : cannot modify pointers to data members" +2638 "'%Fs' : memory model modifier illegal on pointer to data member" +2639 "compiler generated %Fs required by unnamed class" + +2641 "illegal pointer to member cast across virtual inheritance path" +2642 "cast to pointer to member must be from related pointer to member" +2643 "illegal cast from pointer to member" +2644 "basis class '%Fs' for pointer to member has not been defined" +2645 "no qualified name for pointer to member (found ':: *')" +2646 "global anonymous unions must be declared static" +2647 "'%Fs' : cannot dereference a '%Fs' on a '%Fs'" +2648 "'%Fs' : use of member as default parameter requires static member" +2649 "'%Fs' : is not a '%Fs'" +2650 "'%Fs' : cannot be a virtual function" + +2652 "'%Fs' : illegal copy constructor: first parameter must not be a '%Fs'" +2653 "'%Fs' : is not a class name" +2654 "'%Fs' : attempt to access member outside a member function" +2655 "'%Fs' : definition or redeclaration illegal in current scope" +2656 "'%Fs' : function not allowed as a bit field" +2657 "'%Fs::*' found at the start of a statement (did you forget to specify a type?)" +2658 "multiple conversions : %Fs(%Fs) and %Fs::operator %Fs()" +2659 "'%Fs' : overloaded function as left operand" +2660 "'%Fs' : function does not take %d parameters" +2661 "'%Fs' : no overloaded function takes %d parameters" +2662 "'%Fs' : cannot convert 'this' pointer from '%Fs' to '%Fs'" +2663 "'%Fs' : %d overloads have no legal conversion for 'this' pointer" +2664 "'%Fs' : cannot convert parameter %d from '%Fs' to '%Fs'" +2665 "'%Fs' : %d overloads have no legal conversion for parameter %d" +2666 "'%Fs' : %d overloads have similar conversions" +2667 "'%Fs' : none of %d overload have a best conversion" +2668 "'%Fs' : ambiguous call to overloaded function" + +2671 "'%Fs' : static member functions do not have 'this' pointers" +2672 "'%Fs' : new/delete member functions do not have 'this' pointers" +2673 "'%Fs' : global functions do not have 'this' pointers" +2674 "'%Fs' : no acceptable conversions from '%Fs' to '%Fs'" +2675 "unary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the predefined operator" +2676 "binary '%Fs' : '%Fs' does not define this operator or a conversion to a type acceptable to the predefined operator" +2677 "binary '%Fs' : no global operator defined which takes type '%Fs' (or there is no acceptable conversion)" + +2701 "'%Fs' : __oldcall function defined with varargs" /* /NT */ +2702 " __try may not appear in termination block" /* /NT */ +2703 "illegal __leave statement" +2704 "'%Fs' : __va_start intrinsic only allowed in varargs" /* /NT */ +2705 "'%Fs' : illegal jump into __try scope" /* /NT */ + +2707 "'%Fs' : bad context for intrinsic function" /* /NT */ +2708 "'%Fs' : actual parameters length in bytes differs from previous call or reference" +2709 "'%Fs' : formal parameters length in bytes differs from previous declaration" +2710 "cannot delete a pointer to a const object" +2711 "cannot delete a pointer to a function" + +2720 "'%Fs' : '%Fs' storage-class specifier illegal on members" +2721 "'%Fs' : storage-class specifier illegal between operator keyword and type" +2722 "'::%Fs' : illegal following operator command; use 'operator %Fs'" +2723 "'%Fs' : '%Fs' storage-class specifier illegal on function definition" +2724 "'%Fs' : 'static' should not be used on member functions defined at file scope" + +2730 "'%Fs' : cannot be a base class of itself" +2731 "'%Fs' : function cannot be overloaded" +2732 "linkage specification contradicts earlier specification for %Fs" +2733 "second C linkage of overloaded function '%Fs' not allowed" +2734 "'%Fs' : const object must be initialized if not extern" +2735 "'%Fs' keyword is not permitted in formal parameter type specifier" +2736 "'%Fs' keyword is not permitted in cast" +2737 "'%Fs' : base class '%Fs' must be exported" + +2750 "'%Fs' : 'const T' to 'T' : '%Fs' to '%Fs'" +2751 "'%Fs' : 'volatile T' to 'T' : '%Fs' to '%Fs'" +2752 "'%Fs' : 'const T *' to 'T *' : '%Fs' to '%Fs'" +2753 "'%Fs' : 'volatile T *' to 'T *' : '%Fs' to '%Fs'" +2754 "'%Fs' : 'const T **' to 'T **' : '%Fs' to '%Fs'" +2755 "'%Fs' : 'volatile T **' to 'T **' : '%Fs' to '%Fs'" +2756 "'%Fs' : 'memory model mismatch' : '%Fs' to '%Fs'" +2757 "'%Fs' : 'language modifier mismatch: '%Fs' to '%Fs'" +2758 "'%Fs' : must be initialized in constructor base/member initializer list" + +2800 "'operator %Fs' cannot be overloaded" +2801 "'operator %Fs' must be a %Fs member" +2802 "static member 'operator %Fs' has no formal parameters" +2803 "'operator %Fs' must have at least one formal parameter of class type" +2804 "binary 'operator %Fs' has too many parameters" +2805 "binary 'operator %Fs' has too few parameters" +2806 "'operator %Fs' has too many formal parameters" +2807 "the second formal parameter to postfix 'operator %Fs' must be 'int'" +2808 "unary 'operator %Fs' has too many formal parameters" +2809 "'operator %Fs' has no formal parameters" +2810 "second formal parameter for 'operator delete' must be 'unsigned int'" +2811 "too many formal parameters for based form of 'operator delete'" +2812 "second formal parameter required for based form of 'operator delete'" +2813 "too many formal parameters for 'operator delete'" +2814 "second actual parameter for based form of 'operator delete' must be '__based(void)*'" +2815 "first actual parameter for based form of 'operator delete' must be '__segment'" +2816 "alternative form of 'operator delete' must be a member" +2817 "return type for 'operator delete' must be 'void'" +2818 "incorrect return type for 'operator ->'" +2819 "recursive return type for 'operator ->'" +2820 "second formal parameter required for based form of 'operator new'" +2821 "first formal parameter to 'operator new' must be 'unsigned int'" +2822 "second formal parameter for huge form of 'operator new' must be 'unsigned int'" +2823 "return type for based form of 'operator new' must be 'void __based(void)*'" +2824 "return type for 'operator new' must be 'void *'" +2825 "first formal parameter for huge form of 'operator new' must be 'unsigned long'" +2826 "second formal parameter required for huge form of 'operator new'" +2827 "'operator %s' cannot be globally overridden with unary form" +2828 "'operator %s' cannot be globally overridden with binary form" +2829 "'operator %Fs' cannot have a variable parameter list" +2830 "only placement parameters to 'operator new' can have default values" +2831 "'operator %Fs' cannot have default parameters" +2832 "'%Fs' form of 'operator %Fs' cannot be a member" +2833 "'operator %Fs' is not a recognized operator or type" +2834 "'operator %Fs' must be globally qualified" +2835 "user-defined conversion '%Fs' takes no formal parameters" +2836 "cannot export '%Fs': a previous declaration did not export it" +2837 "'%Fs' : illegal local static variable in exported inline function" +2838 "illegal qualified name in member declaration" + +2850 "#pragma hdrstop cannot be nested in a function or definition" +2851 "#pragma hdrstop required for /Yu command-line option without filename" +2852 "'%Fs' is not a valid precompiled header file" +2853 "'%Fs' is not a precompiled header file created with this compiler" +2854 "syntax error in #pragma hdrstop" +2855 "command-line option '%Fs' inconsistent with precompiled header" +2856 "#pragma hdrstop cannot be inside an #if block" +2857 "'#include' statement specified with the /Yc%Fs command-line option was not found in the source file" + +2900 "'%Fs' : huge array cannot be aligned to segment boundary" + +2910 "cannot call function from p-code with more than 255 bytes of arguments" +2911 "cannot define p-code function with more than 255 bytes of parameters" + +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + /* fatals */ + +1001 "internal compiler error\n\t\t(compiler file '%s', line %d)" + +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end of file found" +1005 "string too big for buffer" +1006 "write error on compiler-generated file" +1007 "unrecognized flag '%Fs' in '%Fs'" +1008 "no input file specified" +1009 "compiler limit : macros nested too deeply" +1010 "unexpected end of file while looking for precompiled header directive" +1011 "compiler limit : '%Fs' : macro definition too big" +1012 "unmatched parenthesis : missing '%c'" +1013 "compiler limit : too many open parentheses" +1014 "too many include files : depth = %d" +1015 "compiler limit : too many segments" +1016 "#if[n]def expected an identifier" +1017 "invalid integer constant expression" +1018 "unexpected #elif" +1019 "unexpected #else" +1020 "unexpected #endif" +1021 "invalid preprocessor command '%Fs'" +1022 "expected #endif" +1023 "cannot open source file '%Fs'" +1024 "cannot open include file '%Fs'" +1025 "compiler terminated by user" /* QC */ +1026 "parser stack overflow, program too complex" +1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */ +1028 "'%s' : segment allocation exceeds 64K" /* QC */ +1029 "there are more than 512 bytes of arguments" +1030 "there are more than 512 bytes of local variables" +1031 "compiler limit : function calls nested too deeply" /* QC, c23 */ +1032 "cannot open object code listing file '%s'" /* QC, c23 */ + +1034 "%Fs: no include path set" +1035 "expression too complex; simplify expression" /* QC, c23 */ + +1037 "cannot open object file '%s'" /* QC, c23 */ +1038 "compiler limit : '%Fs' : control flow state too complex; simplify function" + +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "compiler limit : linkage specifications nested too deeply" +1046 "compiler limit : %Fs nested too deeply" +1047 "limit of %Fs exceeded at '%Fs'" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%Fs' : code segment too large" + +1052 "compiler limit : #if or #ifdef blocks nested too deeply" +1053 "compiler limit : struct/union nested too deeply" /* QC 2.5 */ +1054 "compiler limit : initializers nested too deeply" +1055 "compiler limit : out of keys" +1056 "compiler limit : out of macro expansion space" +1057 "unexpected end of file in macro expansion" +1058 "compiler limit : too many formal arguments" +1059 "compiler is out of near heap space" +1060 "compiler is out of far heap space" +1061 "compiler limit : blocks nested too deeply" /* QC */ +1062 "error while writing to preprocessor output file" +1063 "compiler limit : compiler stack overflow" +1064 "compiler limit : token overflowed internal buffer" +1065 "compiler limit : out of tags" +1066 "compiler limit : decorated name length exceeded" + +1068 "cannot open file '%Fs'" +1069 "write error on file '%s'" /* QC */ +1070 "mismatched #if/#endif pair in file '%Fs'" +1071 "unexpected end of file found in comment" +1072 "'%Fs' : cannot read file" + +1082 "Cannot close %Fs file: '%Fs': %Fs (%Fs:%ld)" +1083 "Cannot open %Fs file: '%Fs': %Fs" +1084 "Cannot read %Fs file: '%Fs': %Fs" +1085 "Cannot write %Fs file: '%Fs': %Fs (%Fs:%ld)" +1086 "Cannot seek %Fs file: '%Fs': %Fs (%Fs:%ld)" +1087 "Cannot tell %Fs file: '%Fs': %Fs (%Fs:%ld)" +1088 "Cannot flush %Fs file: '%Fs': %Fs (%Fs:%ld)" + +1090 "data allocation exceeds 64K" /* QC, c23 */ + +1126 "'%Fs' : automatic allocation exceeds %s" /* QC, c23 */ +1127 "'%Fs' : segment redefinition" + +1500 "'%Fs' : cannot open inline function definition file" +1501 "compiler limit : too many temporary variables" +1502 "inline member-function definition missing '}'" +1503 "default parameter definition missing ',' or ')'" +1504 "type still ambiguous after parsing %d tokens, unable to recover" +1505 "unrecoverable parser look-ahead error" +1506 "unrecoverable block scoping error" +1507 "previous user errors and subsequent error recovery halt further compilation" + +1700 "%Fs compiler is out of far heap space" /* QC, c23 */ + +1852 "'%Fs' is not a valid precompiled header file" +1853 "'%Fs' is not a precompiled header file created with this compiler" +1855 "command-line option '%Fs' inconsistent with precompiled header" + +1900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/c23.err b/private/oleauto/tools/win16/hdos/c800/bin/c23.err new file mode 100644 index 000000000..f560113bb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/c23.err @@ -0,0 +1,99 @@ + /* fatals */ + +1001 "internal compiler error\n\t\t(compiler file '%s', line %d)" +1002 "compiler is out of heap space in pass 2" +1003 "error count exceeds %d; stopping compilation" +1004 "unexpected end-of-file found" +1005 "string too big for buffer" +1006 "write error on compiler intermediate file" +1007 "unrecognized flag '%s' in '%s'" +1013 "cannot open source file '%s'" +1015 "compiler limit : too many segments" +1027 "DGROUP data allocation exceeds 64K" +1029 "there are > 512 bytes of arguments" +1030 "there are > 512 bytes of local variables" +1032 "cannot open object listing file '%s'" +1033 "cannot open assembly language output file '%s'" +1035 "expression too complex, please simplify" +1036 "cannot open source listing file '%s'" +1037 "cannot open object file '%s'" +1039 "unrecoverable heap overflow in pass 3" +1040 "unexpected end-of-file in source file '%s'" +1041 "cannot open compiler intermediate file - no more files" +1042 "cannot open compiler intermediate file - no such file or directory" +1043 "cannot open compiler intermediate file" +1044 "out of disk space for compiler intermediate file" +1045 "floating-point overflow" +1048 "unknown option '%c' in '%s'" +1049 "invalid numerical argument '%s'" +1050 "'%s' : code segment too large" + +1055 "compiler limit : out of keys" +1067 "intrinsic not implemented" +1073 "bad '%s' flag, would overwrite '%s' with '%s'" +1074 "too many '%s' flags, '%s'" +1083 "Cannot open %Fs file: '%Fs': %Fs" +1084 "Cannot read %Fs file: '%Fs': %Fs" +1085 "Cannot write %Fs file: '%Fs': %Fs" +1090 "'%s' data allocation exceeds 64K" +1126 "'%s' : automatic allocation exceeds %s" +1127 "'%s' : segment redefinition" +1900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" +1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services" + + /* errors */ + +2125 "'%s' : allocation exceeds 64K" +2127 "parameter allocation exceeds 32K" +2129 "static function '%s' not found" +2220 "warning treated as error - no object file generated" +2374 "'%s' redefinition; multiple initialization" +2418 "'%s' : not in a register" +2427 "'%s' : jump referencing label is out of range" +2900 "'%s' : huge array cannot be aligned to segment boundary" +2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services" + + /* warnings */ + +4700 "local variable '%s' used without having been initialized" +4701 "local variable '%s' may be used without having been initialized" +4702 "unreachable code" +4703 "'%s' : function too large for global optimizations" +4704 "'%s' : in-line assembler precludes global optimizations" +4705 "statement has no effect" +4706 "assignment within conditional expression" +4707 "'%s' : function too large for global optimizations (%s)" /* internal use */ +4708 "ran out of heap at: %s" /* internal use */ +4709 "comma operator within array index expression" +4710 "function '%s' not expanded" +4711 "function '%s' selected for automatic inline expansion" +4712 "'%s' : used as register - loss of debugging information" +4713 "%s: internal compiler error; restarting\n\t\t(compiler file '%s', line %d)" +4723 "potential divide by 0" +4724 "potential mod by 0" +4726 "'%c' : unknown memory-model command-line option" +4727 "conditional expression is constant" +4746 "'%s' : unsized array treated as '%s'" +4756 "overflow in constant arithmetic" +4757 "overflow in constant multiplication" +4758 "address of automatic (local) variable taken, DS != SS" +4759 "segment lost in conversion" +4760 "'%Fs' : segment lost in initialization" +4761 "integral size mismatch in argument; conversion supplied" +4762 "near/far mismatch in argument : conversion supplied" +4763 "'%s' : function too large for post-optimizer" +4765 "recoverable heap overflow in post-optimizer - some optimizations may be missed" +4766 "local symbol table overflow - some local symbols may be missing in listings" +4769 "conversion of near pointer to long integer" +4772 "'%s' : too many debug entry points, maximum %d" +4773 "scoping too deep, deepest scoping merged when debugging" +4785 "near call to '%s' in different segment" +4786 "string too long - truncated to %d characters" +4787 "unprototyped function '%s' called in exception" +4788 "'%Fs' : identifier was truncated to '%d' characters" +4790 "insufficient memory to process debugging information" +4791 "loss of debugging information caused by optimization" +4792 "long double type not supported by alternate math library" +4900 "Il mismatch between '%s' version '%ld' and '%s' version '%ld'" + +4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/cl.err b/private/oleauto/tools/win16/hdos/c800/bin/cl.err new file mode 100644 index 000000000..ff942a472 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/cl.err @@ -0,0 +1,43 @@ + /* error messages */ + +2001 "too many symbols predefined with /D" +2002 "memory-model conflict" +2003 "missing source filename" +2005 "%s requires /vmg" +2008 "limit of %s exceeded at '%s'" +2011 "only one floating-point option allowed" +2012 "too many linker arguments" +2013 "incomplete model specification" +2016 "%s and %s command-line options are incompatible" +2018 "cannot create linker response file" +2019 "cannot overwrite source or object file '%s'" +2020 "%s option requires extended keywords to be enabled (/Ze)" +2021 "invalid numeric argument '%s'" +2022 "cannot open '%s'" +2023 "invalid model specification - flat model only" +2027 "cannot execute '%s'" +2028 "too many open files; cannot redirect '%s'" +2030 "internal compiler error in '%s'" +2031 "too many command-line options" +2000 "unknown command-line error" + + /* warning messages */ + +4001 "listing overrides assembly output" +4002 "ignoring unknown option '%s'" +4003 "processor-option conflict" +4004 "/G3 only available in optimizing compiler; assuming /G2" +4005 "cannot find '%s';\nPlease enter new filename (full path) or CTRL+C to quit: " +4007 "'%s' requires '%s'; option ignored" +4009 "threshold only for far or huge data; ignored" +4011 "preprocessing overrides source listing" +4012 "function declarations override source listing" +4013 "combined listing overrides object listing" +4014 "invalid value '%d' for '%s'; assuming '%d'" +4018 ".DEF files supported for segmented executable files only" +4019 "string too long; truncated to %d characters" +4020 "'%s' : missing argument; option ignored" +4021 "no action performed" +4022 "option '%s' invalid for %d-bit target" +4023 "option '%s' forces use of optimizing compiler" +4000 "unknown command-line warning" diff --git a/private/oleauto/tools/win16/hdos/c800/bin/cl.msg b/private/oleauto/tools/win16/hdos/c800/bin/cl.msg new file mode 100644 index 000000000..e6a82388c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/bin/cl.msg @@ -0,0 +1,139 @@ +C COMPILER OPTIONS +-MEMORY MODEL- +/AS small model (default) +/AC compact model +/AM medium model +/AL large model +/AH huge model +/AT tiny model (.COM files) +/A<string> (custom memory model) +-OPTIMIZATION- +/O enable optimization (same as /Ot) +/O1 minimize space +/O2 maximize speed +/Oa assume no aliasing +/Ob<n> inline expansion (default n=0) +/Oc local common subexpression opt. +/Od disable optimization (default) +/Oe enable registers allocation +/Of[-] toggle p-code quoting +/Og global common subexpression opt. +/Oi enable intrinsic functions +/Ol enable loop optimizations +/On disable "unsafe" optimizations +/Oo[-] toggle post code-gen. opt. +/Op[-] improve floating-pt consistency +/Oq enable maximum p-code optimization +/Or gen. common exit code (CodeView) +/Os favor code size +/Ot favor code speed +/Ov[-] toggle p-code frame sorting +/OV<n> control inlining by func. size +/Ow assume cross-function aliasing +/Ox maximum opts. (/Ob1cegilnot /Gs) +/Oz enable "unsafe" optimizations +-CODE GENERATION- +/G0 8086 instructions (default) +/G1 186 instructions +/G2 286 instructions +/G3 386 instructions +/GA protected-mode Win entry/exit code +/GD protected-mode Win entry/exit code +/GE<x> customize Windows entry/exit +/Gq backwards compatibility with v. 6 +/Gc Pascal style calling conventions +/Gd C style calling conventions +/Ge use stack-check calls +/Gf enable string pooling +/Gs remove stack-check calls +/Gn remove p-code native entry points +/Gp<num> specify p-code entry tables +/Gr _fastcall style calling convention +/Gt[num] data size threshold +/GW real-mode Windows entry/exit code +/Gw real-mode Windows entry/exit code +/Gx assume that data is near +/Gx- assume that data is far +/Gy separate functions for linker +/Zr check null pointers (/f only) +-OUTPUT FILES- +/Fa[file] name assembly listing file +/Fc[file] name source/object listing +/Fd[file] name .PDB filename +/Fe<file> name executable filename +/Fl[file] name object listing filename +/Fm[file] name map filename +/Fo<file> name object filename +/Fr[file] name .SBR filename +/Fp<file> name .PCH filename +/FR[file] name extended .SBR filename +/Fs[file] name source listing filename +-PREPROCESSOR- +/C don't strip comments +/D<name>[=|#text] define macro +/E preprocess to stdout +/EP same as /E but no #line +/I<directory> add #include path +/P preprocess to file +/U<name> remove predefined macro +/u remove all defined macros +/X ignore "standard places" +-LANGUAGE- +/vd{0|1} disable/enable vtordisp +/vm<x> type of pointers to members +/Z7 C 7 style CodeView information +/Za disable extensions (implies /Op) +/Zd line number information +/Ze enable extensions (default) +/Zg generate function prototypes +/Zi prepare for debugging (CodeView) +/Zl omit default library name in .OBJ +/Zp[n] pack structs on n-byte boundary +/Zs check syntax only +-FLOATING POINT- +/FPa calls with altmath +/FPc calls with emulator +/FPc87 calls with 8087 library +/FPi inline with emulator (default) +/FPi87 inline with 8087 +-SOURCE LISTING- +/Sl<columns> set line width +/Sp<lines> set page length +/St<string> set title string +/Ss<string> set subtitle string +-MISCELLANEOUS- +/batch specify batch mode compilation +/Bm<num> set compiler's available mem. +/c compile only, no link +/H<num> external name length +/J default char type is unsigned +/f select fast compiler (default) +/f- select optimizing compiler +/Yc create .PCH file +/Yd put debug info in .PCH file +/Yu use .PCH file +/YX automatic precompiled header +/nologo suppress copyright message +/Mq compile for QuickWin +/ND<name> name data segment +/NM<name> name code segment +/NQ<name> combine p-code temp segments +/NT<name> name code segment +/NV<name> name far v-table segment +/Tc<file> compile file without .c +/Tp<file> compile file without .cpp +/V<string> set version string +/W<n> warning level (default n=1) +/w disable all warnings +/WX treat all warnings as errors +/Zn turn off SBRPACK for .SBR files +-MASM SUPPORT- +/MA<MASM switch> +/Ta<file> assemble file without .asm +-LINKING- +/F <hex_num> stack size (hex. bytes) +/Lr append 'r' to default lib in .OBJ +/link [lib] give lib name to linker +/Ln do not link CRT.LIB +/Ld select dynamically-linked library +/Lw select statically-linked library diff --git a/private/oleauto/tools/win16/hdos/c800/include/assert.h b/private/oleauto/tools/win16/hdos/c800/include/assert.h new file mode 100644 index 000000000..b57c7b245 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/assert.h @@ -0,0 +1,35 @@ +/*** +*assert.h - define the assert macro +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the assert(exp) macro. +* [ANSI/System V] +* +****/ + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#undef assert + +#ifdef NDEBUG + +#define assert(exp) ((void)0) + +#else +#ifdef __cplusplus +extern "C" { +#endif +void __cdecl _assert(void *, void *, unsigned); +#ifdef __cplusplus +} +#endif + +#define assert(exp) \ + ( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) ) + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/bios.h b/private/oleauto/tools/win16/hdos/c800/include/bios.h new file mode 100644 index 000000000..c3a7d1276 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/bios.h @@ -0,0 +1,244 @@ +/*** +*bios.h - declarations for bios interface functions and supporting definitions +* +* Copyright (c) 1987-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the constants, structures, and functions +* used for accessing and using various BIOS interfaces. +* +****/ + +#ifndef _INC_BIOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _MT + +/* manifest constants for BIOS serial communications (RS-232) support */ + +/* serial port services */ + +#define _COM_INIT 0 /* init serial port */ +#define _COM_SEND 1 /* send character */ +#define _COM_RECEIVE 2 /* receive character */ +#define _COM_STATUS 3 /* get serial port status */ + +/* serial port initializers. One and only one constant from each of the + * following four groups - character size, stop bit, parity, and baud rate - + * must be specified in the initialization byte. + */ + +/* character size initializers */ + +#define _COM_CHR7 2 /* 7 bits characters */ +#define _COM_CHR8 3 /* 8 bits characters */ + +/* stop bit values - on or off */ + +#define _COM_STOP1 0 /* 1 stop bit */ +#define _COM_STOP2 4 /* 2 stop bits */ + +/* parity initializers */ + +#define _COM_NOPARITY 0 /* no parity */ +#define _COM_ODDPARITY 8 /* odd parity */ +#define _COM_EVENPARITY 24 /* even parity */ + +/* baud rate initializers */ + +#define _COM_110 0 /* 110 baud */ +#define _COM_150 32 /* 150 baud */ +#define _COM_300 64 /* 300 baud */ +#define _COM_600 96 /* 600 baud */ +#define _COM_1200 128 /* 1200 baud */ +#define _COM_2400 160 /* 2400 baud */ +#define _COM_4800 192 /* 4800 baud */ +#define _COM_9600 224 /* 9600 baud */ + + +/* manifest constants for BIOS disk support */ + +/* disk services */ + +#define _DISK_RESET 0 /* reset disk controller */ +#define _DISK_STATUS 1 /* get disk status */ +#define _DISK_READ 2 /* read disk sectors */ +#define _DISK_WRITE 3 /* write disk sectors */ +#define _DISK_VERIFY 4 /* verify disk sectors */ +#define _DISK_FORMAT 5 /* format disk track */ + +/* struct used to send/receive information to/from the BIOS disk services */ + +#ifndef _DISKINFO_T_DEFINED +#pragma pack(2) + +struct _diskinfo_t { + unsigned drive; + unsigned head; + unsigned track; + unsigned sector; + unsigned nsectors; + void __far *buffer; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskinfo_t _diskinfo_t +#endif + +#pragma pack() +#define _DISKINFO_T_DEFINED +#endif + + +/* manifest constants for BIOS keyboard support */ + +/* keyboard services */ + +#define _KEYBRD_READ 0 /* read next character from keyboard */ +#define _KEYBRD_READY 1 /* check for keystroke */ +#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */ + +/* services for enhanced keyboards */ + +#define _NKEYBRD_READ 0x10 /* read next character from keyboard */ +#define _NKEYBRD_READY 0x11 /* check for keystroke */ +#define _NKEYBRD_SHIFTSTATUS 0x12 /* get current shift key status */ + + +/* manifest constants for BIOS printer support */ + +/* printer services */ + +#define _PRINTER_WRITE 0 /* write character to printer */ +#define _PRINTER_INIT 1 /* intialize printer */ +#define _PRINTER_STATUS 2 /* get printer status */ + + +/* manifest constants for BIOS time of day support */ + +/* time of day services */ + +#define _TIME_GETCLOCK 0 /* get current clock count */ +#define _TIME_SETCLOCK 1 /* set current clock count */ + + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif + +#define _REGS_DEFINED +#endif + + +/* function prototypes */ + +#ifndef _WINDOWS +unsigned __cdecl _bios_disk(unsigned, struct _diskinfo_t *); +#endif +unsigned __cdecl _bios_equiplist(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_keybrd(unsigned); +#endif +unsigned __cdecl _bios_memsize(void); +#ifndef _WINDOWS +unsigned __cdecl _bios_printer(unsigned, unsigned, unsigned); +unsigned __cdecl _bios_serialcom(unsigned, unsigned, unsigned); +#endif +unsigned __cdecl _bios_timeofday(unsigned, long *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_BIOS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/cderr.h b/private/oleauto/tools/win16/hdos/c800/include/cderr.h new file mode 100644 index 000000000..402ac0956 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cderr.h @@ -0,0 +1,58 @@ +/*****************************************************************************\ +* * +* cderr.h - Common dialog error return codes * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_CDERR +#define _INC_CDERR + +#define CDERR_DIALOGFAILURE 0xFFFF + +#define CDERR_GENERALCODES 0x0000 +#define CDERR_STRUCTSIZE 0x0001 +#define CDERR_INITIALIZATION 0x0002 +#define CDERR_NOTEMPLATE 0x0003 +#define CDERR_NOHINSTANCE 0x0004 +#define CDERR_LOADSTRFAILURE 0x0005 +#define CDERR_FINDRESFAILURE 0x0006 +#define CDERR_LOADRESFAILURE 0x0007 +#define CDERR_LOCKRESFAILURE 0x0008 +#define CDERR_MEMALLOCFAILURE 0x0009 +#define CDERR_MEMLOCKFAILURE 0x000A +#define CDERR_NOHOOK 0x000B +#define CDERR_REGISTERMSGFAIL 0x000C + +#define PDERR_PRINTERCODES 0x1000 +#define PDERR_SETUPFAILURE 0x1001 +#define PDERR_PARSEFAILURE 0x1002 +#define PDERR_RETDEFFAILURE 0x1003 +#define PDERR_LOADDRVFAILURE 0x1004 +#define PDERR_GETDEVMODEFAIL 0x1005 +#define PDERR_INITFAILURE 0x1006 +#define PDERR_NODEVICES 0x1007 +#define PDERR_NODEFAULTPRN 0x1008 +#define PDERR_DNDMMISMATCH 0x1009 +#define PDERR_CREATEICFAILURE 0x100A +#define PDERR_PRINTERNOTFOUND 0x100B +#define PDERR_DEFAULTDIFFERENT 0x100C + +#define CFERR_CHOOSEFONTCODES 0x2000 +#define CFERR_NOFONTS 0x2001 +#define CFERR_MAXLESSTHANMIN 0x2002 + +#define FNERR_FILENAMECODES 0x3000 +#define FNERR_SUBCLASSFAILURE 0x3001 +#define FNERR_INVALIDFILENAME 0x3002 +#define FNERR_BUFFERTOOSMALL 0x3003 + +#define FRERR_FINDREPLACECODES 0x4000 +#define FRERR_BUFFERLENGTHZERO 0x4001 + +#define CCERR_CHOOSECOLORCODES 0x5000 + +#endif /* !_INC_CDERR */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc b/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc new file mode 100644 index 000000000..eb7dfad7b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cmacros.inc @@ -0,0 +1,1410 @@ +comment $ +cmacros - assembly macros for interfacing to hlls +(C)Copyright Microsoft Corp. 1984-1988 +$ +.xcref +.xcref ??_out +??_out macro t +ifndef ?QUIET +%out t +endif +endm +outif macro name,defval,onmsg,offmsg +ifndef name +ifb <defval> +name=0 +else +name=defval +endif +endif +if name +name=1 +ifnb <onmsg> +??_out <! onmsg> +endif +else +ifnb <offmsg> +??_out <! offmsg> +endif +endif +endm +.xcref ??error +??error macro msg +e r r o r ----- msg +.err +endm +.xcref ASMpass +.xcref memS,memM,memL,memC,memH,memMOD,sizec,sized +if1 +ASMpass=1 +ifdef ?SMALL +memS=1 +endif +ifdef ?MEDIUM +memM=1 +endif +ifdef ?COMPACT +memC=1 +endif +ifdef ?LARGE +memL=1 +endif +ifdef ?HUGE +memH=1 +endif +??_out <cMacros Version 5.20 - Copyright (c) Microsoft Corp. 1984-1988> +outif memS,0,<Small model> +outif memM,0,<Medium model> +outif memL,0,<Large model> +outif memC,0,<Compact model> +outif memH,0,<Huge model> +memMOD= memS + memM + memL + memC + memH +if memMOD ne 1 +if memMOD eq 0 +memS = 1 +else +??error <more than 1 memory model selected> +endif +endif +sizec= memM + memL + memH +sized= memL + memC + (memH*2) +outif ?DF,0,<No segments or groups will be defined> +outif ?TF,0,<Epilog sequences assume valid SP> +outif ?WIN,1,<Windows support> +ifdef PMODE +?pmd=1 +??_out <! 286 protect mode> +else +?pmd=0 +endif +ifdef ?386regs +if ?386regs +??_out <! 386 registers enabled> +endif +else +?386regs=0 +endif +if ?WIN eq 1 +outif ?PLM,1,<> +else +outif ?PLM,1,<Pascal calling convention> +endif +ifndef ?NODATA +?nodata1=0 +else +?nodata1=1 +??_out <! NODATA module> +endif +ifndef ?CHKSTK +?chkstk1=0 +else +?chkstk1=1 +ifdef ?CHKSTKPROC +??_out <! Private stack checking enabled> +else +??_out <! Stack checking enabled> +endif +endif +ifndef DOS5 +?DOS5=0 +else +?DOS5=1 +??_out <! DOS5 module> +endif +ifdef ?PROFILE +??_out <! Native profiling enabled> +endif +else +ASMpass=2 +endif +ifdef ?pmd +.286p +endif +if ?386regs +.xcref ?n,?ax,?eax,?bx,?ebx +.xcref ?cx,?ecx,?dx,?edx +.xcref ?si,?esi,?di,?edi,?es,?ds,?fs +.xcref ?gs +else +.xcref ?n,?ax,?ah,?al,?bx,?bh +.xcref ?bl,?cx,?ch,?cl,?dx,?dh +.xcref ?dl,?si,?di,?es,?ds,?bp +.xcref ?sp,?ss,?cs +endif +.xcref ?rsl,?cpd,?argl,?argc,?ba +.xcref ?acb,???,?po +.xcref ?pas,?pc +.xcref uconcat,mpush,mpop +.xcref ?ri,?pp,?pp1,?al1 +.xcref ?ad,?ap,?atal,?dd,?dd1,?dd2 +.xcref ?pg,?pg1,?aloc,?cs1,?cs2 +.xcref ?DF,?TF,?ff,?PLM,?WIN,?ia,?pu,?adj +.xcref ?uf,?rp,?nx,?nd,?nodata1,?chkstk1,?DOS5,?pmd,?lds,?exp +.xcref ?wfp,arg,cCall,cProc,assumes,?cs3,?cs2,?cs1 +.xcref defgrp,addseg,createSeg +.xcref save,outif,errnz,errn$,errnz1 +.xcref ?PLMPrevParm,?gcc +.xcref ?cCall1,?pcc +?rsl = 0 +?cpd = 0 +?argl = 0 +?argc = 0 +?ba = 0 +?acb = 0 +??? = 0 +?po = 0 +?pas = 0 +?pc = 0 +?ia = 0 +?pu = 0 +?adj = 0 +?rp = 0 +?uf = 0 +?nd = 0 +?nx = 0 +?wfp = 0 +?lds = 0 +?exp = 0 +?ff = 0 +?dd2 = 0 +?cCall1 = 0 +?pcc = 0 +?PLMPrevParm = 0 +.xcref ?casen +if1 +?casen = 0 +endif +if ?386regs +?n = 0000000000000000b +?ax = 0000000000000001b +?eax = 0000000000000010b +?bx = 0000000000000100b +?ebx = 0000000000001000b +?cx = 0000000000010000b +?ecx = 0000000000100000b +?dx = 0000000001000000b +?edx = 0000000010000000b +?si = 0000000100000000b +?esi = 0000001000000000b +?di = 0000010000000000b +?edi = 0000100000000000b +?ds = 0001000000000000b +?es = 0010000000000000b +?fs = 0100000000000000b +?gs = 1000000000000000b +else +?n = 0000000000000000b +?ax = 0000000000000011b +?ah = 0000000000000001b +?al = 0000000000000010b +?bx = 0000000000001100b +?bh = 0000000000000100b +?bl = 0000000000001000b +?cx = 0000000000110000b +?ch = 0000000000010000b +?cl = 0000000000100000b +?dx = 0000000011000000b +?dh = 0000000001000000b +?dl = 0000000010000000b +?si = 0000000100000000b +?di = 0000001000000000b +?es = 0000010000000000b +?ds = 0000100000000000b +?bp = 0001000000000000b +?sp = 0010000000000000b +?ss = 0100000000000000b +?cs = 1000000000000000b +endif +.cref +uconcat macro a,b,c,d,e,f,g +a&b c&d e&f&g +endm +if ?386regs +mpush macro r +irp x,<ax,eax,bx,ebx,cx,ecx,dx,edx,si,esi,di,edi,ds,es,fs,gs> +if (r and ?&&x) + push x +endif +endm +endm +else +mpush macro r +irp x,<ax,bx,cx,dx,si,di,es,ds,bp,sp,ss,cs> +if (r and ?&&x) + push x +endif +endm +endm +endif +if ?386regs +mpop macro r +irp x,<gs,fs,es,ds,edi,di,esi,si,edx,dx,ecx,cx,ebx,bx,eax,ax> +if (r and ?&&x) + pop x +endif +endm +endm +else +mpop macro r +irp x,<cs,ss,sp,bp,ds,es,di,si,dx,cx,bx,ax> +if (r and ?&&x) + pop x +endif +endm +endm +endif +save macro r +?rsl=0 +?ri ?rsl,<r> +endm +?ri macro n,r +irp x,<r> +.ERRNDEF ?&&x +n=n or ?&&x +endm +endm +.xcref +.xcref parmB,parmW,parmD,parmQ,parmT,parmCP,parmDP +.cref +parmB macro n +?pp <n>,<byte>,2,1 +endm +parmW macro n +?pp <n>,<word>,2,2 +endm +parmD macro n +ife ?PLM +irp x,<n> +?pp <&&x>,<dword>,0,4 +?pp <off_&&x>,<word>,2,2 +?pp <seg_&&x>,<word>,2,2 +endm +else +irp x,<n> +?pp <seg_&&x>,<word>,2,2 +?pp <off_&&x>,<word>,2,2 +?pp <&&x>,<dword>,0,4 +endm +endif +endm +parmQ macro n +?pp <n>,<qword>,8,8 +endm +parmT macro n +?pp <n>,<tbyte>,10,10 +endm +if sizec +parmCP macro n +parmD <n> +endm +else +parmCP macro n +parmW <n> +endm +endif +if sized +parmDP macro n +parmD <n> +endm +else +parmDP macro n +parmW <n> +endm +endif +?pp macro n,t,l,s +if ?cpd +.xcref +irp x,<n> +.xcref ?t&&x +?t&&x=s +ife ?PLM +?pp1 x,<t>,,,%(?po+?adj) +?po=?po+l +else +?PLMPrevParm=?PLMPrevParm+1 +?po=?po+l +?pp1 x,<t>,%?po,%?adj,,%?PLMPrevParm,%(?PLMPrevParm-1) +endif +endm +.cref +else +??error <parm(s) "&n" declared outside proc def> +endif +endm +?pp1 macro n,t,o,a,b,cpc,ppc +ife ?PLM +n equ (t ptr [bp+b]) +else +.xcref +.xcref ?PLMParm&cpc +.cref +?PLMParm&cpc ¯o po +uconcat <n>,,<equ>,,<(t ptr [bp+>,%(a+po-o),<])> +?PLMParm&ppc po +purge ?PLMParm&cpc +&endm +endif +endm +ifndef ?NOPARMR +if ?pmd +parmR macro n,r,r2 +??error <Sorry: ParmR can't be used with PMODE=1> +endm +else +.xcref +.xcref ?pr,parmR +.cref +parmR macro n,r,r2 +?pr n,r,r2,%?rp,%(?ia+2) +endm +?pr macro n,r,r2,i,o +.xcref +ifnb <r2> +parmR seg_&n,r +parmR off_&n,r2 +n equ (dword ptr [bp-o-2]) +.xcref ?t&n +?t&n=4 +else +.xcref ?rp&i +?rp&i=0 +ifdef ?&r +?rp&i=?&r +endif +if ??? or (?cpd eq 0) or (?rp&i eq 0) +??error <invalid parmR encountered: &n,&r> +exitm +endif +n equ (word ptr [bp-o]) +?t&n=2 +irp x,<bh,ch,dh,bl,cl,dl,ah,al> +if ?&&x eq ?&r +n equ (byte ptr [bp-o]) +?t&n=1 +exitm +endif +endm +?ia=?ia+2 +?rp=?rp+1 +endif +.cref +endm +endif +endif +.xcref +.xcref localB,localW,localD,localQ,localT,localCP,localDP,localV +.cref +localB macro n +?aloc <n>,<byte ptr>,1,1,0 +endm +localW macro n +?aloc <n>,<word ptr>,2,2,1 +endm +localD macro n +irp x,<n> +?aloc <seg_&&x>,<word ptr>,2,2,1 +?aloc <off_&&x>,<word ptr>,2,2,1 +?aloc <&&x>,<dword ptr>,0,4,1 +endm +endm +localQ macro n +?aloc <n>,<qword ptr>,8,8,1 +endm +localT macro n +?aloc <n>,<tbyte ptr>,10,10,1 +endm +if sizec +localCP macro n +localD <n> +endm +else +localCP macro n +localW <n> +endm +endif +if sized +localDP macro n +localD <n> +endm +else +localDP macro n +localW <n> +endm +endif +localV macro n,a +?aloc <n>,,%(a),0,1 +endm +?aloc macro n,t,l,s,a +if ?cpd +.xcref +irp x,<n> +???=???+l +if a +???=((??? + 1) and 0fffeh) +endif +?al1 x,<t>,%(???+?ia) +.xcref ?t&&x +?t&&x=s +endm +.cref +else +??error <locals "&n" declared outside procedure def> +endif +endm +?al1 macro n,t,o +n equ (t [bp-o]) +endm +?gcc macro s,i,cc +s = i +ifnb <cc> +ifidn <cc>,<C> +s=0 +endif +ifidn <cc>,<PLM> +s=1 +endif +ifidn <cc>,<PASCAL> +s=1 +endif +endif +endm +ifndef ?NOGLOBAL +.xcref +.xcref globalB,globalW,globalD,globalQ,globalT,globalCP,globalDP +.cref +globalB macro n,i,s,c +?ad <n>,1 +?dd n,1,<byte>,<db>,<i>,<s>,<c> +endm +globalW macro n,i,s,c +?ad <n>,2 +?dd n,1,<word>,<dw>,<i>,<s>,<c> +endm +globalD macro n,i,s,c +?ad <n>,4 +?dd n,1,<dword>,<dd>,<i>,<s>,<c> +off_&n equ n +seg_&n equ n[2] +endm +globalQ macro n,i,s,c +?ad <n>,8 +?dd n,1,<qword>,<dq>,<i>,<s>,<c> +endm +globalT macro n,i,s,c +?ad <n>,10 +?dd n,1,<tbyte>,<dt>,<i>,<s>,<c> +endm +if sizec +globalCP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalCP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +if sized +globalDP macro n,i,s,c +globalD n,<i>,<s>,<c> +endm +else +globalDP macro n,i,s,c +globalW n,<i>,<s>,<c> +endm +endif +endif +ifndef ?NOSTATIC +.xcref +.xcref staticB,staticW,staticD,staticQ,staticT,staticCP,staticDP +.cref +staticB macro n,i,s +?ad <n>,1 +?dd n,0,<byte>,<db>,<i>,<s>,<PLM> +endm +staticW macro n,i,s +?ad <n>,2 +?dd n,0,<word>,<dw>,<i>,<s>,<PLM> +endm +staticD macro n,i,s +?ad <n>,4 +?dd n,0,<dword>,<dd>,<i>,<s>,<PLM> +endm +staticQ macro n,i,s +?ad <n>,8 +?dd n,0,<qword>,<dq>,<i>,<s>,<PLM> +endm +staticT macro n,i,s +?ad <n>,10 +?dd n,0,<tbyte>,<dt>,<i>,<s>,<PLM> +endm +if sizec +staticCP macro n,i,s +staticD n,<i>,<s> +endm +else +staticCP macro n,i,s +staticW n,<i>,<s> +endm +endif +if sized +staticDP macro n,i,s +staticD n,<i>,<s> +endm +else +staticDP macro n,i,s +staticW n,<i>,<s> +endm +endif +endif +?dd macro n,p,t,d,i,s,c +?gcc ?dd2,%?PLM,<c> +ife ?dd2 +n label t +?dd1 _&n,p,<d>,<i>,<s> +else +?dd1 n,p,<d>,<i>,<s> +endif +endm +?dd1 macro n,p,d,i,s +if p +public n +endif +ifb <s> +n d i +else +ifb <i> +n d s dup (?) +else +n d s dup (i) +endif +endif +endm +ifndef ?NOEXTERN +.xcref +.xcref ?ex1,?ex2,externB,externW,externD,externQ,externT +.xcref externNP,externFP,externP,externCP,externDP,externA +.cref +?ex2 = 0 +externA macro n,c +?ex1 <n>,40h,<abs>,<c>,<> +endm +externB macro n,c +?ex1 <n>,1,<byte>,<c>,<> +endm +externW macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +externD macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +externQ macro n,c +?ex1 <n>,8,<qword>,<c>,<> +endm +externT macro n,c +?ex1 <n>,10,<tbyte>,<c>,<> +endm +externNP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +externFP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +if sizec +externP macro n,c +?ex1 <n>,4,<far>,<c>,<cc> +endm +else +externP macro n,c +?ex1 <n>,2,<near>,<c>,<cc> +endm +endif +if sizec +externCP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externCP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +if sized +externDP macro n,c +?ex1 <n>,4,<dword>,<c>,<> +endm +else +externDP macro n,c +?ex1 <n>,2,<word>,<c>,<> +endm +endif +?ex1 macro n,s,d,c,scv +?gcc ?ex2,%?PLM,<c> +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?ex2 +extrn _&&x:&d +x equ _&&x +else +extrn x:&d +endif +ifidn <scv>,<cc> +.xcref +.xcref ?CC&&x +.cref +?CC&&x=?ex2 +endif +endm +endm +endif +ifndef ?NOLABEL +.xcref +.xcref ?lb1,?lblpu,?lb2 +.xcref labelB,labelW,labelD,labelQ,labelT +.xcref labelNP,labelFP,labelP,labelCP,labelDP +.cref +?lblpu = 0 +?lb2 = 0 +labelB macro n,c +?lb1 <n>,1,<byte>,<c> +endm +labelW macro n,c +?lb1 <n>,2,<word>,<c> +endm +labelD macro n,c +?lb1 <n>,4,<dword>,<c> +endm +labelQ macro n,c +?lb1 <n>,8,<qword>,<c> +endm +labelT macro n,c +?lb1 <n>,10,<tbyte>,<c> +endm +labelNP macro n,c +?lb1 <n>,2,<near>,<c> +endm +labelFP macro n,c +?lb1 <n>,4,<far>,<c> +endm +if sizec +labelP macro n,c +?lb1 <n>,4,<far>,<c> +endm +else +labelP macro n,c +?lb1 <n>,2,<near>,<c> +endm +endif +if sizec +labelCP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelCP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +if sized +labelDP macro n,c +?lb1 <n>,4,<dword>,<c> +endm +else +labelDP macro n,c +?lb1 <n>,2,<word>,<c> +endm +endif +?lb1 macro n,s,d,c +?gcc ?lb2,%?PLM,<c> +?lblpu=0 +irp x,<n> +ifidn <x>,<PUBLIC> +?lblpu=1 +else +.xcref +.xcref ?t&&x +.cref +?t&&x=s +ife ?lb2 +if ?lblpu +public _&&x +endif +_&&x label &d +x equ _&&x +else +if ?lblpu +public x +endif +x label &d +endif +endif +endm +endm +endif +ifndef ?NODEF +.xcref +.xcref defB,defW,defD,defQ,defT,defCP,defDP +.cref +defB macro n +?ad <n>,1 +endm +defW macro n +?ad <n>,2 +endm +defD macro n +?ad <n>,4 +endm +defQ macro n +?ad <n>,8 +endm +defT macro n +?ad <n>,10 +endm +if sizec +defCP macro n +defD <n> +endm +else +defCP macro n +defW <n> +endm +endif +if sized +defDP macro n +defD <n> +endm +else +defDP macro n +defW <n> +endm +endif +endif +?ad macro n,s +irp x,<n> +.xcref +.xcref ?t&&x +.cref +?t&&x=s +endm +endm +ifndef ?NOPTR +.xcref +.xcref regPtr,farPtr +.cref +regPtr macro n,s,o +farPtr n,s,o +endm +farPtr macro n,s,o +.xcref +.xcref ?t&n +.cref +n ¯o + push s + push o +&endm +?t&n=80h +endm +endif +arg macro a +irp x,<a> +?argc=?argc+1 +?atal <x>,%?argc +endm +endm +?atal macro n,i +.xcref +.xcref ?ali&i +.cref +?ali&i ¯o +?ap n +&endm +endm +?ap macro n +?argl=?argl+2 +ifdef ?t&n +ife ?t&n-1 + push word ptr (n) +exitm +endif +ife ?t&n-2 + push n +exitm +endif +ife ?t&n-4 + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+2 +exitm +endif +ife ?t&n-8 + push word ptr (n)[6] + push word ptr (n)[4] + push word ptr (n)[2] + push word ptr (n) +?argl=?argl+6 +exitm +endif +if ?t&n and 80h +n +?argl=?argl+2 +exitm +endif +ife ?t&n + push word ptr (n) +exitm +endif +endif + push n +endm +cCall macro n,a,c +ifnb <a> +arg <a> +endif +mpush %?rsl +ifdef ?CC&n +?cCall1=?CC&n +else +?cCall1=?PLM +endif +ifnb <c> +?gcc ?cCall1,%?cCall1,<c> +endif +?argl=0 +ife ?cCall1 +?acb=?argc +else +?acb=1 +endif +rept ?argc +uconcat <?ali>,%?acb +uconcat <purge>,,<?ali>,%?acb +ife ?cCall1 +?acb=?acb-1 +else +?acb=?acb+1 +endif +endm + call n +if ((?cCall1 eq 0) and (?argl ne 0)) + add sp,?argl +endif +mpop %?rsl +?rsl=0 +?argc= 0 +?argl= 0 +endm +cProc macro n,cf,a +if ?cpd +?utpe +endif +?cpd=1 +???=0 +?argc=0 +?ba=0 +?po=0 +?pu=0 +?ia=0 +?adj=4 +?rp=0 +?uf=0 +?wfp=?WIN +?ff=0 +?pas=0 +?pcc=?PLM +?lds=0 +?exp=0 +ifnb <a> +?ri ?pas,<a> +endif +?pc=sizec +?nd=?nodata1 +?nx=0 +irp x,<cf> +ifidn <x>,<FAR> +?pc=1 +endif +ifidn <x>,<NEAR> +?pc=0 +endif +ifidn <x>,<PUBLIC> +?pu=1 +endif +ifidn <x>,<SMALL> +?uf=1 +endif +ifidn <x>,<DATA> +?nd=0 +endif +ifidn <x>,<NODATA> +?nd=1 +endif +ifidn <x>,<ATOMIC> +?nx=1 +endif +ifidn <x>,<C> +?pcc=0 +endif +ifidn <x>,<PLM> +?pcc=1 +endif +ifidn <x>,<PASCAL> +?pcc=1 +endif +ifidn <x>,<WIN> +?wfp=1 +endif +ifidn <x>,<NONWIN> +?wfp=0 +endif +ifidn <x>,<LOADDS> +?lds=1 +endif +ifidn <x>,<EXPORTED> +?exp=1 +endif +endm +if ?pcc +?PLMPrevParm=0 +.xcref +.xcref ?PLMParm0 +.cref +?PLMParm0 ¯o +purge ?PLMParm0 +&endm +endif +.xcref +.xcref ?CC&n +.cref +?CC&n=?pcc +if (?nx eq 1) and (?nd eq 0) +?nx = 0 +??error <ATOMIC specified without NODATA - ATOMIC ignored> +endif +if ?pc +if ?wfp+?exp+?lds +ife ?nx +ife ?pmd +?ia=2 +endif +?pas = ?pas and (not ?ds) +endif +endif +?adj=?adj+2 +else +?wfp=0 +endif +ife ?386regs +?pas = ?pas and (not (?sp+?cs+?ss)) +endif +if ?uf +if ?386regs +?pas = ?pas and (not (?si+?di)) +else +?pas = ?pas and (not (?bp+?si+?di)) +endif +endif +ife ?pcc +?pg <_&n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +else +?pg <n>,%?pu,%?pc,%?pas,%?wfp,<n>,%?pcc +endif +endm +?pg macro n,p,c,a,w,nnu,cc +.xcref +if ?uf +if ?nd +??error <NODATA encountered in &n - user frame ignored> +?uf=0 +endif +endif +.xcref cBegin +cBegin ¯o g +.xcref +if cc +uconcat <?PLMParm>,%?PLMPrevParm,%?po +endif +if ?uf +if ?rp +??error <parmR encountered in &n - user frame ignored> +?uf=0 +endif +endif +?pg1 <n>,c,a,%?po,w,%?uf,%?nd,%?rp,cc +?cpd=0 +?argc=0 +?ba=1 +???=(???+1) and 0fffeh +if p +public n +endif +ife c +n proc near +else +n proc far +endif +ife cc +nnu equ n +endif +ifidn <g>,<nogen> +if ???+?po+a+?rp +??_out <cBegin - possible invalid use of nogen> +endif +else +if ?uf +?mf c,%???,%?po +mpush a +else +if w+?exp+?lds +if ?pmd +ife ?nd +if ?lds +mov ax,_DATA +else +if ?exp +mov ax,ds +nop +endif +endif +endif +ife ?nx +if ???+?po +if ?chkstk1 +push bp +mov bp,sp +else +if ??? +enter ???,0 +else +push bp +mov bp,sp +endif +endif +endif +push ds +if ?lds+?exp +mov ds,ax +endif +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +else +ife ?nd + mov ax,ds + nop +endif +ife ?nx +ife ?DOS5 + inc bp +endif + push bp + mov bp,sp + push ds +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +ife ?nd + mov ds,ax +endif +endif +else +if ?pmd +if ?exp +mov ax,ds +nop +else +if ?lds +mov ax,_DATA +endif +endif +if ?ff+???+?po+?rp +if ?chkstk1 +push bp +mov bp,sp +else +if ??? +enter ???,0 +else +push bp +mov bp,sp +endif +endif +endif +if ?exp+?lds +push ds +mov ds,ax +endif +else +if ?ff+???+?po+?rp + push bp + mov bp,sp +endif +endif +endif +if ?rp +?uf=0 +rept ?rp +uconcat mpush,,?rp,%?uf +?uf=?uf+1 +endm +endif +if ??? +if ?chkstk1 +ifdef ?CHKSTKPROC +?CHKSTKPROC %??? +else + mov ax,??? +ife cc + call _chkstk +else + call chkstk +endif +endif +else +ife ?pmd + sub sp,??? +endif +endif +endif +mpush a +endif +ifdef ?PROFILE +if c + call StartNMeas +endif +endif +endif +.cref +purge cBegin +&endm +.xcref ?utpe +?utpe ¯o +??error <unterminated procedure definition: "&n"> +&endm +.cref +endm +?pg1 macro n,c,a,o,w,f,d,r,cc +.xcref +.xcref cEnd +cEnd ¯o g +.xcref +?ba=0 +ifidn <g>,<nogen> +if o+a+r +??_out <cEnd - possible invalid use of nogen> +endif +else +ifdef ?PROFILE +if c +call StopNMeas +endif +endif +mpop a +if f + db 0c3h +else +if w+?exp+?lds +if ?pmd +ife ?nx +pop ds +endif +ife ?nx +if ?chkstk1+???+?po +leave +endif +else +if ?ff+???+?po+?rp +leave +endif +endif +else +ife ?nx +if (?TF eq 0) or (???+?rp) + lea sp,-2[bp] +endif + pop ds + pop bp +ife ?DOS5 + dec bp +endif +else +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif +if ???+?po+?rp + pop bp +endif +endif +endif +else +if ?pmd +if ?ff+???+?po+?rp +leave +endif +else +if ?ff+???+?po+?rp +if (?TF eq 0) or (???+?rp) + mov sp,bp +endif + pop bp +endif +endif +endif +ife cc + ret +else + ret o +endif +endif +endif +n endp +.cref +purge cEnd +&endm +.cref +endm +assumes macro s,ln +ifndef ln&_assumes +assume s:ln +else +ln&_assumes s +endif +endm +createSeg macro n,ln,a,co,cl,grp +ifnb <grp> +addseg grp,n +else +ln&OFFSET equ offset n: +ln&BASE equ n +?cs3 <ln>,<n> +endif +ifnb <cl> +n segment a co '&cl' +else +n segment a co +endif +n ends +?cs1 <ln>,<n> +endm +addseg macro grp,seg +.xcref +.xcref grp&_def +.cref +ifndef grp&_def +grp&_def=0 +endif +if grp&_def ne ASMpass +.xcref +.xcref grp&_add +.cref +grp&_add ¯o s +grp&_in <seg>,s +&endm +.xcref +.xcref grp&_in +.cref +grp&_in ¯o sl,s +ifb <s> +grp group sl +else +grp&_add ¯o ns +grp&_in <sl,s>,ns +&endm +endif +&endm +grp&_def=ASMpass +else +grp&_add seg +endif +endm +defgrp macro grp,ln +addseg grp +ifnb <ln> +irp x,<ln> +?cs3 <&x>,<grp> +x&&OFFSET equ offset grp: +x&&BASE equ grp +endm +endif +endm +?cs1 macro ln,n +.xcref +.xcref ln&_sbegin +.cref +ln&_sbegin ¯o +.xcref +.xcref ?mf +.cref +?mf &¯o c,l,p +if c + extrn n&_FARFRAME:near + call n&_FARFRAME +else + extrn n&_NEARFRAME:near + call n&_NEARFRAME +endif + db l shr 1 + db p shr 1 +&&endm +?cs2 <ln>,<n> +n segment +&endm +endm +?cs2 macro ln,n +.xcref +.xcref sEnd +.cref +sEnd ¯o +n ends +purge ?mf +purge sEnd +&endm +endm +?cs3 macro ln,n +.xcref +.xcref ln&_assumes +.cref +ln&_assumes ¯o s +assume s:&n +&endm +endm +.xcref +.xcref sBegin +.cref +sBegin macro ln +ln&_sbegin +endm +ife ?DF +createSeg _TEXT,Code,word,public,CODE +ife ?nodata1 +createSeg _DATA,Data,word,public,DATA,DGROUP +defgrp DGROUP,Data +endif +if ?chkstk1 +ifndef ?CHKSTKPROC +externp <chkstk> +endif +endif +endif +errnz macro x +if2 +if x +errnz1 <x>,%(x) +endif +endif +endm +errnz1 macro x1,x2 += *errnz* x1 = x2 +.err +endm +errn$ macro l,x +errnz <offset $ - offset l x> +endm +ifdef ?PROFILE +externFP <StartNMeas,StopNMeas> +endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/colordlg.h b/private/oleauto/tools/win16/hdos/c800/include/colordlg.h new file mode 100644 index 000000000..86ae4e9bb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/colordlg.h @@ -0,0 +1,49 @@ +/*****************************************************************************\ +* * +* colordlg.h - Common dialog color dialog's control id numbers * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_COLORDLG +#define _INC_COLORDLG + +#define DLG_COLOR 10 + +#define COLOR_HUESCROLL 700 /* color dialog */ +#define COLOR_SATSCROLL 701 +#define COLOR_LUMSCROLL 702 +#define COLOR_HUE 703 +#define COLOR_SAT 704 +#define COLOR_LUM 705 +#define COLOR_RED 706 +#define COLOR_GREEN 707 +#define COLOR_BLUE 708 +#define COLOR_CURRENT 709 +#define COLOR_RAINBOW 710 +#define COLOR_SAVE 711 +#define COLOR_ADD 712 +#define COLOR_SOLID 713 +#define COLOR_TUNE 714 +#define COLOR_SCHEMES 715 +#define COLOR_ELEMENT 716 +#define COLOR_SAMPLES 717 +#define COLOR_PALETTE 718 +#define COLOR_MIX 719 +#define COLOR_BOX1 720 +#define COLOR_CUSTOM1 721 + +#define COLOR_HUEACCEL 723 +#define COLOR_SATACCEL 724 +#define COLOR_LUMACCEL 725 +#define COLOR_REDACCEL 726 +#define COLOR_GREENACCEL 727 +#define COLOR_BLUEACCEL 728 + +#define NUM_BASIC_COLORS 48 +#define NUM_CUSTOM_COLORS 16 + +#endif /* !_INC_COLORDLG */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/commdlg.h b/private/oleauto/tools/win16/hdos/c800/include/commdlg.h new file mode 100644 index 000000000..723f7b4d3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/commdlg.h @@ -0,0 +1,318 @@ +/*****************************************************************************\ +* * +* commdlg.h - Common dialog functions, types, and definitions * +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_COMMDLG +#define _INC_COMMDLG + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef WINAPI /* If not included with 3.1 headers... */ +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +typedef struct tagOFN +{ + DWORD lStructSize; + HWND hwndOwner; + HINSTANCE hInstance; + LPCSTR lpstrFilter; + LPSTR lpstrCustomFilter; + DWORD nMaxCustFilter; + DWORD nFilterIndex; + LPSTR lpstrFile; + DWORD nMaxFile; + LPSTR lpstrFileTitle; + DWORD nMaxFileTitle; + LPCSTR lpstrInitialDir; + LPCSTR lpstrTitle; + DWORD Flags; + UINT nFileOffset; + UINT nFileExtension; + LPCSTR lpstrDefExt; + LPARAM lCustData; + UINT (CALLBACK *lpfnHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpTemplateName; +} OPENFILENAME; +typedef OPENFILENAME FAR* LPOPENFILENAME; + +BOOL WINAPI GetOpenFileName(OPENFILENAME FAR*); +BOOL WINAPI GetSaveFileName(OPENFILENAME FAR*); +int WINAPI GetFileTitle(LPCSTR, LPSTR, UINT); + +#define OFN_READONLY 0x00000001 +#define OFN_OVERWRITEPROMPT 0x00000002 +#define OFN_HIDEREADONLY 0x00000004 +#define OFN_NOCHANGEDIR 0x00000008 +#define OFN_SHOWHELP 0x00000010 +#define OFN_ENABLEHOOK 0x00000020 +#define OFN_ENABLETEMPLATE 0x00000040 +#define OFN_ENABLETEMPLATEHANDLE 0x00000080 +#define OFN_NOVALIDATE 0x00000100 +#define OFN_ALLOWMULTISELECT 0x00000200 +#define OFN_EXTENSIONDIFFERENT 0x00000400 +#define OFN_PATHMUSTEXIST 0x00000800 +#define OFN_FILEMUSTEXIST 0x00001000 +#define OFN_CREATEPROMPT 0x00002000 +#define OFN_SHAREAWARE 0x00004000 +#define OFN_NOREADONLYRETURN 0x00008000 +#define OFN_NOTESTFILECREATE 0x00010000 + +/* Return values for the registered message sent to the hook function + * when a sharing violation occurs. OFN_SHAREFALLTHROUGH allows the + * filename to be accepted, OFN_SHARENOWARN rejects the name but puts + * up no warning (returned when the app has already put up a warning + * message), and OFN_SHAREWARN puts up the default warning message + * for sharing violations. + * + * Note: Undefined return values map to OFN_SHAREWARN, but are + * reserved for future use. + */ + +#define OFN_SHAREFALLTHROUGH 2 +#define OFN_SHARENOWARN 1 +#define OFN_SHAREWARN 0 + +typedef struct tagCHOOSECOLOR +{ + DWORD lStructSize; + HWND hwndOwner; + HWND hInstance; + COLORREF rgbResult; + COLORREF FAR* lpCustColors; + DWORD Flags; + LPARAM lCustData; + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpTemplateName; +} CHOOSECOLOR; +typedef CHOOSECOLOR FAR *LPCHOOSECOLOR; + +BOOL WINAPI ChooseColor(CHOOSECOLOR FAR*); + +#define CC_RGBINIT 0x00000001 +#define CC_FULLOPEN 0x00000002 +#define CC_PREVENTFULLOPEN 0x00000004 +#define CC_SHOWHELP 0x00000008 +#define CC_ENABLEHOOK 0x00000010 +#define CC_ENABLETEMPLATE 0x00000020 +#define CC_ENABLETEMPLATEHANDLE 0x00000040 + +typedef struct tagFINDREPLACE +{ + DWORD lStructSize; /* size of this struct 0x20 */ + HWND hwndOwner; /* handle to owner's window */ + HINSTANCE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + DWORD Flags; /* one or more of the FR_?? */ + LPSTR lpstrFindWhat; /* ptr. to search string */ + LPSTR lpstrReplaceWith; /* ptr. to replace string */ + UINT wFindWhatLen; /* size of find buffer */ + UINT wReplaceWithLen; /* size of replace buffer */ + LPARAM lCustData; /* data passed to hook fn. */ + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + /* ptr. to hook fn. or NULL */ + LPCSTR lpTemplateName; /* custom template name */ +} FINDREPLACE; +typedef FINDREPLACE FAR *LPFINDREPLACE; + +#define FR_DOWN 0x00000001 +#define FR_WHOLEWORD 0x00000002 +#define FR_MATCHCASE 0x00000004 +#define FR_FINDNEXT 0x00000008 +#define FR_REPLACE 0x00000010 +#define FR_REPLACEALL 0x00000020 +#define FR_DIALOGTERM 0x00000040 +#define FR_SHOWHELP 0x00000080 +#define FR_ENABLEHOOK 0x00000100 +#define FR_ENABLETEMPLATE 0x00000200 +#define FR_NOUPDOWN 0x00000400 +#define FR_NOMATCHCASE 0x00000800 +#define FR_NOWHOLEWORD 0x00001000 +#define FR_ENABLETEMPLATEHANDLE 0x00002000 +#define FR_HIDEUPDOWN 0x00004000 +#define FR_HIDEMATCHCASE 0x00008000 +#define FR_HIDEWHOLEWORD 0x00010000 + +HWND WINAPI FindText(FINDREPLACE FAR*); +HWND WINAPI ReplaceText(FINDREPLACE FAR*); + +typedef struct tagCHOOSEFONT +{ + DWORD lStructSize; /* */ + HWND hwndOwner; /* caller's window handle */ + HDC hDC; /* printer DC/IC or NULL */ + LOGFONT FAR* lpLogFont; /* ptr. to a LOGFONT struct */ + int iPointSize; /* 10 * size in points of selected font */ + DWORD Flags; /* enum. type flags */ + COLORREF rgbColors; /* returned text color */ + LPARAM lCustData; /* data passed to hook fn. */ + UINT (CALLBACK* lpfnHook)(HWND, UINT, WPARAM, LPARAM); + /* ptr. to hook function */ + LPCSTR lpTemplateName; /* custom template name */ + HINSTANCE hInstance; /* instance handle of.EXE that + * contains cust. dlg. template + */ + LPSTR lpszStyle; /* return the style field here + * must be LF_FACESIZE or bigger */ + UINT nFontType; /* same value reported to the EnumFonts + * call back with the extra FONTTYPE_ + * bits added */ + int nSizeMin; /* minimum pt size allowed & */ + int nSizeMax; /* max pt size allowed if */ + /* CF_LIMITSIZE is used */ +} CHOOSEFONT; +typedef CHOOSEFONT FAR *LPCHOOSEFONT; + +BOOL WINAPI ChooseFont(CHOOSEFONT FAR*); + +#define CF_SCREENFONTS 0x00000001 +#define CF_PRINTERFONTS 0x00000002 +#define CF_BOTH (CF_SCREENFONTS | CF_PRINTERFONTS) +#define CF_SHOWHELP 0x00000004L +#define CF_ENABLEHOOK 0x00000008L +#define CF_ENABLETEMPLATE 0x00000010L +#define CF_ENABLETEMPLATEHANDLE 0x00000020L +#define CF_INITTOLOGFONTSTRUCT 0x00000040L +#define CF_USESTYLE 0x00000080L +#define CF_EFFECTS 0x00000100L +#define CF_APPLY 0x00000200L +#define CF_ANSIONLY 0x00000400L +#define CF_NOVECTORFONTS 0x00000800L +#define CF_NOOEMFONTS CF_NOVECTORFONTS +#define CF_NOSIMULATIONS 0x00001000L +#define CF_LIMITSIZE 0x00002000L +#define CF_FIXEDPITCHONLY 0x00004000L +#define CF_WYSIWYG 0x00008000L /* must also have CF_SCREENFONTS & CF_PRINTERFONTS */ +#define CF_FORCEFONTEXIST 0x00010000L +#define CF_SCALABLEONLY 0x00020000L +#define CF_TTONLY 0x00040000L +#define CF_NOFACESEL 0x00080000L +#define CF_NOSTYLESEL 0x00100000L +#define CF_NOSIZESEL 0x00200000L + +/* these are extra nFontType bits that are added to what is returned to the + * EnumFonts callback routine */ + +#define SIMULATED_FONTTYPE 0x8000 +#define PRINTER_FONTTYPE 0x4000 +#define SCREEN_FONTTYPE 0x2000 +#define BOLD_FONTTYPE 0x0100 +#define ITALIC_FONTTYPE 0x0200 +#define REGULAR_FONTTYPE 0x0400 + +#define WM_CHOOSEFONT_GETLOGFONT (WM_USER + 1) + + +/* strings used to obtain unique window message for communication + * between dialog and caller + */ +#define LBSELCHSTRING "commdlg_LBSelChangedNotify" +#define SHAREVISTRING "commdlg_ShareViolation" +#define FILEOKSTRING "commdlg_FileNameOK" +#define COLOROKSTRING "commdlg_ColorOK" +#define SETRGBSTRING "commdlg_SetRGBColor" +#define FINDMSGSTRING "commdlg_FindReplace" +#define HELPMSGSTRING "commdlg_help" + +/* HIWORD values for lParam of commdlg_LBSelChangeNotify message */ +#define CD_LBSELNOITEMS -1 +#define CD_LBSELCHANGE 0 +#define CD_LBSELSUB 1 +#define CD_LBSELADD 2 + +typedef struct tagPD +{ + DWORD lStructSize; + HWND hwndOwner; + HGLOBAL hDevMode; + HGLOBAL hDevNames; + HDC hDC; + DWORD Flags; + UINT nFromPage; + UINT nToPage; + UINT nMinPage; + UINT nMaxPage; + UINT nCopies; + HINSTANCE hInstance; + LPARAM lCustData; + UINT (CALLBACK* lpfnPrintHook)(HWND, UINT, WPARAM, LPARAM); + UINT (CALLBACK* lpfnSetupHook)(HWND, UINT, WPARAM, LPARAM); + LPCSTR lpPrintTemplateName; + LPCSTR lpSetupTemplateName; + HGLOBAL hPrintTemplate; + HGLOBAL hSetupTemplate; +} PRINTDLG; +typedef PRINTDLG FAR* LPPRINTDLG; + +BOOL WINAPI PrintDlg(PRINTDLG FAR*); + +#define PD_ALLPAGES 0x00000000 +#define PD_SELECTION 0x00000001 +#define PD_PAGENUMS 0x00000002 +#define PD_NOSELECTION 0x00000004 +#define PD_NOPAGENUMS 0x00000008 +#define PD_COLLATE 0x00000010 +#define PD_PRINTTOFILE 0x00000020 +#define PD_PRINTSETUP 0x00000040 +#define PD_NOWARNING 0x00000080 +#define PD_RETURNDC 0x00000100 +#define PD_RETURNIC 0x00000200 +#define PD_RETURNDEFAULT 0x00000400 +#define PD_SHOWHELP 0x00000800 +#define PD_ENABLEPRINTHOOK 0x00001000 +#define PD_ENABLESETUPHOOK 0x00002000 +#define PD_ENABLEPRINTTEMPLATE 0x00004000 +#define PD_ENABLESETUPTEMPLATE 0x00008000 +#define PD_ENABLEPRINTTEMPLATEHANDLE 0x00010000 +#define PD_ENABLESETUPTEMPLATEHANDLE 0x00020000 +#define PD_USEDEVMODECOPIES 0x00040000 +#define PD_DISABLEPRINTTOFILE 0x00080000 +#define PD_HIDEPRINTTOFILE 0x00100000 + +typedef struct tagDEVNAMES +{ + UINT wDriverOffset; + UINT wDeviceOffset; + UINT wOutputOffset; + UINT wDefault; +} DEVNAMES; +typedef DEVNAMES FAR* LPDEVNAMES; + +#define DN_DEFAULTPRN 0x0001 + +DWORD WINAPI CommDlgExtendedError(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_COMMDLG */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/conio.h b/private/oleauto/tools/win16/hdos/c800/include/conio.h new file mode 100644 index 000000000..ba72116f0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/conio.h @@ -0,0 +1,73 @@ +/*** +*conio.h - console and port I/O declarations +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* the MS C V2.03 compatible console and port I/O routines. +* +****/ + +#ifndef _INC_CONIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* function prototypes */ + +#ifndef _WINDOWS +char * __cdecl _cgets(char *); +int __cdecl _cprintf(const char *, ...); +int __cdecl _cputs(const char *); +int __cdecl _cscanf(const char *, ...); +int __cdecl _getch(void); +int __cdecl _getche(void); +#endif +int __cdecl _inp(unsigned); +unsigned __cdecl _inpw(unsigned); +#ifndef _WINDOWS +int __cdecl _kbhit(void); +#endif +int __cdecl _outp(unsigned, int); +unsigned __cdecl _outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl _putch(int); +int __cdecl _ungetch(int); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _WINDOWS +char * __cdecl cgets(char *); +int __cdecl cprintf(const char *, ...); +int __cdecl cputs(const char *); +int __cdecl cscanf(const char *, ...); +int __cdecl getch(void); +int __cdecl getche(void); +#endif +int __cdecl inp(unsigned); +unsigned __cdecl inpw(unsigned); +#ifndef _WINDOWS +int __cdecl kbhit(void); +#endif +int __cdecl outp(unsigned, int); +unsigned __cdecl outpw(unsigned, unsigned); +#ifndef _WINDOWS +int __cdecl putch(int); +int __cdecl ungetch(int); +#endif +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_CONIO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/cpl.h b/private/oleauto/tools/win16/hdos/c800/include/cpl.h new file mode 100644 index 000000000..bdcfc7f80 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/cpl.h @@ -0,0 +1,157 @@ +/*****************************************************************************\ +* * +* cpl.h - Control panel extension DLL definitions * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +****************************************************************************** +* General rules for being installed in the Control Panel: +* +* 1) The DLL must export a function named CPlApplet which will handle +* the messages discussed below. +* 2) If the applet needs to save information in CONTROL.INI minimize +* clutter by using the application name [MMCPL.appletname]. +* 2) If the applet is refrenced in CONTROL.INI under [MMCPL] use +* the following form: +* ... +* [MMCPL] +* uniqueName=c:\mydir\myapplet.dll +* ... +* +* +* The order applet DLL's are loaded by CONTROL.EXE is: +* +* 1) MAIN.CPL is loaded from the windows system directory. +* +* 2) Installable drivers that are loaded and export the +* CplApplet() routine. +* +* 3) DLL's specified in the [MMCPL] section of CONTROL.INI. +* +* 4) DLL's named *.CPL from windows system directory. +* +*/ +#ifndef _INC_CPL +#define _INC_CPL + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * CONTROL.EXE will answer this message and launch an applet + * + * WM_CPL_LAUNCH + * + * wParam - window handle of calling app + * lParam - LPSTR of name of applet to launch + * + * WM_CPL_LAUNCHED + * + * wParam - TRUE/FALSE if applet was launched + * lParam - NULL + * + * CONTROL.EXE will post this message to the caller when the applet returns + * (ie., when wParam is a valid window handle) + * + */ +#define WM_CPL_LAUNCH (WM_USER+1000) +#define WM_CPL_LAUNCHED (WM_USER+1001) + +/* A function prototype for CPlApplet() */ + +typedef LRESULT (CALLBACK *APPLET_PROC)(HWND hwndCpl, UINT msg, LPARAM lParam1, LPARAM lParam2); + +/* The data structure CPlApplet() must fill in. */ + +typedef struct tagCPLINFO +{ + int idIcon; /* icon resource id, provided by CPlApplet() */ + int idName; /* name string res. id, provided by CPlApplet() */ + int idInfo; /* info string res. id, provided by CPlApplet() */ + LONG lData; /* user defined data */ +} CPLINFO, *PCPLINFO, FAR *LPCPLINFO; + +typedef struct tagNEWCPLINFO +{ + DWORD dwSize; /* similar to the commdlg */ + DWORD dwFlags; + DWORD dwHelpContext; /* help context to use */ + LONG lData; /* user defined data */ + HICON hIcon; /* icon to use, this is owned by CONTROL.EXE (may be deleted) */ + char szName[32]; /* short name */ + char szInfo[64]; /* long name (status line) */ + char szHelpFile[128];/* path to help file to use */ +} NEWCPLINFO, *PNEWCPLINFO, FAR *LPNEWCPLINFO; + + +/* The messages CPlApplet() must handle: */ + +#define CPL_INIT 1 +/* This message is sent to indicate CPlApplet() was found. */ +/* lParam1 and lParam2 are not defined. */ +/* Return TRUE or FALSE indicating whether the control panel should proceed. */ + + +#define CPL_GETCOUNT 2 +/* This message is sent to determine the number of applets to be displayed. */ +/* lParam1 and lParam2 are not defined. */ +/* Return the number of applets you wish to display in the control */ +/* panel window. */ + + +#define CPL_INQUIRE 3 +/* This message is sent for information about each applet. */ +/* lParam1 is the applet number to register, a value from 0 to */ +/* (CPL_GETCOUNT - 1). lParam2 is a far ptr to a CPLINFO structure. */ +/* Fill in CPL_INFO's idIcon, idName, idInfo and lData fields with */ +/* the resource id for an icon to display, name and description string ids, */ +/* and a long data item associated with applet #lParam1. */ + + +#define CPL_SELECT 4 +/* This message is sent when the applet's icon has been clicked upon. */ +/* lParam1 is the applet number which was selected. lParam2 is the */ +/* applet's lData value. */ + + +#define CPL_DBLCLK 5 +/* This message is sent when the applet's icon has been double-clicked */ +/* upon. lParam1 is the applet number which was selected. lParam2 is the */ +/* applet's lData value. */ +/* This message should initiate the applet's dialog box. */ + + +#define CPL_STOP 6 +/* This message is sent for each applet when the control panel is exiting. */ +/* lParam1 is the applet number. lParam2 is the applet's lData value. */ +/* Do applet specific cleaning up here. */ + + +#define CPL_EXIT 7 +/* This message is sent just before the control panel calls FreeLibrary. */ +/* lParam1 and lParam2 are not defined. */ +/* Do non-applet specific cleaning up here. */ + + +#define CPL_NEWINQUIRE 8 +/* this is the same as CPL_INQUIRE execpt lParam2 is a pointer to a */ +/* NEWCPLINFO structure. this will be sent before the CPL_INQUIRE */ +/* and if it is responed to (return != 0) CPL_INQUIRE will not be sent */ + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_CPL */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ctype.h b/private/oleauto/tools/win16/hdos/c800/include/ctype.h new file mode 100644 index 000000000..a81fd9bdd --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ctype.h @@ -0,0 +1,127 @@ +/*** +*ctype.h - character conversion macros and ctype macros +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines macros for character classification/conversion. +* [ANSI/System V] +* +****/ + +#ifndef _INC_CTYPE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* + * This declaration allows the user access to the ctype look-up + * array _ctype defined in ctype.obj by simply including ctype.h + */ + +extern unsigned char __near __cdecl _ctype[]; + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +/* character classification function prototypes */ + +#ifndef _CTYPE_DEFINED +int __cdecl isalpha(int); +int __cdecl isupper(int); +int __cdecl islower(int); +int __cdecl isdigit(int); +int __cdecl isxdigit(int); +int __cdecl isspace(int); +int __cdecl ispunct(int); +int __cdecl isalnum(int); +int __cdecl isprint(int); +int __cdecl isgraph(int); +int __cdecl iscntrl(int); +int __cdecl toupper(int); +int __cdecl tolower(int); +int __cdecl _tolower(int); +int __cdecl _toupper(int); +int __cdecl __isascii(int); +int __cdecl __toascii(int); +int __cdecl __iscsymf(int); +int __cdecl __iscsym(int); +#define _CTYPE_DEFINED +#endif + +#ifdef _INTL +int __cdecl __isleadbyte(int); +#endif + +/* the character classification macro definitions */ + +#define isalpha(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER) ) +#define isupper(_c) ( (_ctype+1)[_c] & _UPPER ) +#define islower(_c) ( (_ctype+1)[_c] & _LOWER ) +#define isdigit(_c) ( (_ctype+1)[_c] & _DIGIT ) +#define isxdigit(_c) ( (_ctype+1)[_c] & _HEX ) +#define isspace(_c) ( (_ctype+1)[_c] & _SPACE ) +#define ispunct(_c) ( (_ctype+1)[_c] & _PUNCT ) +#define isalnum(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER|_DIGIT) ) +#define isprint(_c) ( (_ctype+1)[_c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define isgraph(_c) ( (_ctype+1)[_c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) ) +#define iscntrl(_c) ( (_ctype+1)[_c] & _CONTROL ) +#ifndef __STDC__ +#define toupper(_c) ( (islower(_c)) ? _toupper(_c) : (_c) ) +#define tolower(_c) ( (isupper(_c)) ? _tolower(_c) : (_c) ) +#endif +#define _tolower(_c) ( (_c)-'A'+'a' ) +#define _toupper(_c) ( (_c)-'a'+'A' ) +#define __isascii(_c) ( (unsigned)(_c) < 0x80 ) +#define __toascii(_c) ( (_c) & 0x7f ) + +#ifndef isleadbyte +#ifdef _INTL +#define isleadbyte(_c) __isleadbyte(_c) +#else +#define isleadbyte(_c) (0) +#endif +#endif + +/* extended ctype macros */ + +#define __iscsymf(_c) (isalpha(_c) || ((_c) == '_')) +#define __iscsym(_c) (isalnum(_c) || ((_c) == '_')) + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#ifndef _CTYPE_DEFINED +int __cdecl isascii(int); +int __cdecl toascii(int); +int __cdecl iscsymf(int); +int __cdecl iscsym(int); +#else +#define isascii __isascii +#define toascii __toascii +#define iscsymf __iscsymf +#define iscsym __iscsym +#endif +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_CTYPE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/custcntl.h b/private/oleauto/tools/win16/hdos/c800/include/custcntl.h new file mode 100644 index 000000000..be3d02af1 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/custcntl.h @@ -0,0 +1,105 @@ +/*****************************************************************************\ +* * +* custcntl.h - Custom Control Library header file * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_CUSTCNTL +#define _INC_CUSTCNTL + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * Every custom control DLL must have three functions present, + * and they must be exported by the following ordinals. + */ +#define CCINFOORD 2 /* information function ordinal */ +#define CCSTYLEORD 3 /* styles function ordinal */ +#define CCFLAGSORD 4 /* translate flags function ordinal */ + +/* general size definitions */ +#define CTLTYPES 12 /* max number of control types */ +#define CTLDESCR 22 /* max size of description */ +#define CTLCLASS 20 /* max size of class name */ +#define CTLTITLE 94 /* max size of control text */ + +/* + * CONTROL STYLE DATA STRUCTURE + * + * This data structure is used by the class style dialog function + * to set and/or reset various control attributes. + * + */ +typedef struct tagCTLSTYLE +{ + UINT wX; /* x origin of control */ + UINT wY; /* y origin of control */ + UINT wCx; /* width of control */ + UINT wCy; /* height of control */ + UINT wId; /* control child id */ + DWORD dwStyle; /* control style */ + char szClass[CTLCLASS]; /* name of control class */ + char szTitle[CTLTITLE]; /* control text */ +} CTLSTYLE; +typedef CTLSTYLE * PCTLSTYLE; +typedef CTLSTYLE FAR* LPCTLSTYLE; + +/* + * CONTROL DATA STRUCTURE + * + * This data structure is returned by the control options function + * when inquiring about the capabilities of a particular control. + * Each control may contain various types (with predefined style + * bits) under one general class. + * + * The width and height fields are used to provide the host + * application with a suggested size. The values in these fields + * are in rc coordinates. + * + */ +typedef struct tagCTLTYPE +{ + UINT wType; /* type style */ + UINT wWidth; /* suggested width */ + UINT wHeight; /* suggested height */ + DWORD dwStyle; /* default style */ + char szDescr[CTLDESCR]; /* description */ +} CTLTYPE; + +typedef struct tagCTLINFO +{ + UINT wVersion; /* control version */ + UINT wCtlTypes; /* control types */ + char szClass[CTLCLASS]; /* control class name */ + char szTitle[CTLTITLE]; /* control title */ + char szReserved[10]; /* reserved for future use */ + CTLTYPE Type[CTLTYPES]; /* control type list */ +} CTLINFO; +typedef CTLINFO * PCTLINFO; +typedef CTLINFO FAR* LPCTLINFO; + +/* These two function prototypes are used by the dialog editor */ +#ifdef STRICT +typedef DWORD (CALLBACK* LPFNSTRTOID)(LPCSTR); +#else +typedef DWORD (CALLBACK* LPFNSTRTOID)(LPSTR); +#endif +typedef UINT (CALLBACK* LPFNIDTOSTR)(UINT, LPSTR, UINT); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_CUSTCNTL */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/dde.h b/private/oleauto/tools/win16/hdos/c800/include/dde.h new file mode 100644 index 000000000..26aa0139b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dde.h @@ -0,0 +1,146 @@ +/*****************************************************************************\ +* * +* dde.h - Dynamic Data Exchange structures and definitions * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_DDE +#define _INC_DDE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* DDE window messages */ + +#define WM_DDE_FIRST 0x03E0 +#define WM_DDE_INITIATE (WM_DDE_FIRST) +#define WM_DDE_TERMINATE (WM_DDE_FIRST+1) +#define WM_DDE_ADVISE (WM_DDE_FIRST+2) +#define WM_DDE_UNADVISE (WM_DDE_FIRST+3) +#define WM_DDE_ACK (WM_DDE_FIRST+4) +#define WM_DDE_DATA (WM_DDE_FIRST+5) +#define WM_DDE_REQUEST (WM_DDE_FIRST+6) +#define WM_DDE_POKE (WM_DDE_FIRST+7) +#define WM_DDE_EXECUTE (WM_DDE_FIRST+8) +#define WM_DDE_LAST (WM_DDE_FIRST+8) + +/****************************************************************************\ +* DDEACK structure +* +* Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message +* sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE, +* WM_DDE_ADVISE, or WM_DDE_UNADVISE message. +* +\****************************************************************************/ + +typedef struct tagDDEACK +{ + WORD bAppReturnCode:8, + reserved:6, + fBusy:1, + fAck:1; +} DDEACK; + +/****************************************************************************\ +* DDEADVISE structure +* +* WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam)) +* +\****************************************************************************/ + +typedef struct tagDDEADVISE +{ + WORD reserved:14, + fDeferUpd:1, + fAckReq:1; + short cfFormat; +} DDEADVISE; + +/****************************************************************************\ +* DDEDATA structure +* +* WM_DDE_DATA parameter structure for hData (LOWORD(lParam)). +* The actual size of this structure depends on the size of +* the Value array. +* +\****************************************************************************/ + +typedef struct tagDDEDATA +{ + WORD unused:12, + fResponse:1, + fRelease:1, + reserved:1, + fAckReq:1; + short cfFormat; + BYTE Value[1]; +} DDEDATA; + + +/****************************************************************************\ +* DDEPOKE structure +* +* WM_DDE_POKE parameter structure for hData (LOWORD(lParam)). +* The actual size of this structure depends on the size of +* the Value array. +* +\****************************************************************************/ + +typedef struct tagDDEPOKE +{ + WORD unused:13, /* Earlier versions of DDE.H incorrectly */ + /* 12 unused bits. */ + fRelease:1, + fReserved:2; + short cfFormat; + BYTE Value[1]; /* This member was named rgb[1] in previous */ + /* versions of DDE.H */ + +} DDEPOKE; + +/****************************************************************************\ +* The following typedef's were used in previous versions of the Windows SDK. +* They are still valid. The above typedef's define exactly the same structures +* as those below. The above typedef names are recommended, however, as they +* are more meaningful. +* +* Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did +* not correctly define the bit positions. +\****************************************************************************/ + +typedef struct tagDDELN +{ + WORD unused:13, + fRelease:1, + fDeferUpd:1, + fAckReq:1; + short cfFormat; +} DDELN; + +typedef struct tagDDEUP +{ + WORD unused:12, + fAck:1, + fRelease:1, + fReserved:1, + fAckReq:1; + short cfFormat; + BYTE rgb[1]; +} DDEUP; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_DDE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ddeml.h b/private/oleauto/tools/win16/hdos/c800/include/ddeml.h new file mode 100644 index 000000000..89e17033e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ddeml.h @@ -0,0 +1,457 @@ +/*****************************************************************************\ +* * +* ddeml.h - DDEML API header file * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ +#ifndef _INC_DDEML +#define _INC_DDEML + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If not included with 3.1 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +#ifndef DECLARE_HANDLE32 +#ifdef STRICT +#define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \ + typedef const struct name##__ _far* name +#else /* STRICT */ +#define DECLARE_HANDLE32(name) typedef DWORD name +#endif /* !STRICT */ +#endif /* !DECLARE_HANDLE32 */ + +#define EXPENTRY WINAPI + +/******** public types ********/ + +DECLARE_HANDLE32(HCONVLIST); +DECLARE_HANDLE32(HCONV); +DECLARE_HANDLE32(HSZ); +DECLARE_HANDLE32(HDDEDATA); + +/* the following structure is for use with XTYP_WILDCONNECT processing. */ + +typedef struct tagHSZPAIR +{ + HSZ hszSvc; + HSZ hszTopic; +} HSZPAIR; +typedef HSZPAIR FAR *PHSZPAIR; + +/* The following structure is used by DdeConnect() and DdeConnectList() and + by XTYP_CONNECT and XTYP_WILDCONNECT callbacks. */ + +typedef struct tagCONVCONTEXT +{ + UINT cb; /* set to sizeof(CONVCONTEXT) */ + UINT wFlags; /* none currently defined. */ + UINT wCountryID; /* country code for topic/item strings used. */ + int iCodePage; /* codepage used for topic/item strings. */ + DWORD dwLangID; /* language ID for topic/item strings. */ + DWORD dwSecurity; /* Private security code. */ +} CONVCONTEXT; +typedef CONVCONTEXT FAR *PCONVCONTEXT; + +/* The following structure is used by DdeQueryConvInfo(): */ + +typedef struct tagCONVINFO +{ + DWORD cb; /* sizeof(CONVINFO) */ + DWORD hUser; /* user specified field */ + HCONV hConvPartner; /* hConv on other end or 0 if non-ddemgr partner */ + HSZ hszSvcPartner; /* app name of partner if obtainable */ + HSZ hszServiceReq; /* AppName requested for connection */ + HSZ hszTopic; /* Topic name for conversation */ + HSZ hszItem; /* transaction item name or NULL if quiescent */ + UINT wFmt; /* transaction format or NULL if quiescent */ + UINT wType; /* XTYP_ for current transaction */ + UINT wStatus; /* ST_ constant for current conversation */ + UINT wConvst; /* XST_ constant for current transaction */ + UINT wLastError; /* last transaction error. */ + HCONVLIST hConvList; /* parent hConvList if this conversation is in a list */ + CONVCONTEXT ConvCtxt; /* conversation context */ +} CONVINFO; +typedef CONVINFO FAR *PCONVINFO; + +/***** conversation states (usState) *****/ + +#define XST_NULL 0 /* quiescent states */ +#define XST_INCOMPLETE 1 +#define XST_CONNECTED 2 +#define XST_INIT1 3 /* mid-initiation states */ +#define XST_INIT2 4 +#define XST_REQSENT 5 /* active conversation states */ +#define XST_DATARCVD 6 +#define XST_POKESENT 7 +#define XST_POKEACKRCVD 8 +#define XST_EXECSENT 9 +#define XST_EXECACKRCVD 10 +#define XST_ADVSENT 11 +#define XST_UNADVSENT 12 +#define XST_ADVACKRCVD 13 +#define XST_UNADVACKRCVD 14 +#define XST_ADVDATASENT 15 +#define XST_ADVDATAACKRCVD 16 + +/* used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... */ +#define CADV_LATEACK 0xFFFF + +/***** conversation status bits (fsStatus) *****/ + +#define ST_CONNECTED 0x0001 +#define ST_ADVISE 0x0002 +#define ST_ISLOCAL 0x0004 +#define ST_BLOCKED 0x0008 +#define ST_CLIENT 0x0010 +#define ST_TERMINATED 0x0020 +#define ST_INLIST 0x0040 +#define ST_BLOCKNEXT 0x0080 +#define ST_ISSELF 0x0100 + +/* DDE constants for wStatus field */ + +#define DDE_FACK 0x8000 +#define DDE_FBUSY 0x4000 +#define DDE_FDEFERUPD 0x4000 +#define DDE_FACKREQ 0x8000 +#define DDE_FRELEASE 0x2000 +#define DDE_FREQUESTED 0x1000 +#define DDE_FACKRESERVED 0x3ff0 +#define DDE_FADVRESERVED 0x3fff +#define DDE_FDATRESERVED 0x4fff +#define DDE_FPOKRESERVED 0xdfff +#define DDE_FAPPSTATUS 0x00ff +#define DDE_FNOTPROCESSED 0x0000 + +/***** message filter hook types *****/ + +#define MSGF_DDEMGR 0x8001 + +/***** codepage constants ****/ + +#define CP_WINANSI 1004 /* default codepage for windows & old DDE convs. */ + +/***** transaction types *****/ + +#define XTYPF_NOBLOCK 0x0002 /* CBR_BLOCK will not work */ +#define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */ +#define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */ + +#define XCLASS_MASK 0xFC00 +#define XCLASS_BOOL 0x1000 +#define XCLASS_DATA 0x2000 +#define XCLASS_FLAGS 0x4000 +#define XCLASS_NOTIFICATION 0x8000 + +#define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) +#define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS ) +#define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK ) +#define XTYP_ADVSTART (0x0030 | XCLASS_BOOL ) +#define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION) +#define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS ) +#define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK) +#define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION ) +#define XTYP_POKE (0x0090 | XCLASS_FLAGS ) +#define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_REQUEST (0x00B0 | XCLASS_DATA ) +#define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) +#define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK) + +#define XTYP_MASK 0x00F0 +#define XTYP_SHIFT 4 /* shift to turn XTYP_ into an index */ + +/***** Timeout constants *****/ + +#define TIMEOUT_ASYNC -1L + +/***** Transaction ID constants *****/ + +#define QID_SYNC -1L + +/****** public strings used in DDE ******/ + +#define SZDDESYS_TOPIC "System" +#define SZDDESYS_ITEM_TOPICS "Topics" +#define SZDDESYS_ITEM_SYSITEMS "SysItems" +#define SZDDESYS_ITEM_RTNMSG "ReturnMessage" +#define SZDDESYS_ITEM_STATUS "Status" +#define SZDDESYS_ITEM_FORMATS "Formats" +#define SZDDESYS_ITEM_HELP "Help" +#define SZDDE_ITEM_ITEMLIST "TopicItemList" + + +/****** API entry points ******/ + +typedef HDDEDATA CALLBACK FNCALLBACK(UINT wType, UINT wFmt, HCONV hConv, + HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2); +typedef FNCALLBACK *PFNCALLBACK; + +#define CBR_BLOCK 0xffffffffL + +/* DLL registration functions */ + +UINT WINAPI DdeInitialize(DWORD FAR* pidInst, PFNCALLBACK pfnCallback, + DWORD afCmd, DWORD ulRes); + +/* + * Callback filter flags for use with standard apps. + */ + +#define CBF_FAIL_SELFCONNECTIONS 0x00001000 +#define CBF_FAIL_CONNECTIONS 0x00002000 +#define CBF_FAIL_ADVISES 0x00004000 +#define CBF_FAIL_EXECUTES 0x00008000 +#define CBF_FAIL_POKES 0x00010000 +#define CBF_FAIL_REQUESTS 0x00020000 +#define CBF_FAIL_ALLSVRXACTIONS 0x0003f000 + +#define CBF_SKIP_CONNECT_CONFIRMS 0x00040000 +#define CBF_SKIP_REGISTRATIONS 0x00080000 +#define CBF_SKIP_UNREGISTRATIONS 0x00100000 +#define CBF_SKIP_DISCONNECTS 0x00200000 +#define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000 + +/* + * Application command flags + */ +#define APPCMD_CLIENTONLY 0x00000010L +#define APPCMD_FILTERINITS 0x00000020L +#define APPCMD_MASK 0x00000FF0L + +/* + * Application classification flags + */ +#define APPCLASS_STANDARD 0x00000000L +#define APPCLASS_MASK 0x0000000FL + + +BOOL WINAPI DdeUninitialize(DWORD idInst); + +/* conversation enumeration functions */ + +HCONVLIST WINAPI DdeConnectList(DWORD idInst, HSZ hszService, HSZ hszTopic, + HCONVLIST hConvList, CONVCONTEXT FAR* pCC); +HCONV WINAPI DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); +BOOL WINAPI DdeDisconnectList(HCONVLIST hConvList); + +/* conversation control functions */ + +HCONV WINAPI DdeConnect(DWORD idInst, HSZ hszService, HSZ hszTopic, + CONVCONTEXT FAR* pCC); +BOOL WINAPI DdeDisconnect(HCONV hConv); +HCONV WINAPI DdeReconnect(HCONV hConv); + +UINT WINAPI DdeQueryConvInfo(HCONV hConv, DWORD idTransaction, CONVINFO FAR* pConvInfo); +BOOL WINAPI DdeSetUserHandle(HCONV hConv, DWORD id, DWORD hUser); + +BOOL WINAPI DdeAbandonTransaction(DWORD idInst, HCONV hConv, DWORD idTransaction); + + +/* app server interface functions */ + +BOOL WINAPI DdePostAdvise(DWORD idInst, HSZ hszTopic, HSZ hszItem); +BOOL WINAPI DdeEnableCallback(DWORD idInst, HCONV hConv, UINT wCmd); + +#define EC_ENABLEALL 0 +#define EC_ENABLEONE ST_BLOCKNEXT +#define EC_DISABLE ST_BLOCKED +#define EC_QUERYWAITING 2 + +HDDEDATA WINAPI DdeNameService(DWORD idInst, HSZ hsz1, HSZ hsz2, UINT afCmd); + +#define DNS_REGISTER 0x0001 +#define DNS_UNREGISTER 0x0002 +#define DNS_FILTERON 0x0004 +#define DNS_FILTEROFF 0x0008 + +/* app client interface functions */ + +HDDEDATA WINAPI DdeClientTransaction(void FAR* pData, DWORD cbData, + HCONV hConv, HSZ hszItem, UINT wFmt, UINT wType, + DWORD dwTimeout, DWORD FAR* pdwResult); + +/* data transfer functions */ + +HDDEDATA WINAPI DdeCreateDataHandle(DWORD idInst, void FAR* pSrc, DWORD cb, + DWORD cbOff, HSZ hszItem, UINT wFmt, UINT afCmd); +HDDEDATA WINAPI DdeAddData(HDDEDATA hData, void FAR* pSrc, DWORD cb, DWORD cbOff); +DWORD WINAPI DdeGetData(HDDEDATA hData, void FAR* pDst, DWORD cbMax, DWORD cbOff); +BYTE FAR* WINAPI DdeAccessData(HDDEDATA hData, DWORD FAR* pcbDataSize); +BOOL WINAPI DdeUnaccessData(HDDEDATA hData); +BOOL WINAPI DdeFreeDataHandle(HDDEDATA hData); + +#define HDATA_APPOWNED 0x0001 + + + +UINT WINAPI DdeGetLastError(DWORD idInst); + +#define DMLERR_NO_ERROR 0 /* must be 0 */ + +#define DMLERR_FIRST 0x4000 + +#define DMLERR_ADVACKTIMEOUT 0x4000 +#define DMLERR_BUSY 0x4001 +#define DMLERR_DATAACKTIMEOUT 0x4002 +#define DMLERR_DLL_NOT_INITIALIZED 0x4003 +#define DMLERR_DLL_USAGE 0x4004 +#define DMLERR_EXECACKTIMEOUT 0x4005 +#define DMLERR_INVALIDPARAMETER 0x4006 +#define DMLERR_LOW_MEMORY 0x4007 +#define DMLERR_MEMORY_ERROR 0x4008 +#define DMLERR_NOTPROCESSED 0x4009 +#define DMLERR_NO_CONV_ESTABLISHED 0x400a +#define DMLERR_POKEACKTIMEOUT 0x400b +#define DMLERR_POSTMSG_FAILED 0x400c +#define DMLERR_REENTRANCY 0x400d +#define DMLERR_SERVER_DIED 0x400e +#define DMLERR_SYS_ERROR 0x400f +#define DMLERR_UNADVACKTIMEOUT 0x4010 +#define DMLERR_UNFOUND_QUEUE_ID 0x4011 + +#define DMLERR_LAST 0x4011 + +HSZ WINAPI DdeCreateStringHandle(DWORD idInst, LPCSTR psz, int iCodePage); +DWORD WINAPI DdeQueryString(DWORD idInst, HSZ hsz, LPSTR psz, DWORD cchMax, int iCodePage); +BOOL WINAPI DdeFreeStringHandle(DWORD idInst, HSZ hsz); +BOOL WINAPI DdeKeepStringHandle(DWORD idInst, HSZ hsz); +int WINAPI DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); + + +#ifndef NODDEMLSPY +/* */ +/* DDEML public debugging header file info */ +/* */ + +typedef struct tagMONMSGSTRUCT +{ + UINT cb; + HWND hwndTo; + DWORD dwTime; + HANDLE hTask; + UINT wMsg; + WPARAM wParam; + LPARAM lParam; +} MONMSGSTRUCT; + +typedef struct tagMONCBSTRUCT +{ + UINT cb; + WORD wReserved; + DWORD dwTime; + HANDLE hTask; + DWORD dwRet; + UINT wType; + UINT wFmt; + HCONV hConv; + HSZ hsz1; + HSZ hsz2; + HDDEDATA hData; + DWORD dwData1; + DWORD dwData2; +} MONCBSTRUCT; + +typedef struct tagMONHSZSTRUCT +{ + UINT cb; + BOOL fsAction; /* MH_ value */ + DWORD dwTime; + HSZ hsz; + HANDLE hTask; + WORD wReserved; + char str[1]; +} MONHSZSTRUCT; + +#define MH_CREATE 1 +#define MH_KEEP 2 +#define MH_DELETE 3 +#define MH_CLEANUP 4 + + +typedef struct tagMONERRSTRUCT +{ + UINT cb; + UINT wLastError; + DWORD dwTime; + HANDLE hTask; +} MONERRSTRUCT; + +typedef struct tagMONLINKSTRUCT +{ + UINT cb; + DWORD dwTime; + HANDLE hTask; + BOOL fEstablished; + BOOL fNoData; + HSZ hszSvc; + HSZ hszTopic; + HSZ hszItem; + UINT wFmt; + BOOL fServer; + HCONV hConvServer; + HCONV hConvClient; +} MONLINKSTRUCT; + +typedef struct tagMONCONVSTRUCT +{ + UINT cb; + BOOL fConnect; + DWORD dwTime; + HANDLE hTask; + HSZ hszSvc; + HSZ hszTopic; + HCONV hConvClient; + HCONV hConvServer; +} MONCONVSTRUCT; + +#define MAX_MONITORS 4 +#define APPCLASS_MONITOR 0x00000001L +#define XTYP_MONITOR (0x00F0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) + +/* + * Callback filter flags for use with MONITOR apps - 0 implies no monitor + * callbacks. + */ +#define MF_HSZ_INFO 0x01000000 +#define MF_SENDMSGS 0x02000000 +#define MF_POSTMSGS 0x04000000 +#define MF_CALLBACKS 0x08000000 +#define MF_ERRORS 0x10000000 +#define MF_LINKS 0x20000000 +#define MF_CONV 0x40000000 + +#define MF_MASK 0xFF000000 +#endif /* NODDEMLSPY */ + +#ifdef __cplusplus +} +#endif + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_DDEML */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/direct.h b/private/oleauto/tools/win16/hdos/c800/include/direct.h new file mode 100644 index 000000000..a3d25b055 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/direct.h @@ -0,0 +1,51 @@ +/*** +*direct.h - function declarations for directory handling/creation +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the library +* functions related to directory handling and creation. +* +****/ + +#ifndef _INC_DIRECT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* function prototypes */ + +int __cdecl _chdir(const char *); +int __cdecl _chdrive(int); +char * __cdecl _getcwd(char *, int); +char * __cdecl _getdcwd(int, char *, int); +int __cdecl _getdrive(void); +int __cdecl _mkdir(const char *); +int __cdecl _rmdir(const char *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl chdir(const char *); +char * __cdecl getcwd(char *, int); +int __cdecl mkdir(const char *); +int __cdecl rmdir(const char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_DIRECT +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/dlgs.h b/private/oleauto/tools/win16/hdos/c800/include/dlgs.h new file mode 100644 index 000000000..d701b0f05 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dlgs.h @@ -0,0 +1,192 @@ +/*****************************************************************************\ +* * +* dlgs.h - Common dialog's dialog element ID numbers * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_DLGS +#define _INC_DLGS + +#define ctlFirst 0x0400 +#define ctlLast 0x04ff + /* Push buttons */ +#define psh1 0x0400 +#define psh2 0x0401 +#define psh3 0x0402 +#define psh4 0x0403 +#define psh5 0x0404 +#define psh6 0x0405 +#define psh7 0x0406 +#define psh8 0x0407 +#define psh9 0x0408 +#define psh10 0x0409 +#define psh11 0x040a +#define psh12 0x040b +#define psh13 0x040c +#define psh14 0x040d +#define psh15 0x040e +#define pshHelp psh15 +#define psh16 0x040f + /* Checkboxes */ +#define chx1 0x0410 +#define chx2 0x0411 +#define chx3 0x0412 +#define chx4 0x0413 +#define chx5 0x0414 +#define chx6 0x0415 +#define chx7 0x0416 +#define chx8 0x0417 +#define chx9 0x0418 +#define chx10 0x0419 +#define chx11 0x041a +#define chx12 0x041b +#define chx13 0x041c +#define chx14 0x041d +#define chx15 0x041e +#define chx16 0x041f + /* Radio buttons */ +#define rad1 0x0420 +#define rad2 0x0421 +#define rad3 0x0422 +#define rad4 0x0423 +#define rad5 0x0424 +#define rad6 0x0425 +#define rad7 0x0426 +#define rad8 0x0427 +#define rad9 0x0428 +#define rad10 0x0429 +#define rad11 0x042a +#define rad12 0x042b +#define rad13 0x042c +#define rad14 0x042d +#define rad15 0x042e +#define rad16 0x042f + /* Groups, frames, rectangles, and icons */ +#define grp1 0x0430 +#define grp2 0x0431 +#define grp3 0x0432 +#define grp4 0x0433 +#define frm1 0x0434 +#define frm2 0x0435 +#define frm3 0x0436 +#define frm4 0x0437 +#define rct1 0x0438 +#define rct2 0x0439 +#define rct3 0x043a +#define rct4 0x043b +#define ico1 0x043c +#define ico2 0x043d +#define ico3 0x043e +#define ico4 0x043f + /* Static text */ +#define stc1 0x0440 +#define stc2 0x0441 +#define stc3 0x0442 +#define stc4 0x0443 +#define stc5 0x0444 +#define stc6 0x0445 +#define stc7 0x0446 +#define stc8 0x0447 +#define stc9 0x0448 +#define stc10 0x0449 +#define stc11 0x044a +#define stc12 0x044b +#define stc13 0x044c +#define stc14 0x044d +#define stc15 0x044e +#define stc16 0x044f +#define stc17 0x0450 +#define stc18 0x0451 +#define stc19 0x0452 +#define stc20 0x0453 +#define stc21 0x0454 +#define stc22 0x0455 +#define stc23 0x0456 +#define stc24 0x0457 +#define stc25 0x0458 +#define stc26 0x0459 +#define stc27 0x045a +#define stc28 0x045b +#define stc29 0x045c +#define stc30 0x045d +#define stc31 0x045e +#define stc32 0x045f + /* Listboxes */ +#define lst1 0x0460 +#define lst2 0x0461 +#define lst3 0x0462 +#define lst4 0x0463 +#define lst5 0x0464 +#define lst6 0x0465 +#define lst7 0x0466 +#define lst8 0x0467 +#define lst9 0x0468 +#define lst10 0x0469 +#define lst11 0x046a +#define lst12 0x046b +#define lst13 0x046c +#define lst14 0x046d +#define lst15 0x046e +#define lst16 0x046f + /* Combo boxes */ +#define cmb1 0x0470 +#define cmb2 0x0471 +#define cmb3 0x0472 +#define cmb4 0x0473 +#define cmb5 0x0474 +#define cmb6 0x0475 +#define cmb7 0x0476 +#define cmb8 0x0477 +#define cmb9 0x0478 +#define cmb10 0x0479 +#define cmb11 0x047a +#define cmb12 0x047b +#define cmb13 0x047c +#define cmb14 0x047d +#define cmb15 0x047e +#define cmb16 0x047f + /* Edit controls */ +#define edt1 0x0480 +#define edt2 0x0481 +#define edt3 0x0482 +#define edt4 0x0483 +#define edt5 0x0484 +#define edt6 0x0485 +#define edt7 0x0486 +#define edt8 0x0487 +#define edt9 0x0488 +#define edt10 0x0489 +#define edt11 0x048a +#define edt12 0x048b +#define edt13 0x048c +#define edt14 0x048d +#define edt15 0x048e +#define edt16 0x048f + /* Scroll bars */ +#define scr1 0x0490 +#define scr2 0x0491 +#define scr3 0x0492 +#define scr4 0x0493 +#define scr5 0x0494 +#define scr6 0x0495 +#define scr7 0x0496 +#define scr8 0x0497 + +/* These dialog resource ordinals really start at 0x0600, but the + * RC Compiler can't handle hex for resource IDs, hence the decimal. + */ +#define FILEOPENORD 1536 +#define MULTIFILEOPENORD 1537 +#define PRINTDLGORD 1538 +#define PRNSETUPDLGORD 1539 +#define FINDDLGORD 1540 +#define REPLACEDLGORD 1541 +#define FONTDLGORD 1542 +#define FORMATDLGORD31 1543 +#define FORMATDLGORD30 1544 + +#endif /* !_INC_DLGS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/dos.h b/private/oleauto/tools/win16/hdos/c800/include/dos.h new file mode 100644 index 000000000..ac7d26535 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/dos.h @@ -0,0 +1,330 @@ +/*** +*dos.h - definitions for MS-DOS interface routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the structs and unions used for the direct DOS interface +* routines; includes macros to access the segment and offset +* values of far pointers, so that they may be used by the routines; and +* provides function prototypes for direct DOS interface functions. +* +****/ + +#ifndef _INC_DOS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __interrupt _interrupt +#define __near _near +#endif + +#ifndef _REGS_DEFINED + +/* word registers */ + +struct _WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +/* byte registers */ + +struct _BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +/* general purpose registers union - + * overlays the corresponding word and byte registers. + */ + +union _REGS { + struct _WORDREGS x; + struct _BYTEREGS h; + }; + +/* segment registers */ + +struct _SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +struct WORDREGS { + unsigned int ax; + unsigned int bx; + unsigned int cx; + unsigned int dx; + unsigned int si; + unsigned int di; + unsigned int cflag; + }; + +struct BYTEREGS { + unsigned char al, ah; + unsigned char bl, bh; + unsigned char cl, ch; + unsigned char dl, dh; + }; + +union REGS { + struct WORDREGS x; + struct BYTEREGS h; + }; + +struct SREGS { + unsigned int es; + unsigned int cs; + unsigned int ss; + unsigned int ds; + }; + +#endif + +#define _REGS_DEFINED +#endif + + +/* dosexterror structure */ + +#ifndef _DOSERROR_DEFINED +#pragma pack(2) + +struct _DOSERROR { + int exterror; + char errclass; + char action; + char locus; + }; + +#if ((!defined (__STDC__)) && (!defined (__cplusplus))) +/* Non-ANSI name for compatibility */ +struct DOSERROR { + int exterror; + char class; + char action; + char locus; + }; +#endif + +#pragma pack() +#define _DOSERROR_DEFINED +#endif + + +/* _dos_findfirst structure */ + +#ifndef _FIND_T_DEFINED +#pragma pack(2) + +struct _find_t { + char reserved[21]; + char attrib; + unsigned wr_time; + unsigned wr_date; + long size; + char name[13]; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define find_t _find_t +#endif + +#pragma pack() +#define _FIND_T_DEFINED +#endif + + +/* _dos_getdate/_dossetdate and _dos_gettime/_dos_settime structures */ + +#ifndef _DATETIME_T_DEFINED +#pragma pack(2) + +struct _dosdate_t { + unsigned char day; /* 1-31 */ + unsigned char month; /* 1-12 */ + unsigned int year; /* 1980-2099 */ + unsigned char dayofweek; /* 0-6, 0=Sunday */ + }; + +struct _dostime_t { + unsigned char hour; /* 0-23 */ + unsigned char minute; /* 0-59 */ + unsigned char second; /* 0-59 */ + unsigned char hsecond; /* 0-99 */ + }; + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define dosdate_t _dosdate_t +#define dostime_t _dostime_t +#endif + +#pragma pack() +#define _DATETIME_T_DEFINED +#endif + + +/* _dos_getdiskfree structure */ + +#ifndef _DISKFREE_T_DEFINED + +struct _diskfree_t { + unsigned total_clusters; + unsigned avail_clusters; + unsigned sectors_per_cluster; + unsigned bytes_per_sector; + }; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define diskfree_t _diskfree_t +#endif + +#define _DISKFREE_T_DEFINED +#endif + + +/* manifest constants for _hardresume result parameter */ + +#define _HARDERR_IGNORE 0 /* Ignore the error */ +#define _HARDERR_RETRY 1 /* Retry the operation */ +#define _HARDERR_ABORT 2 /* Abort program issuing Interrupt 23h */ +#define _HARDERR_FAIL 3 /* Fail the system call in progress */ + /* _HARDERR_FAIL is not supported on DOS 2.x */ + +/* File attribute constants */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_VOLID 0x08 /* Volume ID file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +/* macros to break C "far" pointers into their segment and offset components + */ + +#define _FP_SEG(fp) (*((unsigned __far *)&(fp)+1)) +#define _FP_OFF(fp) (*((unsigned __far *)&(fp))) + +/* macro to construct a far pointer from segment and offset values + */ + +#define _MK_FP(seg, offset) (void __far *)(((unsigned long)seg << 16) \ + + (unsigned long)(unsigned)offset) + +/* external variable declarations */ + +extern unsigned int __near __cdecl _osversion; + + +/* function prototypes */ + +#ifndef _MT +int __cdecl _bdos(int, unsigned int, unsigned int); +#ifndef _WINDOWS +void __cdecl _chain_intr(void (__cdecl __interrupt __far *)()); +#endif +void __cdecl _disable(void); +#ifndef _WINDOWS +unsigned __cdecl _dos_allocmem(unsigned, unsigned *); +#endif +unsigned __cdecl _dos_close(int); +unsigned __cdecl _dos_commit(int); +unsigned __cdecl _dos_creat(const char *, unsigned, int *); +unsigned __cdecl _dos_creatnew(const char *, unsigned, int *); +unsigned __cdecl _dos_findfirst(const char *, unsigned, struct _find_t *); +unsigned __cdecl _dos_findnext(struct _find_t *); +#ifndef _WINDOWS +unsigned __cdecl _dos_freemem(unsigned); +#endif +void __cdecl _dos_getdate(struct _dosdate_t *); +void __cdecl _dos_getdrive(unsigned *); +unsigned __cdecl _dos_getdiskfree(unsigned, struct _diskfree_t *); +unsigned __cdecl _dos_getfileattr(const char *, unsigned *); +unsigned __cdecl _dos_getftime(int, unsigned *, unsigned *); +void __cdecl _dos_gettime(struct _dostime_t *); +void (__cdecl __interrupt __far * __cdecl _dos_getvect(unsigned))(); +#ifndef _WINDOWS +void __cdecl _dos_keep(unsigned, unsigned); +#endif +unsigned __cdecl _dos_lock(int, int, unsigned long, unsigned long); +unsigned __cdecl _dos_open(const char *, unsigned, int *); +unsigned __cdecl _dos_read(int, void __far *, unsigned, unsigned *); +unsigned long __cdecl _dos_seek(int, unsigned long, int); +#ifndef _WINDOWS +unsigned __cdecl _dos_setblock(unsigned, unsigned, unsigned *); +#endif +unsigned __cdecl _dos_setdate(struct _dosdate_t *); +void __cdecl _dos_setdrive(unsigned, unsigned *); +unsigned __cdecl _dos_setfileattr(const char *, unsigned); +unsigned __cdecl _dos_setftime(int, unsigned, unsigned); +unsigned __cdecl _dos_settime(struct _dostime_t *); +#ifndef _WINDOWS +void __cdecl _dos_setvect(unsigned, void (__cdecl __interrupt __far *)()); +#endif +unsigned __cdecl _dos_write(int, const void __far *, unsigned, unsigned *); +int __cdecl _dosexterr(struct _DOSERROR *); +void __cdecl _enable(void); +#ifndef _WINDOWS +void __cdecl _harderr(void (__far __cdecl *)(unsigned, unsigned, + unsigned __far *)); +void __cdecl _hardresume(int); +void __cdecl _hardretn(int); +#endif +int __cdecl _intdos(union _REGS *, union _REGS *); +int __cdecl _intdosx(union _REGS *, union _REGS *, struct _SREGS *); +int __cdecl _int86(int, union _REGS *, union _REGS *); +int __cdecl _int86x(int, union _REGS *, union _REGS *, struct _SREGS *); +#endif + +void __cdecl _segread(struct _SREGS *); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define FP_SEG _FP_SEG +#define FP_OFF _FP_OFF +#define MK_FP _MK_FP + +#ifndef _MT +int __cdecl bdos(int, unsigned int, unsigned int); +int __cdecl intdos(union REGS *, union REGS *); +int __cdecl intdosx(union REGS *, union REGS *, struct SREGS *); +int __cdecl int86(int, union REGS *, union REGS *); +int __cdecl int86x(int, union REGS *, union REGS *, struct SREGS *); +#ifndef __cplusplus +int __cdecl dosexterr(struct DOSERROR *); +#endif +#endif +void __cdecl segread(struct SREGS *); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_DOS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/drivinit.h b/private/oleauto/tools/win16/hdos/c800/include/drivinit.h new file mode 100644 index 000000000..9db28db67 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/drivinit.h @@ -0,0 +1,2 @@ +/* OBSOLETE: Use print.h instead */ +#include <print.h> diff --git a/private/oleauto/tools/win16/hdos/c800/include/errno.h b/private/oleauto/tools/win16/hdos/c800/include/errno.h new file mode 100644 index 000000000..765712619 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/errno.h @@ -0,0 +1,80 @@ +/*** +*errno.h - system wide error numbers (set by system calls) +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the system-wide error numbers (set by +* system calls). Conforms to the XENIX standard. Extended +* for compatibility with Uniforum standard. +* [ANSI/System V] +* +****/ + +#ifndef _INC_ERRNO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* declare reference to errno */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +#define errno (*_errno()) +#else +extern int __near __cdecl volatile errno; +#endif + +/* Error Codes */ + +#define EZERO 0 +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define EUCLEAN 35 +#define EDEADLOCK 36 + +#ifdef __cplusplus +} +#endif + +#define _INC_ERRNO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fcntl.h b/private/oleauto/tools/win16/hdos/c800/include/fcntl.h new file mode 100644 index 000000000..2cf377be0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fcntl.h @@ -0,0 +1,54 @@ +/*** +*fcntl.h - file control options used by open() +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines constants for the file control options used +* by the open() function. +* [System V] +* +****/ + +#ifndef _INC_FCNTL + +#define _O_RDONLY 0x0000 /* open for reading only */ +#define _O_WRONLY 0x0001 /* open for writing only */ +#define _O_RDWR 0x0002 /* open for reading and writing */ +#define _O_APPEND 0x0008 /* writes done at eof */ + +#define _O_CREAT 0x0100 /* create and open file */ +#define _O_TRUNC 0x0200 /* open and truncate */ +#define _O_EXCL 0x0400 /* open only if file doesn't already exist */ + +/* _O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s, +** and <lf> sequences translated to <cr><lf> on write()'s +*/ + +#define _O_TEXT 0x4000 /* file mode is text (translated) */ +#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */ + +/* macro to translate the C 2.0 name used to force binary mode for files */ + +#define _O_RAW _O_BINARY + +/* Open handle inherit bit */ + +#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_RDWR _O_RDWR +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_EXCL _O_EXCL +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY +#define O_NOINHERIT _O_NOINHERIT +#endif + +#define _INC_FCNTL +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd new file mode 100644 index 000000000..68937c99a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fd @@ -0,0 +1,372 @@ +C fgraph.fd - declare constants and functions for graphics library +C +C Copyright (c) 1987-1993 Microsoft Corporation. All rights reserved. +C +C Purpose: +C This file declares the graphics library functions and +C the constants that are used with them. +C +C + +$NOTRUNCATE ! required for some names to be significant +$NOTSTRICT ! uses structures which are non-standard conforming + +C User-visible declarations for FORTRAN Graphics Library + +C Structure for getvideoconfig() as visible to user + STRUCTURE/videoconfig/ + INTEGER*2 numxpixels ! number of pixels on X axis + INTEGER*2 numypixels ! number of pixels on Y axis + INTEGER*2 numtextcols ! number of text columns available + INTEGER*2 numtextrows ! number of text rows available + INTEGER*2 numcolors ! number of actual colors + INTEGER*2 bitsperpixel ! number of bits per pixel + INTEGER*2 numvideopages ! number of available video pages + INTEGER*2 mode ! current video mode + INTEGER*2 adapter ! active display adapter + INTEGER*2 monitor ! active display monitor + INTEGER*2 memory ! adapter video memory in K bytes + END STRUCTURE + +C Return value of getcurrentposition(), etc. + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + +C Structure for text position + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + +C ERROR HANDLING + +C Status info returned by grstatus() + INTEGER*2 $GRPARAMETERALTERED,$GRCLIPPED,$GRNOOUTPUT,$GROK, + + $GRERROR,$GRMODENOTSUPPORTED,$GRNOTINPROPERMODE, + + $GRINVALIDPARAMETER,$GRFONTFILENOTFOUND, + + $GRINVALIDFONTFILE,$GRCORRUPTEDFONTFILE, + + $GRINSUFFICIENTMEMORY,$GRINVALIDIMAGEBUFFER +C Successful + PARAMETER($GROK = 0) ! success +C Warnings + PARAMETER($GRNOOUTPUT = 1) ! nothing drawn + PARAMETER($GRCLIPPED = 2) ! output was partially clipped + PARAMETER($GRPARAMETERALTERED = 3) ! input parameters adjusted + PARAMETER($GRTEXTNOTSUPPORTED = 4) ! SuperVGA text output may fail +C Errors + PARAMETER($GRERROR = -1) ! generic graphics error + PARAMETER($GRMODENOTSUPPORTED = -2) ! video mode not supported + PARAMETER($GRNOTINPROPERMODE = -3) ! not supported in current mode + PARAMETER($GRINVALIDPARAMETER = -4) ! bad parameter + PARAMETER($GRFONTFILENOTFOUND = -5) ! font file not found + PARAMETER($GRINVALIDFONTFILE = -6) ! not a font file + PARAMETER($GRCORRUPTEDFONTFILE = -7) ! inconsistent font file + PARAMETER($GRINSUFFICIENTMEMORY = -8) ! out of memory + PARAMETER($GRINVALIDIMAGEBUFFER = -9) ! bad image buffer detected + +C SETUP AND CONFIGURATION + +C Arguments to setvideomode() + INTEGER*2 $MAXRESMODE,$MAXCOLORMODE,$DEFAULTMODE,$TEXTBW40, + + $TEXTC40,$TEXTBW80,$TEXTC80,$MRES4COLOR,$MRESNOCOLOR, + + $HRESBW,$TEXTMONO,$HERCMONO,$MRES16COLOR,$HRES16COLOR, + + $ERESNOCOLOR,$ERESCOLOR,$VRES2COLOR,$VRES16COLOR, + + $MRES256COLOR,$ORESCOLOR,$SRES16COLOR,$SRES256COLOR, + + $XRES16COLOR,$XRES256COLOR,$ZRES16COLOR,$ZRES256COLOR + PARAMETER($MAXRESMODE =-3) ! graphics mode with highest resolution + PARAMETER($MAXCOLORMODE =-2) ! graphics mode with most colors + PARAMETER($DEFAULTMODE =-1) ! restore screen to original mode + PARAMETER($TEXTBW40 =0) ! 40 x 25 text, 16 grey + PARAMETER($TEXTC40 =1) ! 40 x 25 text, 16/8 color + PARAMETER($TEXTBW80 =2) ! 80 x 25 text, 16 grey + PARAMETER($TEXTC80 =3) ! 80 x 25 text, 16/8 color + PARAMETER($MRES4COLOR =4) ! 320 x 200, 4 color + PARAMETER($MRESNOCOLOR =5) ! 320 x 200, 4 grey + PARAMETER($HRESBW =6) ! 640 x 200, BW + PARAMETER($TEXTMONO =7) ! 80 x 25 text, BW + PARAMETER($HERCMONO =8) ! 720 x 348, BW for HGC + PARAMETER($MRES16COLOR =13) ! 320 x 200, 16 color + PARAMETER($HRES16COLOR =14) ! 640 x 200, 16 color + PARAMETER($ERESNOCOLOR =15) ! 640 x 350, BW + PARAMETER($ERESCOLOR =16) ! 640 x 350, 4 or 16 color + PARAMETER($VRES2COLOR =17) ! 640 x 480, BW + PARAMETER($VRES16COLOR =18) ! 640 x 480, 16 color + PARAMETER($MRES256COLOR =19) ! 320 x 200, 256 color + PARAMETER($ORESCOLOR =64) ! 640 x 400, 1 of 16 colors (Olivetti) + +C The following 8 modes require VESA SuperVGA BIOS extensions + PARAMETER($ORES256COLOR =#0100) ! 640 x 400, 256 color + PARAMETER($VRES256COLOR =#0101) ! 640 x 480, 256 color + +C WARNING: DO NOT attempt to set the following modes without ensuring +C that your monitor can safely handle that resolution. Otherwise, you +C may risk damaging your display monitor! Consult your owner's manual +C for details. +C Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES +C modes. + +C Requires NEC MultiSync 3D or equivalent, or better + PARAMETER($SRES16COLOR =#0102) ! 800 x 600, 16 color + PARAMETER($SRES256COLOR =#0103) ! 800 x 600, 256 color + +C Requires NEC MultiSync 4D or equivalent, or better + PARAMETER($XRES16COLOR =#0104) ! 1024 x 768, 16 color + PARAMETER($XRES256COLOR =#0105) ! 1024 x 768, 256 color + +C Requires NEC MultiSync 5D or equivalent, or better + PARAMETER($ZRES16COLOR =#0106) ! 1280 x 1024, 16 color + PARAMETER($ZRES256COLOR =#0107) ! 1280 x 1024, 256 color + +C VIDEOCONFIG adapter values + +C These constants can be used to determine the type of the active +C adapter, using either simple comparisons or the bitwise-AND operator. + INTEGER*2 $QUICKWIN, $MDPA,$CGA,$EGA,$MCGA,$VGA,$HGC,$OCGA, + + $OEGA,$OVGA + PARAMETER($QUICKWIN =#0000) ! QuickWin graphics + PARAMETER($MDPA =#0001) ! Monochrome Display Adapter (MDPA) + PARAMETER($CGA =#0002) ! Color Graphics Adapter (CGA) + PARAMETER($EGA =#0004) ! Enhanced Graphics Adapter (EGA) + PARAMETER($VGA =#0008) ! Video Graphics Array (VGA) + PARAMETER($MCGA =#0010) ! MultiColor Graphics Array (MCGA) + PARAMETER($HGC =#0020) ! Hercules Graphics Card (HGC) + PARAMETER($OCGA =#0042) ! Olivetti Color Graphics Adapter (OCGA) + PARAMETER($OEGA =#0044) ! Olivetti Enhanced Graphics Adapter (OEGA) + PARAMETER($OVGA =#0048) ! Olivetti Video Graphics Array (OVGA) + PARAMETER($SVGA =#0088) ! Super VGA with VESA BIOS support (SVGA) + +C VIDEOCONFIG monitor values + +C These constants can be used to determine the type of monitor in +C use, using either simple comparisons or the bitwise-AND operator + INTEGER*2 $MONO,$COLOR,$ENHCOLOR,$ANALOGMONO, + + $ANALOGCOLOR,$ANALOG + PARAMETER($MONO =#0001) ! Monochrome + PARAMETER($COLOR =#0002) ! Color (or Enhanced emulating color) + PARAMETER($ENHCOLOR =#0004) ! Enhanced Color + PARAMETER($ANALOGMONO =#0008) ! Analog Monochrome only + PARAMETER($ANALOGCOLOR=#0010) ! Analog Color only + PARAMETER($ANALOG =#0018) ! Analog Color + Analog Monochrome + +C COORDINATE SYSTEMS + +C OUTPUT ROUTINES + +C Control parameters for rectangle(), polygon(), ellipse(), and pie() + INTEGER*2 $GBORDER,$GFILLINTERIOR + PARAMETER($GBORDER =2) ! draw outline only + PARAMETER($GFILLINTERIOR =3) ! fill using current fill mask + +C Parameters for clearscreen() + INTEGER*2 $GCLEARSCREEN,$GVIEWPORT,$GWINDOW + PARAMETER($GCLEARSCREEN =0) + PARAMETER($GVIEWPORT =1) + PARAMETER($GWINDOW =2) + +C TEXT + +C Parameters for displaycursor() + INTEGER*2 $GCURSOROFF,$GCURSORON + PARAMETER($GCURSOROFF =0) + PARAMETER($GCURSORON =1) + +C Parameters for wrapon() + INTEGER*2 $GWRAPOFF,$GWRAPON + PARAMETER($GWRAPOFF =0) + PARAMETER($GWRAPON =1) + +C Parameters for scrolltextwindow() + INTEGER*2 $GSCROLLUP,$GSCROLLDOWN + PARAMETER($GSCROLLUP =1) + PARAMETER($GSCROLLDOWN =-1) + +C Request maximum number of rows in _settextrows() and _setvideomoderows() + INTEGER*2 $MAXTEXTROWS + PARAMETER($MAXTEXTROWS =-1) + +C "Action verbs" for putimage(), setwritemode() + INTEGER*2 $GPSET,$GPRESET,$GAND,$GOR,$GXOR + PARAMETER($GPSET =3) + PARAMETER($GPRESET =2) + PARAMETER($GAND =1) + PARAMETER($GOR =0) + PARAMETER($GXOR =4) + +C Color values are used with setbkcolor in graphics modes and also by +C remappalette abd remapallpalette. Also known as palette colors. +C Not to be confused with color indices (aka. color attributes). + +C Universal color values (all color modes): + INTEGER*4 $BLACK,$BLUE,$GREEN,$CYAN,$RED,$MAGENTA,$BROWN, + + $WHITE,$GRAY,$LIGHTBLUE,$LIGHTGREEN,$LIGHTCYAN, + + $LIGHTRED,$LIGHTMAGENTA,$YELLOW,$BRIGHTWHITE + PARAMETER($BLACK =#000000) + PARAMETER($BLUE =#2a0000) + PARAMETER($GREEN =#002a00) + PARAMETER($CYAN =#2a2a00) + PARAMETER($RED =#00002a) + PARAMETER($MAGENTA =#2a002a) + PARAMETER($BROWN =#00152a) + PARAMETER($WHITE =#2a2a2a) + PARAMETER($GRAY =#151515) + PARAMETER($LIGHTBLUE =#3F1515) + PARAMETER($LIGHTGREEN =#153f15) + PARAMETER($LIGHTCYAN =#3f3f15) + PARAMETER($LIGHTRED =#15153f) + PARAMETER($LIGHTMAGENTA =#3f153f) + PARAMETER($YELLOW =#153f3f) + PARAMETER($BRIGHTWHITE =#3f3f3f) + +C The following is obsolescent and defined only for backwards +C compatibility. + INTEGER*4 $LIGHTYELLOW + PARAMETER($LIGHTYELLOW =#153f3f) + +C Mono mode F ($ERESNOCOLOR) color values: + INTEGER*4 $MODEFOFF,$MODEFOFFTOON,$MODEFOFFTOHI,$MODEFONTOOFF, + + $MODEFON,$MODEFONTOHI,$MODEFHITOOFF,$MODEFHITOON, + + $MODEFHI + PARAMETER($MODEFOFF =0) + PARAMETER($MODEFOFFTOON =1) + PARAMETER($MODEFOFFTOHI =2) + PARAMETER($MODEFONTOOFF =3) + PARAMETER($MODEFON =4) + PARAMETER($MODEFONTOHI =5) + PARAMETER($MODEFHITOOFF =6) + PARAMETER($MODEFHITOON =7) + PARAMETER($MODEFHI =8) + +C Mono mode 7 ($TEXTMONO) color values: + INTEGER*4 $MODE7OFF,$MODE7ON,$MODE7HI + PARAMETER($MODE7OFF =0) + PARAMETER($MODE7ON =1) + PARAMETER($MODE7HI =2) + +C External function declarations + + INTEGER*2 grstatus[EXTERN] + INTEGER*2 setvideomode[EXTERN] + INTEGER*2 setvideomoderows[EXTERN] + INTEGER*2 setactivepage[EXTERN] + INTEGER*2 setvisualpage[EXTERN] + INTEGER*2 getactivepage[EXTERN] + INTEGER*2 getvisualpage[EXTERN] + EXTERNAL getvideoconfig + EXTERNAL setvieworg + EXTERNAL getviewcoord + EXTERNAL getphyscoord + EXTERNAL setcliprgn + EXTERNAL setviewport + EXTERNAL clearscreen + EXTERNAL moveto + EXTERNAL getcurrentposition + INTEGER*2 lineto[EXTERN] + INTEGER*2 rectangle[EXTERN] + INTEGER*2 polygon[EXTERN] + INTEGER*2 ellipse[EXTERN] + INTEGER*2 arc[EXTERN] + INTEGER*2 pie[EXTERN] + INTEGER*2 getarcinfo[EXTERN] + INTEGER*2 setpixel[EXTERN] + INTEGER*2 getpixel[EXTERN] + INTEGER*2 floodfill[EXTERN] + INTEGER*2 setcolor[EXTERN] + INTEGER*2 getcolor[EXTERN] + + EXTERNAL setlinestyle + INTEGER*2 getlinestyle[EXTERN] + INTEGER*2 setwritemode[EXTERN] + INTEGER*2 getwritemode[EXTERN] + EXTERNAL setfillmask + EXTERNAL getfillmask + INTEGER*4 setbkcolor[EXTERN] + INTEGER*4 getbkcolor[EXTERN] + INTEGER*4 remappalette[EXTERN] + INTEGER*2 remapallpalette[EXTERN] + INTEGER*2 selectpalette[EXTERN] + INTEGER*2 settextrows[EXTERN] + EXTERNAL settextwindow + EXTERNAL gettextwindow + EXTERNAL scrolltextwindow + EXTERNAL outtext + INTEGER*2 wrapon[EXTERN] + INTEGER*2 displaycursor[EXTERN] + INTEGER*2 settextcursor[EXTERN] + INTEGER*2 gettextcursor[EXTERN] + EXTERNAL settextposition + EXTERNAL gettextposition + INTEGER*2 settextcolor[EXTERN] + INTEGER*2 gettextcolor[EXTERN] + EXTERNAL getimage + EXTERNAL putimage + INTEGER*4 imagesize[EXTERN] + +C External function declarations for QuickWin Graphics API's + INTEGER*2 INCHARQQ[EXTERN] + INTEGER*2 WGOPENQQ[EXTERN] + INTEGER*2 WGCLOSEQQ[EXTERN] + INTEGER*2 WGSETACTIVEQQ[EXTERN] + INTEGER*2 WGGETACTIVEQQ[EXTERN] + +C WINDOW COORDINATE SYSTEM + +C Structure for window coordinate pair + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx ! window x coordinate + DOUBLE PRECISION wy ! window y coordinate + END STRUCTURE + + INTEGER*2 setwindow[EXTERN] + + EXTERNAL getwindowcoord + EXTERNAL getviewcoord_w + EXTERNAL getcurrentposition_w + +C Window coordinate entry points for graphics output routines + + INTEGER*2 arc_w[EXTERN] + INTEGER*2 ellipse_w[EXTERN] + INTEGER*2 floodfill_w[EXTERN] + INTEGER*2 getpixel_w[EXTERN] + INTEGER*2 lineto_w[EXTERN] + EXTERNAL moveto_w + INTEGER*2 pie_w[EXTERN] + INTEGER*2 rectangle_w[EXTERN] + INTEGER*2 polygon_w[EXTERN] + INTEGER*2 setpixel_w[EXTERN] + EXTERNAL getimage_w + INTEGER*4 imagesize_w[EXTERN] + EXTERNAL putimage_w + + STRUCTURE/fontinfo/ + INTEGER*2 type ! b0 set = vector,clear = bit map + INTEGER*2 ascent ! pix dist from top to baseline + INTEGER*2 pixwidth ! character width in pixels, 0=prop + INTEGER*2 pixheight ! character height in pixels + INTEGER*2 avgwidth ! average character width in pixels + CHARACTER*81 filename ! file name including path + CHARACTER*32 facename ! font name + END STRUCTURE + +C Font parameters + + INTEGER*2 $NO_SPACE,$FIXED_SPACE,$PROP_SPACE + PARAMETER ($NO_SPACE = 0) + PARAMETER ($FIXED_SPACE = 1) + PARAMETER ($PROP_SPACE = 2) + + INTEGER*2 $NO_FONT_MAP,$VECTOR_MAP,$BIT_MAP + PARAMETER ($NO_FONT_MAP = 0) + PARAMETER ($VECTOR_MAP = 1) + PARAMETER ($BIT_MAP = 2) + + INTEGER*2 registerfonts[EXTERN] + EXTERNAL unregisterfonts + INTEGER*2 setfont[EXTERN] + INTEGER*2 getfontinfo[EXTERN] + EXTERNAL outgtext + INTEGER*2 getgtextextent[EXTERN] + EXTERNAL setgtextvector + EXTERNAL getgtextvector diff --git a/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi new file mode 100644 index 000000000..e7a34a9a0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fgraph.fi @@ -0,0 +1,506 @@ +C +C fgraph.fi - declare constants and functions for graphics library +C +C Copyright (c) 1987-1993 Microsoft Corporation. All rights reserved. +C +C Purpose: +C This file declares the graphics library functions and +C the manifest constants that are used with them. +C + +$NOTRUNCATE +$NOTSTRICT + +C User-visible declarations for FORTRAN Graphics Library + + INTERFACE TO FUNCTION arc(x1,y1,x2,y2,x3,y3,x4,y4) + INTEGER*2 arc[FAR,C,ALIAS:"__arc"],x1,y1,x2,y2,x3,y3,x4,y4 + END + + INTERFACE TO FUNCTION arc_w(wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4) + INTEGER*2 arc_w[FAR,C,ALIAS:"__arc_w"] + DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4 + END + + INTERFACE TO FUNCTION getarcinfo(lpstart,lpend,lppaint) + INTEGER*2 getarcinfo[FAR,C,ALIAS:"__getarcinfo"] + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/lpstart[FAR,REFERENCE] + RECORD/xycoord/lpend[FAR,REFERENCE] + RECORD/xycoord/lppaint[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + clearscreen[FAR,C,ALIAS:"__clearscreen"](area) + INTEGER*2 area + END + + INTERFACE TO FUNCTION displaycursor(toggle) + INTEGER*2 displaycursor[FAR,C,ALIAS:"__displaycursor"],toggle + END + + INTERFACE TO FUNCTION ellipse(control,x1,y1,x2,y2) + INTEGER*2 ellipse[FAR,C,ALIAS:"__ellipse"],control,x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION ellipse_w(control,wx1,wy1,wx2,wy2) + INTEGER*2 ellipse_w[FAR,C,ALIAS:"__ellipse_w"],control + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION floodfill(x,y,boundary) + INTEGER*2 floodfill[FAR,C,ALIAS:"__floodfill"],x,y,boundary + END + + INTERFACE TO FUNCTION floodfill_w(wx1,wy1,boundary) + INTEGER*2 floodfill_w[FAR,C,ALIAS:"__floodfill_w"],boundary + DOUBLE PRECISION wx1,wy1 + END + + INTERFACE TO FUNCTION getactivepage() + INTEGER*2 getactivepage[FAR,C,ALIAS:"__getactivepage"] + END + + INTERFACE TO FUNCTION getbkcolor() + INTEGER*4 getbkcolor[FAR,C,ALIAS:"__getbkcolor"] + END + + INTERFACE TO FUNCTION getcolor() + INTEGER*2 getcolor[FAR,C,ALIAS:"__getcolor"] + END + + INTERFACE TO SUBROUTINE + + getcurrentposition[FAR,C,ALIAS:"__f_getcurrentposition"](s) + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getcurrentposition_w[FAR,C,ALIAS:"__f_getcurrentposition_wxy"](s) + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getfillmask[FAR,C,ALIAS:"__getfillmask"](mask) + INTEGER*1 mask[FAR,REFERENCE](8) + END + + INTERFACE TO SUBROUTINE + + getimage[FAR,C,ALIAS:"__getimage"](x1,y1,x2,y2,image) + INTEGER*2 x1,y1,x2,y2 + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + getimage_w[FAR,C,ALIAS:"__getimage_w"](wx1,wy1,wx2,wy2,image) + DOUBLE PRECISION wx1,wy1,wx2,wy2 + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO FUNCTION getlinestyle() + INTEGER*2 getlinestyle[FAR,C,ALIAS:"__getlinestyle"] + END + + INTERFACE TO SUBROUTINE + + getphyscoord[FAR,C,ALIAS:"__f_getphyscoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getpixel(x,y) + INTEGER*2 getpixel[FAR,C,ALIAS:"__getpixel"],x,y + END + + INTERFACE TO FUNCTION getpixel_w(wx,wy) + INTEGER*2 getpixel_w[FAR,C,ALIAS:"__getpixel_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO FUNCTION gettextcolor() + INTEGER*2 gettextcolor[FAR,C,ALIAS:"__gettextcolor"] + END + + INTERFACE TO FUNCTION gettextcursor() + INTEGER*2 gettextcursor[FAR,C,ALIAS:"__gettextcursor"] + END + + INTERFACE TO SUBROUTINE + + gettextposition[FAR,C,ALIAS:"__f_gettextposition"](s) + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + RECORD/rccoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + gettextwindow[FAR,C,ALIAS:"__gettextwindow"](r1,c1,r2,c2) + INTEGER*2 r1[FAR,REFERENCE],c1[FAR,REFERENCE] + INTEGER*2 r2[FAR,REFERENCE],c2[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getvideoconfig[FAR,C,ALIAS:"__getvideoconfig"](s) + STRUCTURE/videoconfig/ + INTEGER*2 numxpixels ! number of pixels on X axis + INTEGER*2 numypixels ! number of pixels on Y axis + INTEGER*2 numtextcols ! number of text columns available + INTEGER*2 numtextrows ! number of text rows available + INTEGER*2 numcolors ! number of actual colors + INTEGER*2 bitsperpixel ! number of bits per pixel + INTEGER*2 numvideopages ! number of available video pages + INTEGER*2 mode ! current video mode + INTEGER*2 adapter ! active display adapter + INTEGER*2 monitor ! active display monitor + INTEGER*2 memory ! adapter video memory in K bytes + END STRUCTURE + RECORD/videoconfig/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getviewcoord[FAR,C,ALIAS:"__f_getviewcoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getviewcoord_w[FAR,C,ALIAS:"__f_getviewcoord_w"](wx,wy,s) + DOUBLE PRECISION wx,wy + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getvisualpage() + INTEGER*2 getvisualpage[FAR,C,ALIAS:"__getvisualpage"] + END + + INTERFACE TO SUBROUTINE + + getwindowcoord[FAR,C,ALIAS:"__f_getwindowcoord"](x,y,s) + INTEGER*2 x,y + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getwritemode() + INTEGER*2 getwritemode[FAR,C,ALIAS:"__getwritemode"] + END + + INTERFACE TO FUNCTION grstatus() + INTEGER*2 grstatus[FAR,C,ALIAS:"__grstatus"] + END + + INTERFACE TO FUNCTION imagesize(x1,y1,x2,y2) + INTEGER*4 imagesize[FAR,C,ALIAS:"__imagesize"] + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION imagesize_w(wx1,wy1,wx2,wy2) + INTEGER*4 imagesize_w[FAR,C,ALIAS:"__imagesize_w"] + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION lineto(x,y) + INTEGER*2 lineto[FAR,C,ALIAS:"__lineto"],x,y + END + + INTERFACE TO FUNCTION lineto_w(wx,wy) + INTEGER*2 lineto_w[FAR,C,ALIAS:"__lineto_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO SUBROUTINE + + moveto[FAR,C,ALIAS:"__f_moveto"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + moveto_w[FAR,C,ALIAS:"__f_moveto_w"](wx,wy,s) + DOUBLE PRECISION wx,wy + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + outtext[FAR,C,ALIAS:"__f_outtext"](text) + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION pie(i,x1,y1,x2,y2,x3,y3,x4,y4) + INTEGER*2 pie[FAR,C,ALIAS:"__pie"],i,x1,y1,x2,y2,x3,y3,x4,y4 + END + + INTERFACE TO FUNCTION pie_w(i,wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4) + INTEGER*2 pie_w[FAR,C,ALIAS:"__pie_w"],i + DOUBLE PRECISION wx1,wy1,wx2,wy2,wx3,wy3,wx4,wy4 + END + + INTERFACE TO FUNCTION polygon(control,lppoints,cpoints) + INTEGER*2 polygon[FAR,C,ALIAS:"__polygon"],control,cpoints + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/lppoints[FAR,REFERENCE](*) + END + + INTERFACE TO FUNCTION polygon_w(control,lppoints,cpoints) + INTEGER*2 polygon_w[FAR,C,ALIAS:"__polygon_w"],control,cpoints + STRUCTURE/wxycoord/ + DOUBLE PRECISION wx + DOUBLE PRECISION wy + END STRUCTURE + RECORD/wxycoord/lppoints[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + putimage[FAR,C,ALIAS:"__putimage"](x,y,image,action) + INTEGER*2 x,y,action + INTEGER*1 image[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + putimage_w[FAR,C,ALIAS:"__putimage_w"](wx,wy,image,action) + DOUBLE PRECISION wx,wy + INTEGER*1 image[FAR,REFERENCE](*) + INTEGER*2 action + END + + INTERFACE TO FUNCTION rectangle(control,x1,y1,x2,y2) + INTEGER*2 rectangle[FAR,C,ALIAS:"__rectangle"] + INTEGER*2 control,x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION rectangle_w(control,wx1,wy1,wx2,wy2) + INTEGER*2 rectangle_w[FAR,C,ALIAS:"__rectangle_w"],control + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION remappalette(index,color) + INTEGER*4 remappalette[FAR,C,ALIAS:"__remappalette"],color + INTEGER*2 index + END + + INTERFACE TO FUNCTION remapallpalette(colors) + INTEGER*2 remapallpalette[FAR,C,ALIAS:"__remapallpalette"] + INTEGER*4 colors[FAR,REFERENCE](*) + END + + INTERFACE TO SUBROUTINE + + scrolltextwindow[FAR,C,ALIAS:"__scrolltextwindow"](rows) + INTEGER*2 rows + END + + INTERFACE TO FUNCTION selectpalette(number) + INTEGER*2 selectpalette[FAR,C,ALIAS:"__selectpalette"],number + END + + INTERFACE TO FUNCTION setactivepage(page) + INTEGER*2 setactivepage[FAR,C,ALIAS:"__setactivepage"],page + END + + INTERFACE TO FUNCTION setbkcolor(color) + INTEGER*4 setbkcolor[FAR,C,ALIAS:"__setbkcolor"],color + END + + INTERFACE TO SUBROUTINE + + setcliprgn[FAR,C,ALIAS:"__setcliprgn"](x1,y1,x2,y2) + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION setcolor(color) + INTEGER*2 setcolor[FAR,C,ALIAS:"__setcolor"] + INTEGER*2 color + END + + INTERFACE TO SUBROUTINE + + setfillmask[FAR,C,ALIAS:"__setfillmask"](mask) + INTEGER*1 mask[FAR,REFERENCE](8) + END + + INTERFACE TO SUBROUTINE + + setlinestyle[FAR,C,ALIAS:"__setlinestyle"](mask) + INTEGER*2 mask + END + + INTERFACE TO FUNCTION setpixel(x,y) + INTEGER*2 setpixel[FAR,C,ALIAS:"__setpixel"],x,y + END + + INTERFACE TO FUNCTION setpixel_w(wx,wy) + INTEGER*2 setpixel_w[FAR,C,ALIAS:"__setpixel_w"] + DOUBLE PRECISION wx,wy + END + + INTERFACE TO FUNCTION settextcolor(index) + INTEGER*2 settextcolor[FAR,C,ALIAS:"__settextcolor"],index + END + + INTERFACE TO FUNCTION settextcursor(attr) + INTEGER*2 settextcursor[FAR,C,ALIAS:"__settextcursor"],attr + END + + INTERFACE TO SUBROUTINE + + settextposition[FAR,C,ALIAS:"__f_settextposition"](row,col,s) + INTEGER*2 row,col + STRUCTURE/rccoord/ + INTEGER*2 row + INTEGER*2 col + END STRUCTURE + RECORD/rccoord/s[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION settextrows(rows) + INTEGER*2 settextrows[FAR,C,ALIAS:"__settextrows"],rows + END + + INTERFACE TO SUBROUTINE + + settextwindow[FAR,C,ALIAS:"__settextwindow"](r1,c1,r2,c2) + INTEGER*2 r1,c1,r2,c2 + END + + INTERFACE TO FUNCTION setvideomode(mode) + INTEGER*2 setvideomode[FAR,C,ALIAS:"__setvideomode"],mode + END + + INTERFACE TO FUNCTION setvideomoderows(mode,rows) + INTEGER*2 setvideomoderows[FAR,C,ALIAS:"__setvideomoderows"] + INTEGER*2 mode,rows + END + + INTERFACE TO SUBROUTINE + + setvieworg[FAR,C,ALIAS:"__f_setvieworg"](x,y,s) + INTEGER*2 x,y + STRUCTURE/xycoord/ + INTEGER*2 xcoord + INTEGER*2 ycoord + END STRUCTURE + RECORD/xycoord/s[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + setviewport[FAR,C,ALIAS:"__setviewport"](x1,y1,x2,y2) + INTEGER*2 x1,y1,x2,y2 + END + + INTERFACE TO FUNCTION setvisualpage(page) + INTEGER*2 setvisualpage[FAR,C,ALIAS:"__setvisualpage"],page + END + + INTERFACE TO FUNCTION setwindow(finvert,wx1,wy1,wx2,wy2) + INTEGER*2 setwindow[FAR,C,ALIAS:"__setwindow"] + LOGICAL*2 finvert + DOUBLE PRECISION wx1,wy1,wx2,wy2 + END + + INTERFACE TO FUNCTION setwritemode(wmode) + INTEGER*2 setwritemode[FAR,C,ALIAS:"__setwritemode"],wmode + END + + INTERFACE TO FUNCTION wrapon(option) + INTEGER*2 wrapon[FAR,C,ALIAS:"__wrapon"],option + END + +C FONTS + + INTERFACE TO FUNCTION getfontinfo(fi) + INTEGER*2 getfontinfo[FAR,C,ALIAS:"__f_getfontinfo"] + STRUCTURE/fontinfo/ + INTEGER*2 type ! b0 set = vector,clear = bit map + INTEGER*2 ascent ! pix dist from top to baseline + INTEGER*2 pixwidth ! character width in pixels, 0=prop + INTEGER*2 pixheight ! character height in pixels + INTEGER*2 avgwidth ! average character width in pixels + CHARACTER*81 filename ! file name including path + CHARACTER*32 facename ! font name + END STRUCTURE + RECORD/fontinfo/fi[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION getgtextextent(text) + INTEGER*2 getgtextextent[FAR,C,ALIAS:"__f_getgtextextent"] + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + getgtextvector[FAR,C,ALIAS:"__f_getgtextvector"](x,y) + INTEGER*2 x[FAR,REFERENCE],y[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + outgtext[FAR,C,ALIAS:"__f_outgtext"](text) + CHARACTER*(*) text[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION registerfonts(filename) + INTEGER*2 registerfonts[FAR,C,ALIAS:"__f_registerfonts"] + CHARACTER*(*) filename[FAR,REFERENCE] + END + + INTERFACE TO FUNCTION setfont(options) + INTEGER*2 setfont[FAR,C,ALIAS:"__f_setfont"] + CHARACTER*(*) options[FAR,REFERENCE] + END + + INTERFACE TO SUBROUTINE + + setgtextvector[FAR,C,ALIAS:"__setgtextvector"](x,y) + INTEGER*2 x,y + END + + INTERFACE TO SUBROUTINE + + unregisterfonts[FAR,C,ALIAS:"__unregisterfonts"]() + END + +C QuickWin Graphics API's + + INTERFACE TO FUNCTION INCHARQQ() + INTEGER*2 INCHARQQ[FAR,C,ALIAS:"__inchar"] + END + + INTERFACE TO FUNCTION WGOPENQQ(name) + INTEGER*2 WGOPENQQ[FAR,C,ALIAS:"__wgopen"] + CHARACTER*(*) name[REFERENCE] + END + + INTERFACE TO FUNCTION WGCLOSEQQ(handle) + INTEGER*2 WGCLOSEQQ[FAR,C,ALIAS:"__wgclose"], handle + END + + INTERFACE TO FUNCTION WGSETACTIVEQQ(handle) + INTEGER*2 WGSETACTIVEQQ[FAR,C,ALIAS:"__wgsetactive"], handle + END + + INTERFACE TO FUNCTION WGGETACTIVEQQ() + INTEGER*2 WGGETACTIVEQQ[FAR,C,ALIAS:"__wggetactive"] + END diff --git a/private/oleauto/tools/win16/hdos/c800/include/float.h b/private/oleauto/tools/win16/hdos/c800/include/float.h new file mode 100644 index 000000000..2658e94e3 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/float.h @@ -0,0 +1,213 @@ +/*** +*float.h - constants for floating point values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains defines for a number of implementation dependent +* values which are commonly used by sophisticated numerical (floating +* point) programs. +* [ANSI] +* +****/ + +#ifndef _INC_FLOAT + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#define DBL_DIG 15 /* # of decimal digits of precision */ +#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ +#define DBL_MANT_DIG 53 /* # of bits in mantissa */ +#define DBL_MAX 1.7976931348623158e+308 /* max value */ +#define DBL_MAX_10_EXP 308 /* max decimal exponent */ +#define DBL_MAX_EXP 1024 /* max binary exponent */ +#define DBL_MIN 2.2250738585072014e-308 /* min positive value */ +#define DBL_MIN_10_EXP (-307) /* min decimal exponent */ +#define DBL_MIN_EXP (-1021) /* min binary exponent */ +#define _DBL_RADIX 2 /* exponent radix */ +#define _DBL_ROUNDS 1 /* addition rounding: near */ + +#define FLT_DIG 6 /* # of decimal digits of precision */ +#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */ +#define FLT_GUARD 0 +#define FLT_MANT_DIG 24 /* # of bits in mantissa */ +#define FLT_MAX 3.402823466e+38F /* max value */ +#define FLT_MAX_10_EXP 38 /* max decimal exponent */ +#define FLT_MAX_EXP 128 /* max binary exponent */ +#define FLT_MIN 1.175494351e-38F /* min positive value */ +#define FLT_MIN_10_EXP (-37) /* min decimal exponent */ +#define FLT_MIN_EXP (-125) /* min binary exponent */ +#define FLT_NORMALIZE 0 +#define FLT_RADIX 2 /* exponent radix */ +#define FLT_ROUNDS 1 /* addition rounding: near */ + +#define LDBL_DIG 18 /* # of decimal digits of precision */ +#define LDBL_EPSILON 1.084202172485504434e-019L /* smallest such that 1.0+LDBL_EPSILON != 1.0 */ +#define LDBL_MANT_DIG 64 /* # of bits in mantissa */ +#define LDBL_MAX 1.189731495357231765e+4932L /* max value */ +#define LDBL_MAX_10_EXP 4932 /* max decimal exponent */ +#define LDBL_MAX_EXP 16384 /* max binary exponent */ +#define LDBL_MIN 3.3621031431120935063e-4932L /* min positive value */ +#define LDBL_MIN_10_EXP (-4931) /* min decimal exponent */ +#define LDBL_MIN_EXP (-16381) /* min binary exponent */ +#define _LDBL_RADIX 2 /* exponent radix */ +#define _LDBL_ROUNDS 1 /* addition rounding: near */ + + +/* + * 8087/80287 math control information + */ + + +/* User Control Word Mask and bit definitions. + * These definitions match the 8087/80287 + */ + +#define _MCW_EM 0x003f /* interrupt Exception Masks */ +#define _EM_INVALID 0x0001 /* invalid */ +#define _EM_DENORMAL 0x0002 /* denormal */ +#define _EM_ZERODIVIDE 0x0004 /* zero divide */ +#define _EM_OVERFLOW 0x0008 /* overflow */ +#define _EM_UNDERFLOW 0x0010 /* underflow */ +#define _EM_INEXACT 0x0020 /* inexact (precision) */ + +#define _MCW_IC 0x1000 /* Infinity Control */ +#define _IC_AFFINE 0x1000 /* affine */ +#define _IC_PROJECTIVE 0x0000 /* projective */ + +#define _MCW_RC 0x0c00 /* Rounding Control */ +#define _RC_CHOP 0x0c00 /* chop */ +#define _RC_UP 0x0800 /* up */ +#define _RC_DOWN 0x0400 /* down */ +#define _RC_NEAR 0x0000 /* near */ + +#define _MCW_PC 0x0300 /* Precision Control */ +#define _PC_24 0x0000 /* 24 bits */ +#define _PC_53 0x0200 /* 53 bits */ +#define _PC_64 0x0300 /* 64 bits */ + + +/* initial Control Word value */ + +#define _CW_DEFAULT ( _IC_AFFINE + _RC_NEAR + _PC_64 + _EM_DENORMAL + _EM_UNDERFLOW + _EM_INEXACT ) + + +/* user Status Word bit definitions */ + +#define _SW_INVALID 0x0001 /* invalid */ +#define _SW_DENORMAL 0x0002 /* denormal */ +#define _SW_ZERODIVIDE 0x0004 /* zero divide */ +#define _SW_OVERFLOW 0x0008 /* overflow */ +#define _SW_UNDERFLOW 0x0010 /* underflow */ +#define _SW_INEXACT 0x0020 /* inexact (precision) */ + + +/* invalid subconditions (_SW_INVALID also set) */ + +#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ +#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ +#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ +#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ + + +/* Floating point error signals and return codes */ + +#define _FPE_INVALID 0x81 +#define _FPE_DENORMAL 0x82 +#define _FPE_ZERODIVIDE 0x83 +#define _FPE_OVERFLOW 0x84 +#define _FPE_UNDERFLOW 0x85 +#define _FPE_INEXACT 0x86 + +#define _FPE_UNEMULATED 0x87 +#define _FPE_SQRTNEG 0x88 +#define _FPE_STACKOVERFLOW 0x8a +#define _FPE_STACKUNDERFLOW 0x8b + +#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ + + +/* function prototypes */ + +unsigned int __cdecl _clear87(void); +unsigned int __cdecl _control87(unsigned int, unsigned int); +void __cdecl _fpreset(void); +unsigned int __cdecl _status87(void); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DBL_RADIX _DBL_RADIX +#define DBL_ROUNDS _DBL_ROUNDS + +#define LDBL_RADIX _LDBL_RADIX +#define LDBL_ROUNDS _LDBL_ROUNDS + +#define MCW_EM _MCW_EM +#define EM_INVALID _EM_INVALID +#define EM_DENORMAL _EM_DENORMAL +#define EM_ZERODIVIDE _EM_ZERODIVIDE +#define EM_OVERFLOW _EM_OVERFLOW +#define EM_UNDERFLOW _EM_UNDERFLOW +#define EM_INEXACT _EM_INEXACT + +#define MCW_IC _MCW_IC +#define IC_AFFINE _IC_AFFINE +#define IC_PROJECTIVE _IC_PROJECTIVE + +#define MCW_RC _MCW_RC +#define RC_CHOP _RC_CHOP +#define RC_UP _RC_UP +#define RC_DOWN _RC_DOWN +#define RC_NEAR _RC_NEAR + +#define MCW_PC _MCW_PC +#define PC_24 _PC_24 +#define PC_53 _PC_53 +#define PC_64 _PC_64 + +#define CW_DEFAULT _CW_DEFAULT + +#define SW_INVALID _SW_INVALID +#define SW_DENORMAL _SW_DENORMAL +#define SW_ZERODIVIDE _SW_ZERODIVIDE +#define SW_OVERFLOW _SW_OVERFLOW +#define SW_UNDERFLOW _SW_UNDERFLOW +#define SW_INEXACT _SW_INEXACT + +#define SW_UNEMULATED _SW_UNEMULATED +#define SW_SQRTNEG _SW_SQRTNEG +#define SW_STACKOVERFLOW _SW_STACKOVERFLOW +#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW + +#define FPE_INVALID _FPE_INVALID +#define FPE_DENORMAL _FPE_DENORMAL +#define FPE_ZERODIVIDE _FPE_ZERODIVIDE +#define FPE_OVERFLOW _FPE_OVERFLOW +#define FPE_UNDERFLOW _FPE_UNDERFLOW +#define FPE_INEXACT _FPE_INEXACT + +#define FPE_UNEMULATED _FPE_UNEMULATED +#define FPE_SQRTNEG _FPE_SQRTNEG +#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW +#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW + +#define FPE_EXPLICITGEN _FPE_EXPLICITGEN + +#endif + + +#ifdef __cplusplus +} +#endif + +#define _INC_FLOAT +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/fstream.h b/private/oleauto/tools/win16/hdos/c800/include/fstream.h new file mode 100644 index 000000000..e7865980b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/fstream.h @@ -0,0 +1,141 @@ +/*** +*fstream.h - definitions/declarations for filebuf and fstream classes +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the filebuf and fstream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_FSTREAM +#define _INC_FSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef int filedesc; + +class filebuf : public streambuf { +public: +static const int openprot; // default share/prot mode for open + +// optional share values for 3rd argument (prot) of open or constructor +static const int sh_compat; // compatibility share mode +static const int sh_none; // exclusive mode no sharing +static const int sh_read; // allow read sharing +static const int sh_write; // allow write sharing +// use (sh_read | sh_write) to allow both read and write sharing + +// options for setmode member function +static const int binary; +static const int text; + + filebuf(); + filebuf(filedesc); + filebuf(filedesc, char _HFAR_ *, int); + ~filebuf(); + + filebuf* attach(filedesc); + filedesc fd() const { return (x_fd==-1) ? EOF : x_fd; } + int is_open() const { return (x_fd!=-1); } + filebuf* open(const char _HFAR_ *, int, int = filebuf::openprot); + filebuf* close(); + int setmode(int = filebuf::text); + +virtual int overflow(int=EOF); +virtual int underflow(); + +virtual streambuf* setbuf(char _HFAR_ *, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +// virtual streampos seekpos(streampos, int); +virtual int sync(); + +private: + filedesc x_fd; + int x_fOpened; +}; + +class ifstream : public istream { +public: + ifstream(); + ifstream(const char _HFAR_ *, int =ios::in, int = filebuf::openprot); + ifstream(filedesc); + ifstream(filedesc, char _HFAR_ *, int); + ~ifstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int =ios::in, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class ofstream : public ostream { +public: + ofstream(); + ofstream(const char _HFAR_ *, int =ios::out, int = filebuf::openprot); + ofstream(filedesc); + ofstream(filedesc, char _HFAR_ *, int); + ~ofstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ios::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int =ios::out, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +class fstream : public iostream { +public: + fstream(); + fstream(const char _HFAR_ *, int, int = filebuf::openprot); + fstream(filedesc); + fstream(filedesc, char _HFAR_ *, int); + ~fstream(); + + streambuf * setbuf(char _HFAR_ *, int); + filebuf* rdbuf() const { return (filebuf*) ostream::rdbuf(); } + + void attach(filedesc); + filedesc fd() const { return rdbuf()->fd(); } + + int is_open() const { return rdbuf()->is_open(); } + void open(const char _HFAR_ *, int, int = filebuf::openprot); + void close(); + int setmode(int mode = filebuf::text) { return rdbuf()->setmode(mode); } +}; + +// manipulators to dynamically change file access mode (filebufs only) +inline ios& binary(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::binary); return _fstrm; } +inline ios& text(ios& _fstrm) \ + { ((filebuf*)_fstrm.rdbuf())->setmode(filebuf::text); return _fstrm; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/graph.h b/private/oleauto/tools/win16/hdos/c800/include/graph.h new file mode 100644 index 000000000..ee2eeb316 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/graph.h @@ -0,0 +1,485 @@ +/*** +*graph.h - declare constants, functions, and macros for graphics library +* +* Copyright (c) 1987 - 1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the graphics library functions and the +* structures and manifest constants that are used with them. +* +***************************************************************************/ + +#ifndef _WINDOWS +/* Force graphics.lib to be linked in if graph.h used */ +#pragma comment(lib,"graphics.lib") +#endif + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#endif + +/* force word packing to avoid possible -Zp override */ +#pragma pack(2) + + +/* user-visible declarations for Quick-C Graphics Library */ + +#ifndef _VIDEOCONFIG_DEFINED +/* structure for _getvideoconfig() as visible to user */ +struct _videoconfig { + short numxpixels; /* number of pixels on X axis */ + short numypixels; /* number of pixels on Y axis */ + short numtextcols; /* number of text columns available */ + short numtextrows; /* number of text rows available */ + short numcolors; /* number of actual colors */ + short bitsperpixel; /* number of bits per pixel */ + short numvideopages; /* number of available video pages */ + short mode; /* current video mode */ + short adapter; /* active display adapter */ + short monitor; /* active display monitor */ + short memory; /* adapter video memory in K bytes */ +}; +#define _VIDEOCONFIG_DEFINED +#endif + +#ifndef _XYCOORD_DEFINED +/* return value of _setvieworg(), etc. */ +struct _xycoord { + short xcoord; + short ycoord; +}; +#define _XYCOORD_DEFINED +#endif + +/* structure for text position */ +#ifndef _RCCOORD_DEFINED +struct _rccoord { + short row; + short col; +}; +#define _RCCOORD_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define videoconfig _videoconfig +#define xycoord _xycoord +#define rccoord _rccoord +#endif + + +/* ERROR HANDLING */ +short __far __cdecl _grstatus(void); + +/* Error Status Information returned by _grstatus() */ + +/* successful */ +#define _GROK 0 + +/* errors */ +#define _GRERROR (-1) +#define _GRMODENOTSUPPORTED (-2) +#define _GRNOTINPROPERMODE (-3) +#define _GRINVALIDPARAMETER (-4) +#define _GRFONTFILENOTFOUND (-5) +#define _GRINVALIDFONTFILE (-6) +#define _GRCORRUPTEDFONTFILE (-7) +#define _GRINSUFFICIENTMEMORY (-8) +#define _GRINVALIDIMAGEBUFFER (-9) + +/* warnings */ +#define _GRNOOUTPUT 1 +#define _GRCLIPPED 2 +#define _GRPARAMETERALTERED 3 +#define _GRTEXTNOTSUPPORTED 4 + + +/* SETUP AND CONFIGURATION */ + +short __far __cdecl _setvideomode(short); +short __far __cdecl _setvideomoderows(short,short); /* return rows; 0 if error */ + +/* arguments to _setvideomode() */ +#define _MAXRESMODE (-3) /* graphics mode with highest resolution */ +#define _MAXCOLORMODE (-2) /* graphics mode with most colors */ +#define _DEFAULTMODE (-1) /* restore screen to original mode */ +#define _TEXTBW40 0 /* 40-column text, 16 grey */ +#define _TEXTC40 1 /* 40-column text, 16/8 color */ +#define _TEXTBW80 2 /* 80-column text, 16 grey */ +#define _TEXTC80 3 /* 80-column text, 16/8 color */ +#define _MRES4COLOR 4 /* 320 x 200, 4 color */ +#define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */ +#define _HRESBW 6 /* 640 x 200, BW */ +#define _TEXTMONO 7 /* 80-column text, BW */ +#define _HERCMONO 8 /* 720 x 348, BW for HGC */ +#define _MRES16COLOR 13 /* 320 x 200, 16 color */ +#define _HRES16COLOR 14 /* 640 x 200, 16 color */ +#define _ERESNOCOLOR 15 /* 640 x 350, BW */ +#define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */ +#define _VRES2COLOR 17 /* 640 x 480, BW */ +#define _VRES16COLOR 18 /* 640 x 480, 16 color */ +#define _MRES256COLOR 19 /* 320 x 200, 256 color */ +#define _ORESCOLOR 64 /* 640 x 400, 1 of 16 colors (Olivetti only) */ + +/* the following 8 modes require VESA SuperVGA BIOS extensions */ +#define _ORES256COLOR 0x0100 /* 640 x 400, 256 color */ +#define _VRES256COLOR 0x0101 /* 640 x 480, 256 color */ + +/* WARNING: DO NOT attempt to set the following modes without ensuring that + your monitor can safely handle that resolution. Otherwise, you may risk + damaging your display monitor! Consult your owner's manual for details. + Note: _MAXRESMODE and _MAXCOLORMODE never select SRES, XRES, or ZRES modes */ + +/* requires NEC MultiSync 3D or equivalent, or better */ +#define _SRES16COLOR 0x0102 /* 800 x 600, 16 color */ +#define _SRES256COLOR 0x0103 /* 800 x 600, 256 color */ + +/* requires NEC MultiSync 4D or equivalent, or better */ +#define _XRES16COLOR 0x0104 /* 1024 x 768, 16 color */ +#define _XRES256COLOR 0x0105 /* 1024 x 768, 256 color */ + +/* requires NEC MultiSync 5D or equivalent, or better */ +#define _ZRES16COLOR 0x0106 /* 1280 x 1024, 16 color */ +#define _ZRES256COLOR 0x0107 /* 1280 x 1024, 256 color */ + + +short __far __cdecl _setactivepage(short); +short __far __cdecl _setvisualpage(short); +short __far __cdecl _getactivepage(void); +short __far __cdecl _getvisualpage(void); + +/* _videoconfig adapter values */ +/* these manifest constants can be used to determine the type of the active */ +/* adapter, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */ +#define _CGA 0x0002 /* Color Graphics Adapter (CGA) */ +#define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */ +#define _VGA 0x0008 /* Video Graphics Array (VGA) */ +#define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */ +#define _HGC 0x0020 /* Hercules Graphics Card (HGC) */ +#define _OCGA 0x0042 /* Olivetti Color Graphics Adapter (OCGA) */ +#define _OEGA 0x0044 /* Olivetti Enhanced Graphics Adapter (OEGA) */ +#define _OVGA 0x0048 /* Olivetti Video Graphics Array (OVGA) */ +#define _SVGA 0x0088 /* Super VGA with VESA BIOS support (SVGA) */ + +/* _videoconfig monitor values */ +/* these manifest constants can be used to determine the type of monitor in */ +/* use, using either simple comparisons or the bitwise-AND operator (&) */ +#define _MONO 0x0001 /* Monochrome */ +#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */ +#define _ENHCOLOR 0x0004 /* Enhanced Color */ +#define _ANALOGMONO 0x0008 /* Analog Monochrome only */ +#define _ANALOGCOLOR 0x0010 /* Analog Color only */ +#define _ANALOG 0x0018 /* Analog Monochrome and Color modes */ + +struct _videoconfig __far * __far __cdecl _getvideoconfig(struct _videoconfig __far *); + + +/* COORDINATE SYSTEMS */ + +struct _xycoord __far __cdecl _setvieworg(short, short); +#define _setlogorg _setvieworg /* obsolescent */ + +struct _xycoord __far __cdecl _getviewcoord(short, short); +#define _getlogcoord _getviewcoord /* obsolescent */ + +struct _xycoord __far __cdecl _getphyscoord(short, short); + +void __far __cdecl _setcliprgn(short, short, short, short); +void __far __cdecl _setviewport(short, short, short, short); + + +/* OUTPUT ROUTINES */ + +/* control parameters for _ellipse, _rectangle, _pie and _polygon */ +#define _GBORDER 2 /* draw outline only */ +#define _GFILLINTERIOR 3 /* fill using current fill mask */ + +/* parameters for _clearscreen */ +#define _GCLEARSCREEN 0 +#define _GVIEWPORT 1 +#define _GWINDOW 2 + +void __far __cdecl _clearscreen(short); + +struct _xycoord __far __cdecl _moveto(short, short); +struct _xycoord __far __cdecl _getcurrentposition(void); + +short __far __cdecl _lineto(short, short); +short __far __cdecl _rectangle(short, short, short, short, short); +short __far __cdecl _polygon(short, const struct _xycoord __far *, short); +short __far __cdecl _arc(short, short, short, short, short, short, short, short); +short __far __cdecl _ellipse(short, short, short, short, short); +short __far __cdecl _pie(short, short, short, short, short, short, short, short, short); + +short __far __cdecl _getarcinfo(struct _xycoord __far *, struct _xycoord __far *, struct _xycoord __far *); + +short __far __cdecl _setpixel(short, short); +short __far __cdecl _getpixel(short, short); +short __far __cdecl _floodfill(short, short, short); + + +/* PEN COLOR, LINE STYLE, WRITE MODE, FILL PATTERN */ + +short __far __cdecl _setcolor(short); +short __far __cdecl _getcolor(void); + +void __far __cdecl _setlinestyle(unsigned short); +unsigned short __far __cdecl _getlinestyle(void); + +short __far __cdecl _setwritemode(short); +short __far __cdecl _getwritemode(void); + +void __far __cdecl _setfillmask(const unsigned char __far *); +unsigned char __far * __far __cdecl _getfillmask(unsigned char __far *); + + +/* COLOR SELECTION */ + +long __far __cdecl _setbkcolor(long); +long __far __cdecl _getbkcolor(void); + +long __far __cdecl _remappalette(short, long); +short __far __cdecl _remapallpalette(const long __far *); +short __far __cdecl _selectpalette(short); + + +/* TEXT */ +/* parameters for _displaycursor */ +#define _GCURSOROFF 0 +#define _GCURSORON 1 + +/* parameters for _wrapon */ +#define _GWRAPOFF 0 +#define _GWRAPON 1 + + +/* direction parameters for _scrolltextwindow */ +#define _GSCROLLUP 1 +#define _GSCROLLDOWN (-1) + +/* request maximum number of rows in _settextrows and _setvideomoderows */ +#define _MAXTEXTROWS (-1) + +short __far __cdecl _settextrows(short); /* returns # rows set; 0 if error */ +void __far __cdecl _settextwindow(short, short, short, short); +void __far __cdecl _gettextwindow(short __far *, short __far *, short __far *, short __far *); +void __far __cdecl _scrolltextwindow(short); +void __far __cdecl _outmem(const char __far *, short); +void __far __cdecl _outtext(const char __far *); +short __far __cdecl _inchar(void); +short __far __cdecl _wrapon(short); + +short __far __cdecl _displaycursor(short); +short __far __cdecl _settextcursor(short); +short __far __cdecl _gettextcursor(void); + +struct _rccoord __far __cdecl _settextposition(short, short); +struct _rccoord __far __cdecl _gettextposition(void); + +short __far __cdecl _settextcolor(short); +short __far __cdecl _gettextcolor(void); + + +/* SCREEN IMAGES */ + +void __far __cdecl _getimage(short, short, short, short, char __huge *); +void __far __cdecl _putimage(short, short, char __huge *, short); +long __far __cdecl _imagesize(short, short, short, short); + +/* "action verbs" for _putimage() and _setwritemode() */ +#define _GPSET 3 +#define _GPRESET 2 +#define _GAND 1 +#define _GOR 0 +#define _GXOR 4 + + +/* Color values are used with _setbkcolor in graphics modes and also by + _remappalette and _remapallpalette. Also known as palette colors. + Not to be confused with color indices (aka. color attributes). */ + +/* universal color values (all color modes): */ +#define _BLACK 0x000000L +#define _BLUE 0x2a0000L +#define _GREEN 0x002a00L +#define _CYAN 0x2a2a00L +#define _RED 0x00002aL +#define _MAGENTA 0x2a002aL +#define _BROWN 0x00152aL +#define _WHITE 0x2a2a2aL +#define _GRAY 0x151515L +#define _LIGHTBLUE 0x3F1515L +#define _LIGHTGREEN 0x153f15L +#define _LIGHTCYAN 0x3f3f15L +#define _LIGHTRED 0x15153fL +#define _LIGHTMAGENTA 0x3f153fL +#define _YELLOW 0x153f3fL +#define _BRIGHTWHITE 0x3f3f3fL + +/* the following is obsolescent and defined only for backward compatibility */ +#define _LIGHTYELLOW _YELLOW + +/* mono mode F (_ERESNOCOLOR) color values: */ +#define _MODEFOFF 0L +#define _MODEFOFFTOON 1L +#define _MODEFOFFTOHI 2L +#define _MODEFONTOOFF 3L +#define _MODEFON 4L +#define _MODEFONTOHI 5L +#define _MODEFHITOOFF 6L +#define _MODEFHITOON 7L +#define _MODEFHI 8L + +/* mono mode 7 (_TEXTMONO) color values: */ +#define _MODE7OFF 0L +#define _MODE7ON 1L +#define _MODE7HI 2L + + +/* Warning: these '_xy' entrypoints are undocumented. + They may or may not be supported in future versions. */ +struct _xycoord __far __cdecl _moveto_xy(struct _xycoord); +short __far __cdecl _lineto_xy(struct _xycoord); +short __far __cdecl _rectangle_xy(short,struct _xycoord,struct _xycoord); +short __far __cdecl _arc_xy(struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _ellipse_xy(short, struct _xycoord, struct _xycoord); +short __far __cdecl _pie_xy(short, struct _xycoord, struct _xycoord, struct _xycoord, struct _xycoord); +short __far __cdecl _getpixel_xy(struct _xycoord); +short __far __cdecl _setpixel_xy(struct _xycoord); +short __far __cdecl _floodfill_xy(struct _xycoord, short); +void __far __cdecl _getimage_xy(struct _xycoord,struct _xycoord, char __huge *); +long __far __cdecl _imagesize_xy(struct _xycoord,struct _xycoord); +void __far __cdecl _putimage_xy(struct _xycoord, char __huge *, short); + + +/* WINDOW COORDINATE SYSTEM */ + +#ifndef _WXYCOORD_DEFINED +/* structure for window coordinate pair */ +struct _wxycoord { + double wx; /* window x coordinate */ + double wy; /* window y coordinate */ + }; +#define _WXYCOORD_DEFINED +#endif + + +/* define real coordinate window - returns non-zero if successful */ +short __far __cdecl _setwindow(short,double,double,double,double); + +/* convert from view to window coordinates */ +struct _wxycoord __far __cdecl _getwindowcoord(short,short); +struct _wxycoord __far __cdecl _getwindowcoord_xy(struct _xycoord); + +/* convert from window to view coordinates */ +struct _xycoord __far __cdecl _getviewcoord_w(double,double); +struct _xycoord __far __cdecl _getviewcoord_wxy(const struct _wxycoord __far *); + +/* return the window coordinates of the current graphics output + position as an _wxycoord structure. no error return. */ +struct _wxycoord __far __cdecl _getcurrentposition_w(void); + + +/* window coordinate entry points for graphics output routines */ + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _arc_w(double, double, double, double, double, double, double, double); +short __far __cdecl _arc_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _ellipse_w(short, double, double, double, double); +short __far __cdecl _ellipse_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _floodfill_w(double, double, short); + +/* returns pixel value at given point; -1 if unsuccessful. */ +short __far __cdecl _getpixel_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _lineto_w(double, double); + +/* returns the view coordinates of the previous output + position as a _wxycoord structure. no error return */ +struct _wxycoord __far __cdecl _moveto_w(double, double); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _pie_w(short, double, double, double, double, double, double, double, double); +short __far __cdecl _pie_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _rectangle_w(short, double, double, double, double); +short __far __cdecl _rectangle_wxy(short, const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* returns nonzero if successful; otherwise 0 */ +short __far __cdecl _polygon_w(short, const double __far *, short); +short __far __cdecl _polygon_wxy(short, const struct _wxycoord __far *, short); + +/* returns previous color; -1 if unsuccessful */ +short __far __cdecl _setpixel_w(double, double); + + +/* window coordinate image routines */ + +/* no return value */ +void __far __cdecl _getimage_w(double, double, double, double, char __huge *); +void __far __cdecl _getimage_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *, char __huge *); + +/* returns the image's storage size in bytes */ +long __far __cdecl _imagesize_w(double, double, double, double); +long __far __cdecl _imagesize_wxy(const struct _wxycoord __far *, const struct _wxycoord __far *); + +/* no return value */ +void __far __cdecl _putimage_w(double, double ,char __huge * ,short); + + +/* FONTS */ + +#ifndef _FONTINFO_DEFINED +/* structure for _getfontinfo() */ +struct _fontinfo { + int type; /* b0 set = vector,clear = bit map */ + int ascent; /* pix dist from top to baseline */ + int pixwidth; /* character width in pixels, 0=prop */ + int pixheight; /* character height in pixels */ + int avgwidth; /* average character width in pixels */ + char filename[81]; /* file name including path */ + char facename[32]; /* font name */ +}; +#define _FONTINFO_DEFINED +#endif + + +/* font function prototypes */ +short __far __cdecl _registerfonts( const char __far *); +void __far __cdecl _unregisterfonts( void ); +short __far __cdecl _setfont( const char __far * ); +short __far __cdecl _getfontinfo( struct _fontinfo __far * ); +void __far __cdecl _outgtext( const char __far * ); +short __far __cdecl _getgtextextent( const char __far * ); +struct _xycoord __far __cdecl _setgtextvector( short, short ); +struct _xycoord __far __cdecl _getgtextvector(void); + + +#ifdef _WINDOWS +/* QuickWin graphics extension prototypes */ +int __far __cdecl _wgclose( int ); +int __far __cdecl _wggetactive( void ); +int __far __cdecl _wgopen( char __far * ); +int __far __cdecl _wgsetactive( int ); +#endif + + +/* restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/io.h b/private/oleauto/tools/win16/hdos/c800/include/io.h new file mode 100644 index 000000000..d37a8165a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/io.h @@ -0,0 +1,162 @@ +/*** +*io.h - declarations for low-level file handling and I/O functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the low-level +* file handling and I/O functions. +* +****/ + +#ifndef _INC_IO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _QWINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; + +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +int __cdecl _access(const char *, int); +int __cdecl _chmod(const char *, int); +int __cdecl _chsize(int, long); +int __cdecl _close(int); +int __cdecl _commit(int); +int __cdecl _creat(const char *, int); +int __cdecl _dup(int); +int __cdecl _dup2(int, int); +int __cdecl _eof(int); +long __cdecl _filelength(int); +int __cdecl _isatty(int); +int __cdecl _locking(int, int, long); +long __cdecl _lseek(int, long, int); +char * __cdecl _mktemp(char *); +int __cdecl _open(const char *, int, ...); +int __cdecl _read(int, void *, unsigned int); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +int __cdecl _setmode(int, int); +int __cdecl _sopen(const char *, int, int, ...); +long __cdecl _tell(int); +int __cdecl _umask(int); +int __cdecl _unlink(const char *); +int __cdecl _write(int, const void *, unsigned int); +#ifdef _WINDOWS +#ifndef _WINDLL +int __cdecl _wabout(char *); +int __cdecl _wclose(int, int); +int __cdecl _wgetexit(void); +int __cdecl _wgetfocus(void); +long __cdecl _wgetscreenbuf(int); +int __cdecl _wgetsize(int, int, struct _wsizeinfo *); +int __cdecl _wmenuclick(int); +int __cdecl _wopen(struct _wopeninfo *, struct _wsizeinfo *, int); +int __cdecl _wsetexit(int); +int __cdecl _wsetfocus(int); +int __cdecl _wsetscreenbuf(int, long); +int __cdecl _wsetsize(int, struct _wsizeinfo *); +void __cdecl _wyield(void); +#endif +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +int __cdecl access(const char *, int); +int __cdecl chmod(const char *, int); +int __cdecl chsize(int, long); +int __cdecl close(int); +int __cdecl creat(const char *, int); +int __cdecl dup(int); +int __cdecl dup2(int, int); +int __cdecl eof(int); +long __cdecl filelength(int); +int __cdecl isatty(int); +int __cdecl locking(int, int, long); +long __cdecl lseek(int, long, int); +char * __cdecl mktemp(char *); +int __cdecl open(const char *, int, ...); +int __cdecl read(int, void *, unsigned int); +int __cdecl setmode(int, int); +int __cdecl sopen(const char *, int, int, ...); +long __cdecl tell(int); +int __cdecl umask(int); +int __cdecl unlink(const char *); +int __cdecl write(int, const void *, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_IO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/iomanip.h b/private/oleauto/tools/win16/hdos/c800/include/iomanip.h new file mode 100644 index 000000000..8adc814ec --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/iomanip.h @@ -0,0 +1,128 @@ +/*** +*iomanip.h - definitions/declarations for iostream's parameterized manipulators +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes' paramterized manipulators. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOMANIP +#define _INC_IOMANIP +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +// CONSIDER: use macro to define these +// #define __MKMANIP(X) \#define X##(T) __##X##_ \#\# T +// __MKMANIP(SMANIP); +// __MKMANIP(SAPP); +// __MKMANIP(IMANIP); +// __MKMANIP(IAPP); +// __MKMANIP(OMANIP); +// __MKMANIP(OAPP); +// __MKMANIP(IOMANIP); +// __MKMANIP(IOAPP); + +#define SMANIP(T) __SMANIP_##T +#define SAPP(T) __SAPP_##T +#define IMANIP(T) __IMANIP_##T +#define IAPP(T) __IAPP_##T +#define OMANIP(T) __OMANIP_##T +#define OAPP(T) __OAPP_##T +#define IOMANIP(T) __IOMANIP_##T +#define IOAPP(T) __IOAPP_##T + +#define IOMANIPdeclare(T) \ +class SMANIP(T) { \ +public: \ + SMANIP(T)(ios& (*f)(ios&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ + friend ostream& operator<<(ostream& s, SMANIP(T) & sm) { (*(sm._fp))(s,sm._tp); return s; } \ +private: \ + ios& (* _fp)(ios&,T); \ + T _tp; \ +}; \ +class SAPP(T) { \ +public: \ + SAPP(T)( ios& (*f)(ios&,T)) { _fp = f; } \ + SMANIP(T) operator()(T t) { return SMANIP(T)(_fp,t); } \ +private: \ + ios& (* _fp)(ios&,T); \ +}; \ +class IMANIP(T) { \ +public: \ + IMANIP(T)(istream& (*f)(istream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(istream& s, IMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + istream& (* _fp)(istream&,T); \ + T _tp; \ +}; \ +class IAPP(T) { \ +public: \ + IAPP(T)( istream& (*f)(istream&,T)) { _fp = f; } \ + IMANIP(T) operator()(T t) { return IMANIP(T)(_fp,t); } \ +private: \ + istream& (* _fp)(istream&,T); \ +}; \ +class OMANIP(T) { \ +public: \ + OMANIP(T)(ostream& (*f)(ostream&,T), T t) { _fp = f; _tp = t; } \ + friend ostream& operator<<(ostream& s, OMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + ostream& (* _fp)(ostream&,T); \ + T _tp; \ +}; \ +class OAPP(T) { \ +public: \ + OAPP(T)(ostream& (*f)(ostream&,T)) { _fp = f; } \ + OMANIP(T) operator()(T t) { return OMANIP(T)(_fp,t); } \ +private: \ + ostream& (* _fp)(ostream&,T); \ +}; \ +\ +class IOMANIP(T) { \ +public: \ + IOMANIP(T)(iostream& (*f)(iostream&,T), T t) { _fp = f; _tp = t; } \ + friend istream& operator>>(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ + friend ostream& operator<<(iostream& s, IOMANIP(T) & sm) { (*sm._fp)(s,sm._tp); return s; } \ +private: \ + iostream& (* _fp)(iostream&,T); \ + T _tp; \ +}; \ +class IOAPP(T) { \ +public: \ + IOAPP(T)( iostream& (*f)(iostream&,T)) { _fp = f; } \ + IOMANIP(T) operator()(T t) { return IOMANIP(T)(_fp,t); } \ +private: \ + iostream& (* _fp)(iostream&,T); \ +}; \ + + +IOMANIPdeclare(int) + +IOMANIPdeclare(long) + +inline ios& __resetiosflags(ios& s, long _flg) { s.setf(0,_flg); return s; } +inline ios& __setfill(ios& s, int _fc) { s.fill((char)_fc); return s; } +inline ios& __setiosflags(ios& s, long _flg) { s.setf(_flg); return s; } +inline ios& __setprecision(ios& s, int _pre) { s.precision(_pre); return s; } +inline ios& __setw(ios& s, int _wid) { s.width(_wid); return s; } + +inline SMANIP(long) resetiosflags(long _l) { return SMANIP(long)(__resetiosflags, _l); } +inline SMANIP(int) setfill(int _m) {return SMANIP(int)(__setfill, _m); } +inline SMANIP(long) setiosflags(long _l) {return SMANIP(long)(__setiosflags, _l); } +inline SMANIP(int) setprecision(int _p) {return SMANIP(int)(__setprecision, _p); } +inline SMANIP(int) setw(int _w) { return SMANIP(int)(__setw, _w); } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ios.h b/private/oleauto/tools/win16/hdos/c800/include/ios.h new file mode 100644 index 000000000..74aa9d1ff --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ios.h @@ -0,0 +1,198 @@ +/*** +*ios.h - definitions/declarations for the ios class. +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ios class. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOS +#define _INC_IOS + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +class streambuf; +class ostream; + +class ios { + +public: + enum io_state { goodbit = 0x00, + eofbit = 0x01, + failbit = 0x02, + badbit = 0x04 }; + + enum open_mode { in = 0x01, + out = 0x02, + ate = 0x04, + app = 0x08, + trunc = 0x10, + nocreate = 0x20, + noreplace = 0x40, + binary = 0x80 }; // CONSIDER: not in latest spec. + + enum seek_dir { beg=0, cur=1, end=2 }; + + enum { skipws = 0x0001, + left = 0x0002, + right = 0x0004, + internal = 0x0008, + dec = 0x0010, + oct = 0x0020, + hex = 0x0040, + showbase = 0x0080, + showpoint = 0x0100, + uppercase = 0x0200, + showpos = 0x0400, + scientific = 0x0800, + fixed = 0x1000, + unitbuf = 0x2000, + stdio = 0x4000 + }; + + static const long basefield; // dec | oct | hex + static const long adjustfield; // left | right | internal + static const long floatfield; // scientific | fixed + + ios(streambuf*); // differs from ANSI + virtual ~ios(); + + inline long flags() const; + inline long flags(long _l); + + inline long setf(long _f,long _m); + inline long setf(long _l); + inline long unsetf(long _l); + + inline int width() const; + inline int width(int _i); + + inline ostream* tie(ostream* _os); + inline ostream* tie() const; + + inline char fill() const; + inline char fill(char _c); + + inline int precision(int _i); + inline int precision() const; + + inline int rdstate() const; + inline void clear(int _i = 0); + +// inline operator void*() const; + operator void *() const { if(state&(badbit|failbit) ) return 0; return (void *)this; } + inline int operator!() const; + + inline int good() const; + inline int eof() const; + inline int fail() const; + inline int bad() const; + + inline streambuf* rdbuf() const; + + inline long _HFAR_ & iword(int) const; + inline void _HFAR_ * _HFAR_ & pword(int) const; + + static long bitalloc(); + static int xalloc(); + static void sync_with_stdio(); + +protected: + ios(); + ios(const ios&); // treat as private + ios& operator=(const ios&); + void init(streambuf*); + + enum { skipping, tied }; + streambuf* bp; + + int state; + int ispecial; // not used + int ospecial; // not used + int isfx_special; // not used + int osfx_special; // not used + int x_delbuf; // if set, rdbuf() deleted by ~ios + + ostream* x_tie; + long x_flags; + int x_precision; + int x_width; + char x_fill; + + static void (*stdioflush)(); // not used +public: + int delbuf() const { return x_delbuf; } + void delbuf(int _i) { x_delbuf = _i; } + +private: + static long x_maxbit; + static long _HFAR_ * x_statebuf; // used by xalloc() + static int x_curindex; +// consider: make interal static to ios::sync_with_stdio() + static int sunk_with_stdio; // make sure sync_with done only once +}; + +inline ios& dec(ios& _strm) { _strm.setf(ios::dec,ios::basefield); return _strm; } +inline ios& hex(ios& _strm) { _strm.setf(ios::hex,ios::basefield); return _strm; } +inline ios& oct(ios& _strm) { _strm.setf(ios::oct,ios::basefield); return _strm; } + +inline long ios::flags() const { return x_flags; } +inline long ios::flags(long _l){ long _lO; _lO = x_flags; x_flags = _l; return _lO; } + +inline long ios::setf(long _l,long _m){ long _lO; _lO = x_flags; x_flags = (_l&_m) | (x_flags&(~_m)); return _lO; } +inline long ios::setf(long _l){ long _lO; _lO = x_flags; x_flags |= _l; return _lO; } +inline long ios::unsetf(long _l){ long _lO; _lO = x_flags; x_flags &= (~_l); return _lO; } + +inline int ios::width() const { return x_width; } +inline int ios::width(int _i){ int _iO; _iO = (int)x_width; x_width = _i; return _iO; } + +inline ostream* ios::tie(ostream* _os){ ostream* _osO; _osO = x_tie; x_tie = _os; return _osO; } +inline ostream* ios::tie() const { return x_tie; } +inline char ios::fill() const { return x_fill; } +inline char ios::fill(char _c){ char _cO; _cO = x_fill; x_fill = _c; return _cO; } +inline int ios::precision(int _i){ int _iO; _iO = (int)x_precision; x_precision = _i; return _iO; } +inline int ios::precision() const { return x_precision; } + +inline int ios::rdstate() const { return state; } + +// inline ios::operator void *() const { if(state&(badbit|failbit) ) return 0; return (void *)this; } +inline int ios::operator!() const { return state&(badbit|failbit); } + +inline int ios::bad() const { return state & badbit; } +inline void ios::clear(int _i){ state = _i; } +inline int ios::eof() const { return state & eofbit; } +inline int ios::fail() const { return state & (badbit | failbit); } +inline int ios::good() const { return state == 0; } + +inline streambuf* ios::rdbuf() const { return bp; } + +inline long _HFAR_ & ios::iword(int _i) const { return x_statebuf[_i] ; } +inline void _HFAR_ * _HFAR_ & ios::pword(int _i) const { return (void _HFAR_ * _HFAR_ &)x_statebuf[_i]; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/iostream.h b/private/oleauto/tools/win16/hdos/c800/include/iostream.h new file mode 100644 index 000000000..345c5ae16 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/iostream.h @@ -0,0 +1,65 @@ +/*** +*iostream.h - definitions/declarations for iostream classes +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the iostream classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_IOSTREAM +#define _INC_IOSTREAM + +typedef long streamoff, streampos; + +#include <ios.h> // Define ios. + +#include <streamb.h> // Define streambuf. + +#include <istream.h> // Define istream. + +#include <ostream.h> // Define ostream. + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +class iostream : public istream, public ostream { +public: + iostream(streambuf*); + virtual ~iostream(); +protected: +// consider: make private?? + iostream(); + iostream(const iostream&); +inline iostream& operator=(streambuf*); +inline iostream& operator=(iostream&); +private: + iostream(ios&); + iostream(istream&); + iostream(ostream&); +}; + +inline iostream& iostream::operator=(streambuf* _sb) { istream::operator=(_sb); ostream::operator=(_sb); return *this; } + +inline iostream& iostream::operator=(iostream& _strm) { return operator=(_strm.rdbuf()); } + +class Iostream_init { +public: + Iostream_init(); + Iostream_init(ios &, int =0); // treat as private + ~Iostream_init(); +}; + +// used internally +// static Iostream_init __iostreaminit; // initializes cin/cout/cerr/clog + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/istream.h b/private/oleauto/tools/win16/hdos/c800/include/istream.h new file mode 100644 index 000000000..b17e769ca --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/istream.h @@ -0,0 +1,149 @@ +/*** +*istream.h - definitions/declarations for the istream class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the istream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_ISTREAM +#define _INC_ISTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef long streamoff, streampos; + +class istream : virtual public ios { + +public: + istream(streambuf*); + virtual ~istream(); + + int ipfx(int =0); + void isfx() { } + + inline istream& operator>>(istream& (*_f)(istream&)); + inline istream& operator>>(ios& (*_f)(ios&)); + istream& operator>>(char _HFAR_ *); + inline istream& operator>>(unsigned char _HFAR_ *); + inline istream& operator>>(signed char _HFAR_ *); + istream& operator>>(char _HFAR_ &); + inline istream& operator>>(unsigned char _HFAR_ &); + inline istream& operator>>(signed char _HFAR_ &); + istream& operator>>(short _HFAR_ &); + istream& operator>>(unsigned short _HFAR_ &); + istream& operator>>(int _HFAR_ &); + istream& operator>>(unsigned int _HFAR_ &); + istream& operator>>(long _HFAR_ &); + istream& operator>>(unsigned long _HFAR_ &); + istream& operator>>(float _HFAR_ &); + istream& operator>>(double _HFAR_ &); + istream& operator>>(long double _HFAR_ &); + istream& operator>>(streambuf*); + + int get(); + istream& get(char _HFAR_ *,int,char ='\n'); + inline istream& get(unsigned char _HFAR_ *,int,char ='\n'); + inline istream& get(signed char _HFAR_ *,int,char ='\n'); + istream& get(char _HFAR_ &); + inline istream& get(unsigned char _HFAR_ &); + inline istream& get(signed char _HFAR_ &); + istream& get(streambuf&,char ='\n'); + inline istream& getline(char _HFAR_ *,int,char ='\n'); + inline istream& getline(unsigned char _HFAR_ *,int,char ='\n'); + inline istream& getline(signed char _HFAR_ *,int,char ='\n'); + + inline istream& ignore(int =1,int =EOF); + istream& read(char _HFAR_ *,int); + inline istream& read(unsigned char _HFAR_ *,int); + inline istream& read(signed char _HFAR_ *,int); + + int gcount() const { return x_gcount; } + int peek(); + istream& putback(char); + int sync(); + + istream& seekg(streampos); + istream& seekg(streamoff,ios::seek_dir); + streampos tellg(); + + void eatwhite(); // consider: protect and friend with manipulator ws +protected: + istream(); + istream(const istream&); // treat as private + istream& operator=(streambuf* _isb); // treat as private + istream& operator=(const istream& _is) { return operator=(_is.rdbuf()); } + int do_ipfx(int); + +private: + istream(ios&); + int getint(char _HFAR_ *); + int getdouble(char _HFAR_ *, int); + int _fGline; + int x_gcount; +}; + + inline istream& istream::operator>>(istream& (*_f)(istream&)) { (*_f)(*this); return *this; } + inline istream& istream::operator>>(ios& (*_f)(ios&)) { (*_f)(*this); return *this; } + + inline istream& istream::operator>>(unsigned char _HFAR_ * _s) { return operator>>((char _HFAR_ *)_s); } + inline istream& istream::operator>>(signed char _HFAR_ * _s) { return operator>>((char _HFAR_ *)_s); } + + inline istream& istream::operator>>(unsigned char _HFAR_ & _c) { return operator>>((char _HFAR_ &) _c); } + inline istream& istream::operator>>(signed char _HFAR_ & _c) { return operator>>((char _HFAR_ &) _c); } + + inline istream& istream::get(unsigned char _HFAR_ * b, int lim ,char delim) { return get((char _HFAR_ *)b, lim, delim); } + inline istream& istream::get(signed char _HFAR_ * b, int lim, char delim) { return get((char _HFAR_ *)b, lim, delim); } + + inline istream& istream::get(unsigned char _HFAR_ & _c) { return get((char _HFAR_ &)_c); } + inline istream& istream::get(signed char _HFAR_ & _c) { return get((char _HFAR_ &)_c); } + + inline istream& istream::getline(char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get(_b, _lim, _delim); } + inline istream& istream::getline(unsigned char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get((char _HFAR_ *)_b, _lim, _delim); } + inline istream& istream::getline(signed char _HFAR_ * _b,int _lim,char _delim) { _fGline++; return get((char _HFAR_ *)_b, _lim, _delim); } + + inline istream& istream::ignore(int _n,int delim) { _fGline++; return get((char _HFAR_ *)0, _n+1, (char)delim); } + + inline istream& istream::read(unsigned char _HFAR_ * _ptr, int _n) { return read((char _HFAR_ *) _ptr, _n); } + inline istream& istream::read(signed char _HFAR_ * _ptr, int _n) { return read((char _HFAR_ *) _ptr, _n); } + +class istream_withassign : public istream { + public: + istream_withassign(); + istream_withassign(streambuf*); + ~istream_withassign(); + istream& operator=(const istream& _is) { return istream::operator=(_is); } + istream& operator=(streambuf* _isb) { return istream::operator=(_isb); } +}; + +#ifndef _WINDLL +extern istream_withassign cin; +#endif + +inline istream& ws(istream& _ins) { _ins.eatwhite(); return _ins; } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/limits.h b/private/oleauto/tools/win16/hdos/c800/include/limits.h new file mode 100644 index 000000000..0a1869e13 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/limits.h @@ -0,0 +1,44 @@ +/*** +*limits.h - implementation dependent values +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains defines for a number of implementation dependent values +* which are commonly used in C programs. +* [ANSI] +* +****/ + +#ifndef _INC_LIMITS + +#define CHAR_BIT 8 /* number of bits in a char */ +#define SCHAR_MIN (-127) /* minimum signed char value */ +#define SCHAR_MAX 127 /* maximum signed char value */ +#define UCHAR_MAX 0xff /* maximum unsigned char value */ +#ifndef _CHAR_UNSIGNED +#define CHAR_MIN SCHAR_MIN /* mimimum char value */ +#define CHAR_MAX SCHAR_MAX /* maximum char value */ +#else +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#ifndef __cplusplus +unsigned int _charmax; /* unsigned CHAR_MAX value */ +#else +extern "C" unsigned int _charmax; /* unsigned CHAR_MAX value */ +static unsigned int *_char_max = &_charmax; +#endif +#endif +#define MB_LEN_MAX 2 /* max. # bytes in multibyte char */ +#define SHRT_MIN (-32767) /* minimum (signed) short value */ +#define SHRT_MAX 32767 /* maximum (signed) short value */ +#define USHRT_MAX 0xffff /* maximum unsigned short value */ +#define INT_MIN (-32767) /* minimum (signed) int value */ +#define INT_MAX 32767 /* maximum (signed) int value */ +#define UINT_MAX 0xffff /* maximum unsigned int value */ +#define LONG_MIN (-2147483647) /* minimum (signed) long value */ +#define LONG_MAX 2147483647 /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffff /* maximum unsigned long value */ + +#define _INC_LIMITS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/locale.h b/private/oleauto/tools/win16/hdos/c800/include/locale.h new file mode 100644 index 000000000..e81a92dd4 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/locale.h @@ -0,0 +1,84 @@ +/*** +*locale.h - definitions/declarations for localization routines +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the localization routines. +* [ANSI] +* +****/ + +#ifndef _INC_LOCALE + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Locale categories */ + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 + +#define LC_MIN LC_ALL +#define LC_MAX LC_TIME + + +/* Locale convention structure */ + +#ifndef _LCONV_DEFINED +struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + }; +#define _LCONV_DEFINED +#endif + +/* function prototypes */ + +char * __cdecl setlocale(int, const char *); +struct lconv * __cdecl localeconv(void); + +#ifdef __cplusplus +} +#endif + +#define _INC_LOCALE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/lzdos.h b/private/oleauto/tools/win16/hdos/c800/include/lzdos.h new file mode 100644 index 000000000..79b44677d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/lzdos.h @@ -0,0 +1,5 @@ +/* OBSOLETE: Replaced by #define LIB/#include <lzexpand.h> */ +#ifndef LIB +#define LIB +#endif +#include <lzexpand.h> diff --git a/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h b/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h new file mode 100644 index 000000000..29264d387 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/lzexpand.h @@ -0,0 +1,95 @@ +/*****************************************************************************\ +* * +* lzexpand.h Public interfaces for LZEXPAND.DLL. * +* * +* Version 3.10 * +* * +* NOTE: windows.h must be included first if LIB is NOT #defined * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +******************************************************************************* +* +* #define LIB - To be used with LZEXP?.LIB (default is for LZEXPAND.DLL) +* NOTE: Not compatible with windows.h if LIB is #defined +* +\*****************************************************************************/ + +#ifndef _INC_LZEXPAND +#define _INC_LZEXPAND + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * If .lib version is being used, declare types used in this file. + */ +#ifdef LIB + +#define LZAPI _pascal + +#ifndef WINAPI /* don't declare if they're already declared */ +#define WINAPI _far _pascal +#define NEAR _near +#define FAR _far +#define PASCAL _pascal +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef signed long LONG; +typedef unsigned long DWORD; +typedef char far* LPSTR; +typedef const char far* LPCSTR; +typedef int HFILE; +#define OFSTRUCT void /* Not used by the .lib version */ +#endif /* WINAPI */ + +#else /* LIB */ + +#define LZAPI _far _pascal + +/* If .dll version is being used and we're being included with + * the 3.0 windows.h, #define compatible type aliases. + * If included with the 3.0 windows.h, #define compatible aliases + */ +#ifndef _INC_WINDOWS +#define UINT WORD +#define LPCSTR LPSTR +#define HFILE int +#endif /* !_INC_WINDOWS */ + +#endif /* !LIB */ + +/****** Error return codes ***************************************************/ + +#define LZERROR_BADINHANDLE (-1) /* invalid input handle */ +#define LZERROR_BADOUTHANDLE (-2) /* invalid output handle */ +#define LZERROR_READ (-3) /* corrupt compressed file format */ +#define LZERROR_WRITE (-4) /* out of space for output file */ +#define LZERROR_GLOBALLOC (-5) /* insufficient memory for LZFile struct */ +#define LZERROR_GLOBLOCK (-6) /* bad global handle */ +#define LZERROR_BADVALUE (-7) /* input parameter out of range */ +#define LZERROR_UNKNOWNALG (-8) /* compression algorithm not recognized */ + +/****** Public functions *****************************************************/ + +int LZAPI LZStart(void); +void LZAPI LZDone(void); +LONG LZAPI CopyLZFile(HFILE, HFILE); +LONG LZAPI LZCopy(HFILE, HFILE); +HFILE LZAPI LZInit(HFILE); +int LZAPI GetExpandedName(LPCSTR, LPSTR); +HFILE LZAPI LZOpenFile(LPCSTR, OFSTRUCT FAR*, UINT); +LONG LZAPI LZSeek(HFILE, LONG, int); +int LZAPI LZRead(HFILE, void FAR*, int); +void LZAPI LZClose(HFILE); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _INC_LZEXPAND */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/malloc.h b/private/oleauto/tools/win16/hdos/c800/include/malloc.h new file mode 100644 index 000000000..8e28bb5e0 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/malloc.h @@ -0,0 +1,155 @@ +/*** +*malloc.h - declarations and definitions for memory allocation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for memory allocation functions; +* also defines manifest constants and types used by the heap routines. +* [System V] +* +****/ + +#ifndef _INC_MALLOC + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __based _based +#define __cdecl _cdecl +#define __far _far +#define __huge _huge +#define __near _near +#define __segment _segment +#endif + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* constants for _heapchk/_heapset/_heapwalk routines */ + +#define _HEAPEMPTY (-1) +#define _HEAPOK (-2) +#define _HEAPBADBEGIN (-3) +#define _HEAPBADNODE (-4) +#define _HEAPEND (-5) +#define _HEAPBADPTR (-6) +#define _FREEENTRY 0 +#define _USEDENTRY 1 + +/* maximum heap request that can ever be honored */ + +#ifdef _WINDOWS +#define _HEAP_MAXREQ 0xFFE6 +#else +#define _HEAP_MAXREQ 0xFFE8 +#endif + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _HEAPINFO_DEFINED +typedef struct _heapinfo { + int __far * _pentry; + size_t _size; + int _useflag; + } _HEAPINFO; +#define _HEAPINFO_DEFINED +#endif + + +/* external variable declarations */ + +extern unsigned int __near __cdecl _amblksiz; + + +/* based heap function prototypes */ + +void __based(void) * __cdecl _bcalloc(__segment, size_t, size_t); +void __based(void) * __cdecl _bexpand(__segment, + void __based(void) *, size_t); +void __cdecl _bfree(__segment, void __based(void) *); +int __cdecl _bfreeseg(__segment); +int __cdecl _bheapadd(__segment, void __based(void) *, size_t); +int __cdecl _bheapchk(__segment); +int __cdecl _bheapmin(__segment); +__segment __cdecl _bheapseg(size_t); +int __cdecl _bheapset(__segment, unsigned int); +int __cdecl _bheapwalk(__segment, _HEAPINFO *); +void __based(void) * __cdecl _bmalloc(__segment, size_t); +size_t __cdecl _bmsize(__segment, void __based(void) *); +void __based(void) * __cdecl _brealloc(__segment, + void __based(void) *, size_t); + + +/* function prototypes */ + +void * __cdecl _alloca(size_t); +void * __cdecl calloc(size_t, size_t); +void * __cdecl _expand(void *, size_t); +void __far * __cdecl _fcalloc(size_t, size_t); +void __far * __cdecl _fexpand(void __far *, size_t); +void __cdecl _ffree(void __far *); +int __cdecl _fheapchk(void); +int __cdecl _fheapmin(void); +int __cdecl _fheapset(unsigned int); +int __cdecl _fheapwalk(_HEAPINFO *); +void __far * __cdecl _fmalloc(size_t); +size_t __cdecl _fmsize(void __far *); +void __far * __cdecl _frealloc(void __far *, size_t); +unsigned int __cdecl _freect(size_t); +void __cdecl free(void *); +void __huge * __cdecl _halloc(long, size_t); +void __cdecl _hfree(void __huge *); +#ifndef _WINDOWS +int __cdecl _heapadd(void __far *, size_t); +int __cdecl _heapchk(void); +#endif +int __cdecl _heapmin(void); +#ifndef _WINDOWS +int __cdecl _heapset(unsigned int); +int __cdecl _heapwalk(_HEAPINFO *); +#endif +void * __cdecl malloc(size_t); +size_t __cdecl _memavl(void); +size_t __cdecl _memmax(void); +size_t __cdecl _msize(void *); +void __near * __cdecl _ncalloc(size_t, size_t); +void __near * __cdecl _nexpand(void __near *, size_t); +void __cdecl _nfree(void __near *); +#ifndef _WINDOWS +int __cdecl _nheapchk(void); +#endif +int __cdecl _nheapmin(void); +#ifndef _WINDOWS +int __cdecl _nheapset(unsigned int); +int __cdecl _nheapwalk(_HEAPINFO *); +#endif +void __near * __cdecl _nmalloc(size_t); +size_t __cdecl _nmsize(void __near *); +void __near * __cdecl _nrealloc(void __near *, size_t); +void * __cdecl realloc(void *, size_t); +size_t __cdecl _stackavail(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl alloca(size_t); +void __huge * __cdecl halloc(long, size_t); +void __cdecl hfree(void __huge *); +size_t __cdecl stackavail(void); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_MALLOC +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/math.h b/private/oleauto/tools/win16/hdos/c800/include/math.h new file mode 100644 index 000000000..39a4af3d5 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/math.h @@ -0,0 +1,303 @@ +/*** +*math.h - definitions and declarations for math library +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains constant definitions and external subroutine +* declarations for the math subroutine library. +* [ANSI/System V] +* +****/ + +#ifndef _INC_MATH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* definition of _exception struct - this struct is passed to the _matherr + * routine when a floating point exception is detected + */ + +#ifndef _EXCEPTION_DEFINED +#pragma pack(2) + +struct _exception { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + double arg1; /* first argument to function */ + double arg2; /* second argument (if any) to function */ + double retval; /* value to be returned by function */ + } ; + +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +#define exception _exception +#endif + +#pragma pack() +#define _EXCEPTION_DEFINED +#endif + + +/* definition of a _complex struct to be used by those who use cabs and + * want type checking on their argument + */ + +#ifndef _COMPLEX_DEFINED + +struct _complex { + double x,y; /* real and imaginary parts */ + } ; + +#ifndef __cplusplus +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +struct complex { + double x,y; /* real and imaginary parts */ + } ; +#endif +#endif + +#define _COMPLEX_DEFINED +#endif + + +/* Constant definitions for the exception type passed in the _exception struct + */ + +#define _DOMAIN 1 /* argument domain error */ +#define _SING 2 /* argument singularity */ +#define _OVERFLOW 3 /* overflow range error */ +#define _UNDERFLOW 4 /* underflow range error */ +#define _TLOSS 5 /* total loss of precision */ +#define _PLOSS 6 /* partial loss of precision */ + +#define EDOM 33 +#define ERANGE 34 + + +/* definitions of _HUGE (XENIX) and HUGE_VAL (ANSI) error return values used + * by several floating point math routines + */ + +extern double __near __cdecl _HUGE; +#define HUGE_VAL _HUGE + + +/* function prototypes */ + +#ifdef _MT +int __cdecl abs(int); +double __pascal acos(double); +double __pascal asin(double); +double __pascal atan(double); +double __pascal atan2(double, double); +double __pascal atof(const char *); +double __pascal _cabs(struct _complex); +double __pascal ceil(double); +double __pascal cos(double); +double __pascal cosh(double); +int __cdecl _dieeetomsbin(double *, double *); +int __cdecl _dmsbintoieee(double *, double *); +double __pascal exp(double); +double __pascal fabs(double); +int __cdecl _fieeetomsbin(float *, float *); +double __pascal floor(double); +double __pascal fmod(double, double); +int __cdecl _fmsbintoieee(float *, float *); +double __pascal frexp(double, int *); +double __pascal _hypot(double, double); +double __pascal _j0(double); +double __pascal _j1(double); +double __pascal _jn(int, double); +long __cdecl labs(long); +double __pascal ldexp(double, int); +double __pascal log(double); +double __pascal log10(double); +int __cdecl _matherr(struct _exception *); +double __pascal modf(double, double *); +double __pascal pow(double, double); +double __pascal sin(double); +double __pascal sinh(double); +double __pascal sqrt(double); +double __pascal tan(double); +double __pascal tanh(double); +double __pascal _y0(double); +double __pascal _y1(double); +double __pascal _yn(int, double); + +#else +int __cdecl abs(int); +double __cdecl acos(double); +double __cdecl asin(double); +double __cdecl atan(double); +double __cdecl atan2(double, double); +double __cdecl atof(const char *); +double __cdecl _cabs(struct _complex); +double __cdecl ceil(double); +double __cdecl cos(double); +double __cdecl cosh(double); +int __cdecl _dieeetomsbin(double *, double *); +int __cdecl _dmsbintoieee(double *, double *); +double __cdecl exp(double); +double __cdecl fabs(double); +int __cdecl _fieeetomsbin(float *, float *); +double __cdecl floor(double); +double __cdecl fmod(double, double); +int __cdecl _fmsbintoieee(float *, float *); +double __cdecl frexp(double, int *); +double __cdecl _hypot(double, double); +double __cdecl _j0(double); +double __cdecl _j1(double); +double __cdecl _jn(int, double); +long __cdecl labs(long); +double __cdecl ldexp(double, int); +double __cdecl log(double); +double __cdecl log10(double); +int __cdecl _matherr(struct _exception *); +double __cdecl modf(double, double *); +double __cdecl pow(double, double); +double __cdecl sin(double); +double __cdecl sinh(double); +double __cdecl sqrt(double); +double __cdecl tan(double); +double __cdecl tanh(double); +double __cdecl _y0(double); +double __cdecl _y1(double); +double __cdecl _yn(int, double); +#endif + + +/* definition of _exceptionl struct - this struct is passed to the _matherrl + * routine when a floating point exception is detected in a long double routine + */ + +#ifndef _LD_EXCEPTION_DEFINED +#pragma pack(2) +struct _exceptionl { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + long double arg1; /* first argument to function */ + long double arg2; /* second argument (if any) to function */ + long double retval; /* value to be returned by function */ + } ; +#pragma pack() +#define _LD_EXCEPTION_DEFINED +#endif + + +/* definition of a _complexl struct to be used by those who use _cabsl and + * want type checking on their argument + */ + +#ifndef _LD_COMPLEX_DEFINED +#pragma pack(2) +struct _complexl { + long double x,y; /* real and imaginary parts */ + } ; +#pragma pack() +#define _LD_COMPLEX_DEFINED +#endif + +extern long double __near __cdecl _LHUGE; +#define _LHUGE_VAL _LHUGE + + +long double __cdecl acosl(long double); +long double __cdecl asinl(long double); +long double __cdecl atanl(long double); +long double __cdecl atan2l(long double, long double); +long double __cdecl _atold(const char *); +long double __cdecl _cabsl(struct _complexl); +long double __cdecl ceill(long double); +long double __cdecl cosl(long double); +long double __cdecl coshl(long double); +long double __cdecl expl(long double); +long double __cdecl fabsl(long double); +long double __cdecl floorl(long double); +long double __cdecl fmodl(long double, long double); +long double __cdecl frexpl(long double, int *); +long double __cdecl _hypotl(long double, long double); +long double __cdecl _j0l(long double); +long double __cdecl _j1l(long double); +long double __cdecl _jnl(int, long double); +long double __cdecl ldexpl(long double, int); +long double __cdecl logl(long double); +long double __cdecl log10l(long double); +int __cdecl _matherrl(struct _exceptionl *); +long double __cdecl modfl(long double, long double *); +long double __cdecl powl(long double, long double); +long double __cdecl sinl(long double); +long double __cdecl sinhl(long double); +long double __cdecl sqrtl(long double); +long double __cdecl tanl(long double); +long double __cdecl tanhl(long double); +long double __cdecl _y0l(long double); +long double __cdecl _y1l(long double); +long double __cdecl _ynl(int, long double); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define DOMAIN _DOMAIN +#define SING _SING +#define OVERFLOW _OVERFLOW +#define UNDERFLOW _UNDERFLOW +#define TLOSS _TLOSS +#define PLOSS _PLOSS + +#define matherr _matherr + +extern double __near __cdecl HUGE; + +#ifdef _MT +#ifndef __cplusplus +double __pascal cabs(struct complex); +#endif +double __pascal hypot(double, double); +double __pascal j0(double); +double __pascal j1(double); +double __pascal jn(int, double); +double __pascal y0(double); +double __pascal y1(double); +double __pascal yn(int, double); +#else +#ifndef __cplusplus +double __cdecl cabs(struct complex); +#endif +double __cdecl hypot(double, double); +double __cdecl j0(double); +double __cdecl j1(double); +double __cdecl jn(int, double); +double __cdecl y0(double); +double __cdecl y1(double); +double __cdecl yn(int, double); +#endif + +int __cdecl dieeetomsbin(double *, double *); +int __cdecl dmsbintoieee(double *, double *); +int __cdecl fieeetomsbin(float *, float *); +int __cdecl fmsbintoieee(float *, float *); + +long double __cdecl cabsl(struct _complexl); +long double __cdecl hypotl(long double, long double); + +#endif + + +#ifdef __cplusplus +} +#endif + +#define _INC_MATH +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/memory.h b/private/oleauto/tools/win16/hdos/c800/include/memory.h new file mode 100644 index 000000000..5ce2f440f --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/memory.h @@ -0,0 +1,75 @@ +/*** +*memory.h - declarations for buffer (memory) manipulation routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the +* buffer (memory) manipulation routines. +* [System V] +* +****/ + +#ifndef _INC_MEMORY + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +void * __cdecl memcpy(void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_MEMORY +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h new file mode 100644 index 000000000..e3bfa4234 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.h @@ -0,0 +1,1917 @@ +/****************************************************************************/ +/* */ +/* MMSYSTEM.H - Include file for Multimedia APIs */ +/* */ +/* Note: You must include WINDOWS.H before including this file. */ +/* */ +/* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. */ +/* */ +/****************************************************************************/ + + + +/* If defined, the following flags inhibit inclusion + * of the indicated items: + * + * MMNODRV - Installable driver support + * MMNOSOUND - Sound support + * MMNOWAVE - Waveform support + * MMNOMIDI - MIDI support + * MMNOAUX - Auxiliary audio support + * MMNOTIMER - Timer support + * MMNOJOY - Joystick support + * MMNOMCI - MCI support + * MMNOMMIO - Multimedia file I/O support + * MMNOMMSYSTEM - General MMSYSTEM functions + */ + +#ifndef _INC_MMSYSTEM +#define _INC_MMSYSTEM /* #defined if mmsystem.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + + +/**************************************************************************** + + General constants and data types + +****************************************************************************/ + +/* general constants */ +#define MAXPNAMELEN 32 /* max product name length (including NULL) */ +#define MAXERRORLENGTH 128 /* max error text length (including NULL) */ + +/* general data types */ +typedef WORD VERSION; /* major (high byte), minor (low byte) */ + +/* MMTIME data structure */ +typedef struct mmtime_tag { + UINT wType; /* indicates the contents of the union */ + union { + DWORD ms; /* milliseconds */ + DWORD sample; /* samples */ + DWORD cb; /* byte count */ + struct { /* SMPTE */ + BYTE hour; /* hours */ + BYTE min; /* minutes */ + BYTE sec; /* seconds */ + BYTE frame; /* frames */ + BYTE fps; /* frames per second */ + BYTE dummy; /* pad */ + } smpte; + struct { /* MIDI */ + DWORD songptrpos; /* song pointer position */ + } midi; + } u; + } MMTIME; +typedef MMTIME *PMMTIME; +typedef MMTIME NEAR *NPMMTIME; +typedef MMTIME FAR *LPMMTIME; + +/* types for wType field in MMTIME struct */ +#define TIME_MS 0x0001 /* time in milliseconds */ +#define TIME_SAMPLES 0x0002 /* number of wave samples */ +#define TIME_BYTES 0x0004 /* current byte offset */ +#define TIME_SMPTE 0x0008 /* SMPTE time */ +#define TIME_MIDI 0x0010 /* MIDI time */ + + +/**************************************************************************** + + Multimedia Extensions Window Messages + +****************************************************************************/ + +#define MM_JOY1MOVE 0x3A0 /* joystick */ +#define MM_JOY2MOVE 0x3A1 +#define MM_JOY1ZMOVE 0x3A2 +#define MM_JOY2ZMOVE 0x3A3 +#define MM_JOY1BUTTONDOWN 0x3B5 +#define MM_JOY2BUTTONDOWN 0x3B6 +#define MM_JOY1BUTTONUP 0x3B7 +#define MM_JOY2BUTTONUP 0x3B8 + +#define MM_MCINOTIFY 0x3B9 /* MCI */ + +#define MM_WOM_OPEN 0x3BB /* waveform output */ +#define MM_WOM_CLOSE 0x3BC +#define MM_WOM_DONE 0x3BD + +#define MM_WIM_OPEN 0x3BE /* waveform input */ +#define MM_WIM_CLOSE 0x3BF +#define MM_WIM_DATA 0x3C0 + +#define MM_MIM_OPEN 0x3C1 /* MIDI input */ +#define MM_MIM_CLOSE 0x3C2 +#define MM_MIM_DATA 0x3C3 +#define MM_MIM_LONGDATA 0x3C4 +#define MM_MIM_ERROR 0x3C5 +#define MM_MIM_LONGERROR 0x3C6 + +#define MM_MOM_OPEN 0x3C7 /* MIDI output */ +#define MM_MOM_CLOSE 0x3C8 +#define MM_MOM_DONE 0x3C9 + + +/**************************************************************************** + + String resource number bases (internal use) + +****************************************************************************/ + +#define MMSYSERR_BASE 0 +#define WAVERR_BASE 32 +#define MIDIERR_BASE 64 +#define TIMERR_BASE 96 +#define JOYERR_BASE 160 +#define MCIERR_BASE 256 + +#define MCI_STRING_OFFSET 512 +#define MCI_VD_OFFSET 1024 +#define MCI_CD_OFFSET 1088 +#define MCI_WAVE_OFFSET 1152 +#define MCI_SEQ_OFFSET 1216 + +/**************************************************************************** + + General error return values + +****************************************************************************/ + +/* general error return values */ +#define MMSYSERR_NOERROR 0 /* no error */ +#define MMSYSERR_ERROR (MMSYSERR_BASE + 1) /* unspecified error */ +#define MMSYSERR_BADDEVICEID (MMSYSERR_BASE + 2) /* device ID out of range */ +#define MMSYSERR_NOTENABLED (MMSYSERR_BASE + 3) /* driver failed enable */ +#define MMSYSERR_ALLOCATED (MMSYSERR_BASE + 4) /* device already allocated */ +#define MMSYSERR_INVALHANDLE (MMSYSERR_BASE + 5) /* device handle is invalid */ +#define MMSYSERR_NODRIVER (MMSYSERR_BASE + 6) /* no device driver present */ +#define MMSYSERR_NOMEM (MMSYSERR_BASE + 7) /* memory allocation error */ +#define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8) /* function isn't supported */ +#define MMSYSERR_BADERRNUM (MMSYSERR_BASE + 9) /* error value out of range */ +#define MMSYSERR_INVALFLAG (MMSYSERR_BASE + 10) /* invalid flag passed */ +#define MMSYSERR_INVALPARAM (MMSYSERR_BASE + 11) /* invalid parameter passed */ +#define MMSYSERR_LASTERROR (MMSYSERR_BASE + 11) /* last error in range */ + + +#if (WINVER < 0x030a) +DECLARE_HANDLE(HDRVR); +#endif /* ifdef WINVER < 0x030a */ + +#ifndef MMNODRV +/**************************************************************************** + + Installable driver support + +****************************************************************************/ + +#if (WINVER < 0x030a) + +/* return values from DriverProc() function */ +#define DRV_CANCEL 0x0000 +#define DRV_OK 0x0001 +#define DRV_RESTART 0x0002 + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO { + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO *PDRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR *NPDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR *LPDRVCONFIGINFO; + +/* installable driver function prototypes */ +LRESULT WINAPI DrvClose(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); +HDRVR WINAPI DrvOpen(LPCSTR szDriverName, LPCSTR szSectionName, + LPARAM lParam2); +LRESULT WINAPI DrvSendMessage(HDRVR hDriver, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +HINSTANCE WINAPI DrvGetModuleHandle(HDRVR hDriver); + +LRESULT WINAPI DrvDefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, + UINT uMessage, LPARAM lParam1, LPARAM lParam2); + +#define DefDriverProc DrvDefDriverProc + +#endif /* ifdef WINVER < 0x030a */ + +#if (WINVER >= 0x030a) + + +/* return values from DriverProc() function */ +#define DRV_CANCEL DRVCNF_CANCEL +#define DRV_OK DRVCNF_OK +#define DRV_RESTART DRVCNF_RESTART + +#endif /* ifdef WINVER >= 0x030a */ + +#define DRV_MCI_FIRST DRV_RESERVED +#define DRV_MCI_LAST (DRV_RESERVED + 0xFFF) + +#endif /* ifndef MMNODRV */ + + +/**************************************************************************** + + Driver callback support + +****************************************************************************/ + +/* flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and */ +/* midiOutOpen() to specify the type of the dwCallback parameter. */ + +#define CALLBACK_TYPEMASK 0x00070000l /* callback type mask */ +#define CALLBACK_NULL 0x00000000l /* no callback */ +#define CALLBACK_WINDOW 0x00010000l /* dwCallback is a HWND */ +#define CALLBACK_TASK 0x00020000l /* dwCallback is a HTASK */ +#define CALLBACK_FUNCTION 0x00030000l /* dwCallback is a FARPROC */ + +/* driver callback prototypes */ +typedef void (CALLBACK DRVCALLBACK) (HDRVR h, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef DRVCALLBACK FAR *LPDRVCALLBACK; + +/**************************************************************************** + + Manufacturer and product IDs + + Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS, + MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures. + +****************************************************************************/ + +/* manufacturer IDs */ +#define MM_MICROSOFT 1 /* Microsoft Corp. */ + +/* product IDs */ +#define MM_MIDI_MAPPER 1 /* MIDI Mapper */ +#define MM_WAVE_MAPPER 2 /* Wave Mapper */ + +#define MM_SNDBLST_MIDIOUT 3 /* Sound Blaster MIDI output port */ +#define MM_SNDBLST_MIDIIN 4 /* Sound Blaster MIDI input port */ +#define MM_SNDBLST_SYNTH 5 /* Sound Blaster internal synthesizer */ +#define MM_SNDBLST_WAVEOUT 6 /* Sound Blaster waveform output */ +#define MM_SNDBLST_WAVEIN 7 /* Sound Blaster waveform input */ + +#define MM_ADLIB 9 /* Ad Lib-compatible synthesizer */ + +#define MM_MPU401_MIDIOUT 10 /* MPU401-compatible MIDI output port */ +#define MM_MPU401_MIDIIN 11 /* MPU401-compatible MIDI input port */ + +#define MM_PC_JOYSTICK 12 /* Joystick adapter */ + + +#ifndef MMNOMMSYSTEM +/**************************************************************************** + + General MMSYSTEM support + +****************************************************************************/ + +WORD WINAPI mmsystemGetVersion(void); +void WINAPI OutputDebugStr(LPCSTR); + +#endif /* ifndef MMNOMMSYSTEM */ + + +#ifndef MMNOSOUND +/**************************************************************************** + + Sound support + +****************************************************************************/ + +BOOL WINAPI sndPlaySound(LPCSTR lpszSoundName, UINT uFlags); + +/* flag values for wFlags parameter */ +#define SND_SYNC 0x0000 /* play synchronously (default) */ +#define SND_ASYNC 0x0001 /* play asynchronously */ +#define SND_NODEFAULT 0x0002 /* don't use default sound */ +#define SND_MEMORY 0x0004 /* lpszSoundName points to a memory file */ +#define SND_LOOP 0x0008 /* loop the sound until next sndPlaySound */ +#define SND_NOSTOP 0x0010 /* don't stop any currently playing sound */ + +#endif /* ifndef MMNOSOUND */ + + +#ifndef MMNOWAVE +/**************************************************************************** + + Waveform audio support + +****************************************************************************/ + +/* waveform audio error return values */ +#define WAVERR_BADFORMAT (WAVERR_BASE + 0) /* unsupported wave format */ +#define WAVERR_STILLPLAYING (WAVERR_BASE + 1) /* still something playing */ +#define WAVERR_UNPREPARED (WAVERR_BASE + 2) /* header not prepared */ +#define WAVERR_SYNC (WAVERR_BASE + 3) /* device is synchronous */ +#define WAVERR_LASTERROR (WAVERR_BASE + 3) /* last error in range */ + +/* waveform audio data types */ +DECLARE_HANDLE(HWAVE); +DECLARE_HANDLE(HWAVEIN); +DECLARE_HANDLE(HWAVEOUT); +typedef HWAVEIN FAR *LPHWAVEIN; +typedef HWAVEOUT FAR *LPHWAVEOUT; +typedef DRVCALLBACK WAVECALLBACK; +typedef WAVECALLBACK FAR *LPWAVECALLBACK; + +/* wave callback messages */ +#define WOM_OPEN MM_WOM_OPEN +#define WOM_CLOSE MM_WOM_CLOSE +#define WOM_DONE MM_WOM_DONE +#define WIM_OPEN MM_WIM_OPEN +#define WIM_CLOSE MM_WIM_CLOSE +#define WIM_DATA MM_WIM_DATA + +/* device ID for wave device mapper */ +#define WAVE_MAPPER (-1) + +/* flags for dwFlags parameter in waveOutOpen() and waveInOpen() */ +#define WAVE_FORMAT_QUERY 0x0001 +#define WAVE_ALLOWSYNC 0x0002 + +/* wave data block header */ +typedef struct wavehdr_tag { + LPSTR lpData; /* pointer to locked data buffer */ + DWORD dwBufferLength; /* length of data buffer */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + DWORD dwLoops; /* loop control counter */ + struct wavehdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} WAVEHDR; +typedef WAVEHDR *PWAVEHDR; +typedef WAVEHDR NEAR *NPWAVEHDR; +typedef WAVEHDR FAR *LPWAVEHDR; + +/* flags for dwFlags field of WAVEHDR */ +#define WHDR_DONE 0x00000001 /* done bit */ +#define WHDR_PREPARED 0x00000002 /* set if this header has been prepared */ +#define WHDR_BEGINLOOP 0x00000004 /* loop start block */ +#define WHDR_ENDLOOP 0x00000008 /* loop end block */ +#define WHDR_INQUEUE 0x00000010 /* reserved for driver */ + +/* waveform output device capabilities structure */ +typedef struct waveoutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of sources supported */ + DWORD dwSupport; /* functionality supported by driver */ +} WAVEOUTCAPS; +typedef WAVEOUTCAPS *PWAVEOUTCAPS; +typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS; +typedef WAVEOUTCAPS FAR *LPWAVEOUTCAPS; + +/* flags for dwSupport field of WAVEOUTCAPS */ +#define WAVECAPS_PITCH 0x0001 /* supports pitch control */ +#define WAVECAPS_PLAYBACKRATE 0x0002 /* supports playback rate control */ +#define WAVECAPS_VOLUME 0x0004 /* supports volume control */ +#define WAVECAPS_LRVOLUME 0x0008 /* separate left-right volume control */ +#define WAVECAPS_SYNC 0x0010 + +/* waveform input device capabilities structure */ +typedef struct waveincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + DWORD dwFormats; /* formats supported */ + UINT wChannels; /* number of channels supported */ +} WAVEINCAPS; +typedef WAVEINCAPS *PWAVEINCAPS; +typedef WAVEINCAPS NEAR *NPWAVEINCAPS; +typedef WAVEINCAPS FAR *LPWAVEINCAPS; + +/* defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS */ +#define WAVE_INVALIDFORMAT 0x00000000 /* invalid format */ +#define WAVE_FORMAT_1M08 0x00000001 /* 11.025 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_1S08 0x00000002 /* 11.025 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_1M16 0x00000004 /* 11.025 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_1S16 0x00000008 /* 11.025 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_2M08 0x00000010 /* 22.05 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_2S08 0x00000020 /* 22.05 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_2M16 0x00000040 /* 22.05 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_2S16 0x00000080 /* 22.05 kHz, Stereo, 16-bit */ +#define WAVE_FORMAT_4M08 0x00000100 /* 44.1 kHz, Mono, 8-bit */ +#define WAVE_FORMAT_4S08 0x00000200 /* 44.1 kHz, Stereo, 8-bit */ +#define WAVE_FORMAT_4M16 0x00000400 /* 44.1 kHz, Mono, 16-bit */ +#define WAVE_FORMAT_4S16 0x00000800 /* 44.1 kHz, Stereo, 16-bit */ + +/* general waveform format structure (information common to all formats) */ +typedef struct waveformat_tag { + WORD wFormatTag; /* format type */ + WORD nChannels; /* number of channels (i.e. mono, stereo, etc.) */ + DWORD nSamplesPerSec; /* sample rate */ + DWORD nAvgBytesPerSec; /* for buffer estimation */ + WORD nBlockAlign; /* block size of data */ +} WAVEFORMAT; +typedef WAVEFORMAT *PWAVEFORMAT; +typedef WAVEFORMAT NEAR *NPWAVEFORMAT; +typedef WAVEFORMAT FAR *LPWAVEFORMAT; + +/* flags for wFormatTag field of WAVEFORMAT */ +#define WAVE_FORMAT_PCM 1 + +/* specific waveform format structure for PCM data */ +typedef struct pcmwaveformat_tag { + WAVEFORMAT wf; + WORD wBitsPerSample; +} PCMWAVEFORMAT; +typedef PCMWAVEFORMAT *PPCMWAVEFORMAT; +typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT; +typedef PCMWAVEFORMAT FAR *LPPCMWAVEFORMAT; + +/* waveform audio function prototypes */ +UINT WINAPI waveOutGetNumDevs(void); +UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveOutClose(HWAVEOUT hWaveOut); +UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut, + WAVEHDR FAR* lpWaveOutHdr, UINT uSize); +UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr, + UINT uSize); +UINT WINAPI waveOutPause(HWAVEOUT hWaveOut); +UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut); +UINT WINAPI waveOutReset(HWAVEOUT hWaveOut); +UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut); +UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch); +UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch); +UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate); +UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate); +UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI waveInGetNumDevs(void); +UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps, + UINT uSize); +UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID, + const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI waveInClose(HWAVEIN hWaveIn); +UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn, + WAVEHDR FAR* lpWaveInHdr, UINT uSize); +UINT WINAPI waveInStart(HWAVEIN hWaveIn); +UINT WINAPI waveInStop(HWAVEIN hWaveIn); +UINT WINAPI waveInReset(HWAVEIN hWaveIn); +UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo, + UINT uSize); +UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOWAVE */ + + +#ifndef MMNOMIDI +/**************************************************************************** + + MIDI audio support + +****************************************************************************/ + +/* MIDI error return values */ +#define MIDIERR_UNPREPARED (MIDIERR_BASE + 0) /* header not prepared */ +#define MIDIERR_STILLPLAYING (MIDIERR_BASE + 1) /* still something playing */ +#define MIDIERR_NOMAP (MIDIERR_BASE + 2) /* no current map */ +#define MIDIERR_NOTREADY (MIDIERR_BASE + 3) /* hardware is still busy */ +#define MIDIERR_NODEVICE (MIDIERR_BASE + 4) /* port no longer connected */ +#define MIDIERR_INVALIDSETUP (MIDIERR_BASE + 5) /* invalid setup */ +#define MIDIERR_LASTERROR (MIDIERR_BASE + 5) /* last error in range */ + +/* MIDI audio data types */ +DECLARE_HANDLE(HMIDI); +DECLARE_HANDLE(HMIDIIN); +DECLARE_HANDLE(HMIDIOUT); +typedef HMIDIIN FAR *LPHMIDIIN; +typedef HMIDIOUT FAR *LPHMIDIOUT; +typedef DRVCALLBACK MIDICALLBACK; +typedef MIDICALLBACK FAR *LPMIDICALLBACK; +#define MIDIPATCHSIZE 128 +typedef WORD PATCHARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPPATCHARRAY; +typedef WORD KEYARRAY[MIDIPATCHSIZE]; +typedef WORD FAR *LPKEYARRAY; + +/* MIDI callback messages */ +#define MIM_OPEN MM_MIM_OPEN +#define MIM_CLOSE MM_MIM_CLOSE +#define MIM_DATA MM_MIM_DATA +#define MIM_LONGDATA MM_MIM_LONGDATA +#define MIM_ERROR MM_MIM_ERROR +#define MIM_LONGERROR MM_MIM_LONGERROR +#define MOM_OPEN MM_MOM_OPEN +#define MOM_CLOSE MM_MOM_CLOSE +#define MOM_DONE MM_MOM_DONE + +/* device ID for MIDI mapper */ +#define MIDIMAPPER (-1) +#define MIDI_MAPPER (-1) + +/* flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */ +#define MIDI_CACHE_ALL 1 +#define MIDI_CACHE_BESTFIT 2 +#define MIDI_CACHE_QUERY 3 +#define MIDI_UNCACHE 4 + +/* MIDI output device capabilities structure */ +typedef struct midioutcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + UINT wVoices; /* # of voices (internal synth only) */ + UINT wNotes; /* max # of notes (internal synth only) */ + UINT wChannelMask; /* channels used (internal synth only) */ + DWORD dwSupport; /* functionality supported by driver */ +} MIDIOUTCAPS; +typedef MIDIOUTCAPS *PMIDIOUTCAPS; +typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS; +typedef MIDIOUTCAPS FAR *LPMIDIOUTCAPS; + +/* flags for wTechnology field of MIDIOUTCAPS structure */ +#define MOD_MIDIPORT 1 /* output port */ +#define MOD_SYNTH 2 /* generic internal synth */ +#define MOD_SQSYNTH 3 /* square wave internal synth */ +#define MOD_FMSYNTH 4 /* FM internal synth */ +#define MOD_MAPPER 5 /* MIDI mapper */ + +/* flags for dwSupport field of MIDIOUTCAPS structure */ +#define MIDICAPS_VOLUME 0x0001 /* supports volume control */ +#define MIDICAPS_LRVOLUME 0x0002 /* separate left-right volume control */ +#define MIDICAPS_CACHE 0x0004 + +/* MIDI output device capabilities structure */ +typedef struct midiincaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ +} MIDIINCAPS; +typedef MIDIINCAPS *PMIDIINCAPS; +typedef MIDIINCAPS NEAR *NPMIDIINCAPS; +typedef MIDIINCAPS FAR *LPMIDIINCAPS; + +/* MIDI data block header */ +typedef struct midihdr_tag { + LPSTR lpData; /* pointer to locked data block */ + DWORD dwBufferLength; /* length of data in data block */ + DWORD dwBytesRecorded; /* used for input only */ + DWORD dwUser; /* for client's use */ + DWORD dwFlags; /* assorted flags (see defines) */ + struct midihdr_tag far *lpNext; /* reserved for driver */ + DWORD reserved; /* reserved for driver */ +} MIDIHDR; +typedef MIDIHDR *PMIDIHDR; +typedef MIDIHDR NEAR *NPMIDIHDR; +typedef MIDIHDR FAR *LPMIDIHDR; + +/* flags for dwFlags field of MIDIHDR structure */ +#define MHDR_DONE 0x00000001 /* done bit */ +#define MHDR_PREPARED 0x00000002 /* set if header prepared */ +#define MHDR_INQUEUE 0x00000004 /* reserved for driver */ + +/* MIDI function prototypes */ +UINT WINAPI midiOutGetNumDevs(void); +UINT WINAPI midiOutGetDevCaps(UINT uDeviceID, + MIDIOUTCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); +UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiOutClose(HMIDIOUT hMidiOut); +UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg); +UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut, + MIDIHDR FAR* lpMidiOutHdr, UINT uSize); +UINT WINAPI midiOutReset(HMIDIOUT hMidiOut); +UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut, + UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags); +UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut, + UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags); +UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI midiInGetNumDevs(void); +UINT WINAPI midiInGetDevCaps(UINT uDeviceID, + LPMIDIINCAPS lpCaps, UINT uSize); +UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize); +UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID, + DWORD dwCallback, DWORD dwInstance, DWORD dwFlags); +UINT WINAPI midiInClose(HMIDIIN hMidiIn); +UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn, + MIDIHDR FAR* lpMidiInHdr, UINT uSize); +UINT WINAPI midiInStart(HMIDIIN hMidiIn); +UINT WINAPI midiInStop(HMIDIIN hMidiIn); +UINT WINAPI midiInReset(HMIDIIN hMidiIn); +UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID); + +#if (WINVER >= 0x030a) +DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOMIDI */ + + +#ifndef MMNOAUX +/**************************************************************************** + + Auxiliary audio support + +****************************************************************************/ + +/* device ID for aux device mapper */ +#define AUX_MAPPER (-1) + +/* Auxiliary audio device capabilities structure */ +typedef struct auxcaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + VERSION vDriverVersion; /* version of the driver */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wTechnology; /* type of device */ + DWORD dwSupport; /* functionality supported by driver */ +} AUXCAPS; +typedef AUXCAPS *PAUXCAPS; +typedef AUXCAPS NEAR *NPAUXCAPS; +typedef AUXCAPS FAR *LPAUXCAPS; + +/* flags for wTechnology field in AUXCAPS structure */ +#define AUXCAPS_CDAUDIO 1 /* audio from internal CD-ROM drive */ +#define AUXCAPS_AUXIN 2 /* audio from auxiliary input jacks */ + +/* flags for dwSupport field in AUXCAPS structure */ +#define AUXCAPS_VOLUME 0x0001 /* supports volume control */ +#define AUXCAPS_LRVOLUME 0x0002 /* separate left-right volume control */ + +/* auxiliary audio function prototypes */ +UINT WINAPI auxGetNumDevs(void); +UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume); +UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume); + +#if (WINVER >= 0x030a) +DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2); +#endif /* ifdef WINVER >= 0x030a */ + +#endif /* ifndef MMNOAUX */ + + +#ifndef MMNOTIMER +/**************************************************************************** + + Timer support + +****************************************************************************/ + +/* timer error return values */ +#define TIMERR_NOERROR (0) /* no error */ +#define TIMERR_NOCANDO (TIMERR_BASE+1) /* request not completed */ +#define TIMERR_STRUCT (TIMERR_BASE+33) /* time struct size */ + +/* timer data types */ +typedef void (CALLBACK TIMECALLBACK) (UINT uTimerID, UINT uMessage, DWORD dwUser, DWORD dw1, DWORD dw2); + +typedef TIMECALLBACK FAR *LPTIMECALLBACK; + +/* flags for wFlags parameter of timeSetEvent() function */ +#define TIME_ONESHOT 0 /* program timer for single event */ +#define TIME_PERIODIC 1 /* program for continuous periodic event */ + +/* timer device capabilities data structure */ +typedef struct timecaps_tag { + UINT wPeriodMin; /* minimum period supported */ + UINT wPeriodMax; /* maximum period supported */ + } TIMECAPS; +typedef TIMECAPS *PTIMECAPS; +typedef TIMECAPS NEAR *NPTIMECAPS; +typedef TIMECAPS FAR *LPTIMECAPS; + +/* timer function prototypes */ +UINT WINAPI timeGetSystemTime(MMTIME FAR* lpTime, UINT uSize); +DWORD WINAPI timeGetTime(void); +UINT WINAPI timeSetEvent(UINT uDelay, UINT uResolution, + LPTIMECALLBACK lpFunction, DWORD dwUser, UINT uFlags); +UINT WINAPI timeKillEvent(UINT uTimerID); +UINT WINAPI timeGetDevCaps(TIMECAPS FAR* lpTimeCaps, UINT uSize); +UINT WINAPI timeBeginPeriod(UINT uPeriod); +UINT WINAPI timeEndPeriod(UINT uPeriod); + +#endif /* ifndef MMNOTIMER */ + + +#ifndef MMNOJOY +/**************************************************************************** + + Joystick support + +****************************************************************************/ + +/* joystick error return values */ +#define JOYERR_NOERROR (0) /* no error */ +#define JOYERR_PARMS (JOYERR_BASE+5) /* bad parameters */ +#define JOYERR_NOCANDO (JOYERR_BASE+6) /* request not completed */ +#define JOYERR_UNPLUGGED (JOYERR_BASE+7) /* joystick is unplugged */ + +/* constants used with JOYINFO structure and MM_JOY* messages */ +#define JOY_BUTTON1 0x0001 +#define JOY_BUTTON2 0x0002 +#define JOY_BUTTON3 0x0004 +#define JOY_BUTTON4 0x0008 +#define JOY_BUTTON1CHG 0x0100 +#define JOY_BUTTON2CHG 0x0200 +#define JOY_BUTTON3CHG 0x0400 +#define JOY_BUTTON4CHG 0x0800 + +/* joystick ID constants */ +#define JOYSTICKID1 0 +#define JOYSTICKID2 1 + +/* joystick device capabilities data structure */ +typedef struct joycaps_tag { + UINT wMid; /* manufacturer ID */ + UINT wPid; /* product ID */ + char szPname[MAXPNAMELEN]; /* product name (NULL terminated string) */ + UINT wXmin; /* minimum x position value */ + UINT wXmax; /* maximum x position value */ + UINT wYmin; /* minimum y position value */ + UINT wYmax; /* maximum y position value */ + UINT wZmin; /* minimum z position value */ + UINT wZmax; /* maximum z position value */ + UINT wNumButtons; /* number of buttons */ + UINT wPeriodMin; /* minimum message period when captured */ + UINT wPeriodMax; /* maximum message period when captured */ + } JOYCAPS; +typedef JOYCAPS *PJOYCAPS; +typedef JOYCAPS NEAR *NPJOYCAPS; +typedef JOYCAPS FAR *LPJOYCAPS; + +/* joystick information data structure */ +typedef struct joyinfo_tag { + UINT wXpos; /* x position */ + UINT wYpos; /* y position */ + UINT wZpos; /* z position */ + UINT wButtons; /* button states */ + } JOYINFO; +typedef JOYINFO *PJOYINFO; +typedef JOYINFO NEAR *NPJOYINFO; +typedef JOYINFO FAR *LPJOYINFO; + +/* joystick function prototypes */ +UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize); +UINT WINAPI joyGetNumDevs(void); +UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo); +UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold); +UINT WINAPI joyReleaseCapture(UINT uJoyID); +UINT WINAPI joySetCapture(HWND hwnd, UINT uJoyID, UINT uPeriod, + BOOL bChanged); +UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold); + +#endif /* ifndef MMNOJOY */ + + +#ifndef MMNOMMIO +/**************************************************************************** + + Multimedia File I/O support + +****************************************************************************/ + +/* MMIO error return values */ +#define MMIOERR_BASE 256 +#define MMIOERR_FILENOTFOUND (MMIOERR_BASE + 1) /* file not found */ +#define MMIOERR_OUTOFMEMORY (MMIOERR_BASE + 2) /* out of memory */ +#define MMIOERR_CANNOTOPEN (MMIOERR_BASE + 3) /* cannot open */ +#define MMIOERR_CANNOTCLOSE (MMIOERR_BASE + 4) /* cannot close */ +#define MMIOERR_CANNOTREAD (MMIOERR_BASE + 5) /* cannot read */ +#define MMIOERR_CANNOTWRITE (MMIOERR_BASE + 6) /* cannot write */ +#define MMIOERR_CANNOTSEEK (MMIOERR_BASE + 7) /* cannot seek */ +#define MMIOERR_CANNOTEXPAND (MMIOERR_BASE + 8) /* cannot expand file */ +#define MMIOERR_CHUNKNOTFOUND (MMIOERR_BASE + 9) /* chunk not found */ +#define MMIOERR_UNBUFFERED (MMIOERR_BASE + 10) /* file is unbuffered */ + +/* MMIO constants */ +#define CFSEPCHAR '+' /* compound file name separator char. */ + +/* MMIO data types */ +typedef DWORD FOURCC; /* a four character code */ +typedef char _huge * HPSTR; /* a huge version of LPSTR */ +DECLARE_HANDLE(HMMIO); /* a handle to an open file */ +typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +typedef MMIOPROC FAR *LPMMIOPROC; + +/* general MMIO information data structure */ +typedef struct _MMIOINFO +{ + /* general fields */ + DWORD dwFlags; /* general status flags */ + FOURCC fccIOProc; /* pointer to I/O procedure */ + LPMMIOPROC pIOProc; /* pointer to I/O procedure */ + UINT wErrorRet; /* place for error to be returned */ + HTASK htask; /* alternate local task */ + + /* fields maintained by MMIO functions during buffered I/O */ + LONG cchBuffer; /* size of I/O buffer (or 0L) */ + HPSTR pchBuffer; /* start of I/O buffer (or NULL) */ + HPSTR pchNext; /* pointer to next byte to read/write */ + HPSTR pchEndRead; /* pointer to last valid byte to read */ + HPSTR pchEndWrite; /* pointer to last byte to write */ + LONG lBufOffset; /* disk offset of start of buffer */ + + /* fields maintained by I/O procedure */ + LONG lDiskOffset; /* disk offset of next read or write */ + DWORD adwInfo[3]; /* data specific to type of MMIOPROC */ + + /* other fields maintained by MMIO */ + DWORD dwReserved1; /* reserved for MMIO use */ + DWORD dwReserved2; /* reserved for MMIO use */ + HMMIO hmmio; /* handle to open file */ +} MMIOINFO; +typedef MMIOINFO *PMMIOINFO; +typedef MMIOINFO NEAR *NPMMIOINFO; +typedef MMIOINFO FAR *LPMMIOINFO; + +/* RIFF chunk information data structure */ +typedef struct _MMCKINFO +{ + FOURCC ckid; /* chunk ID */ + DWORD cksize; /* chunk size */ + FOURCC fccType; /* form type or list type */ + DWORD dwDataOffset; /* offset of data portion of chunk */ + DWORD dwFlags; /* flags used by MMIO functions */ +} MMCKINFO; +typedef MMCKINFO *PMMCKINFO; +typedef MMCKINFO NEAR *NPMMCKINFO; +typedef MMCKINFO FAR *LPMMCKINFO; + +/* bit field masks */ +#define MMIO_RWMODE 0x00000003 /* open file for reading/writing/both */ +#define MMIO_SHAREMODE 0x00000070 /* file sharing mode number */ + +/* constants for dwFlags field of MMIOINFO */ +#define MMIO_CREATE 0x00001000 /* create new file (or truncate file) */ +#define MMIO_PARSE 0x00000100 /* parse new file returning path */ +#define MMIO_DELETE 0x00000200 /* create new file (or truncate file) */ +#define MMIO_EXIST 0x00004000 /* checks for existence of file */ +#define MMIO_ALLOCBUF 0x00010000 /* mmioOpen() should allocate a buffer */ +#define MMIO_GETTEMP 0x00020000 /* mmioOpen() should retrieve temp name */ + +#define MMIO_DIRTY 0x10000000 /* I/O buffer is dirty */ + + +/* read/write mode numbers (bit field MMIO_RWMODE) */ +#define MMIO_READ 0x00000000 /* open file for reading only */ +#define MMIO_WRITE 0x00000001 /* open file for writing only */ +#define MMIO_READWRITE 0x00000002 /* open file for reading and writing */ + +/* share mode numbers (bit field MMIO_SHAREMODE) */ +#define MMIO_COMPAT 0x00000000 /* compatibility mode */ +#define MMIO_EXCLUSIVE 0x00000010 /* exclusive-access mode */ +#define MMIO_DENYWRITE 0x00000020 /* deny writing to other processes */ +#define MMIO_DENYREAD 0x00000030 /* deny reading to other processes */ +#define MMIO_DENYNONE 0x00000040 /* deny nothing to other processes */ + +/* various MMIO flags */ +#define MMIO_FHOPEN 0x0010 /* mmioClose: keep file handle open */ +#define MMIO_EMPTYBUF 0x0010 /* mmioFlush: empty the I/O buffer */ +#define MMIO_TOUPPER 0x0010 /* mmioStringToFOURCC: to u-case */ +#define MMIO_INSTALLPROC 0x00010000 /* mmioInstallIOProc: install MMIOProc */ +#define MMIO_GLOBALPROC 0x10000000 /* mmioInstallIOProc: install globally */ +#define MMIO_REMOVEPROC 0x00020000 /* mmioInstallIOProc: remove MMIOProc */ +#define MMIO_FINDPROC 0x00040000 /* mmioInstallIOProc: find an MMIOProc */ +#define MMIO_FINDCHUNK 0x0010 /* mmioDescend: find a chunk by ID */ +#define MMIO_FINDRIFF 0x0020 /* mmioDescend: find a LIST chunk */ +#define MMIO_FINDLIST 0x0040 /* mmioDescend: find a RIFF chunk */ +#define MMIO_CREATERIFF 0x0020 /* mmioCreateChunk: make a LIST chunk */ +#define MMIO_CREATELIST 0x0040 /* mmioCreateChunk: make a RIFF chunk */ + + +/* message numbers for MMIOPROC I/O procedure functions */ +#define MMIOM_READ MMIO_READ /* read */ +#define MMIOM_WRITE MMIO_WRITE /* write */ +#define MMIOM_SEEK 2 /* seek to a new position in file */ +#define MMIOM_OPEN 3 /* open file */ +#define MMIOM_CLOSE 4 /* close file */ +#define MMIOM_WRITEFLUSH 5 /* write and flush */ + +#if (WINVER >= 0x030a) +#define MMIOM_RENAME 6 /* rename specified file */ +#endif /* ifdef WINVER >= 0x030a */ + +#define MMIOM_USER 0x8000 /* beginning of user-defined messages */ + +/* standard four character codes */ +#define FOURCC_RIFF mmioFOURCC('R', 'I', 'F', 'F') +#define FOURCC_LIST mmioFOURCC('L', 'I', 'S', 'T') + +/* four character codes used to identify standard built-in I/O procedures */ +#define FOURCC_DOS mmioFOURCC('D', 'O', 'S', ' ') +#define FOURCC_MEM mmioFOURCC('M', 'E', 'M', ' ') + +/* flags for mmioSeek() */ +#ifndef SEEK_SET +#define SEEK_SET 0 /* seek to an absolute position */ +#define SEEK_CUR 1 /* seek relative to current position */ +#define SEEK_END 2 /* seek relative to end of file */ +#endif /* ifndef SEEK_SET */ + +/* other constants */ +#define MMIO_DEFAULTBUFFER 8192 /* default buffer size */ + +/* MMIO macros */ +#define mmioFOURCC( ch0, ch1, ch2, ch3 ) \ + ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) | \ + ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) ) + +/* MMIO function prototypes */ +FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags); +LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc, + DWORD dwFlags); +HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo, + DWORD dwOpenFlags); + +#if (WINVER >= 0x030a) +UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName, + MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags); +#endif /* ifdef WINVER >= 0x030a */ + +UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags); +LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch); +LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch); +LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin); +UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags); +UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer, + UINT uFlags); +UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags); +UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags); +LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage, + LPARAM lParam1, LPARAM lParam2); +UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck, + const MMCKINFO FAR* lpckParent, UINT uFlags); +UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); +UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags); + +#endif /* ifndef MMNOMMIO */ + + +#ifndef MMNOMCI +/**************************************************************************** + + MCI support + +****************************************************************************/ + +typedef UINT (CALLBACK *YIELDPROC) (UINT uDeviceID, DWORD dwYieldData); + +/* MCI function prototypes */ +DWORD WINAPI mciSendCommand (UINT uDeviceID, UINT uMessage, + DWORD dwParam1, DWORD dwParam2); +DWORD WINAPI mciSendString (LPCSTR lpstrCommand, + LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback); +UINT WINAPI mciGetDeviceID (LPCSTR lpstrName); +UINT WINAPI mciGetDeviceIDFromElementID (DWORD dwElementID, + LPCSTR lpstrType); +BOOL WINAPI mciGetErrorString (DWORD wError, LPSTR lpstrBuffer, + UINT uLength); +BOOL WINAPI mciSetYieldProc (UINT uDeviceID, YIELDPROC fpYieldProc, + DWORD dwYieldData); + +#if (WINVER >= 0x030a) +HTASK WINAPI mciGetCreatorTask(UINT uDeviceID); +YIELDPROC WINAPI mciGetYieldProc (UINT uDeviceID, DWORD FAR* lpdwYieldData); +#endif /* ifdef WINVER >= 0x030a */ + +#if (WINVER < 0x030a) +BOOL WINAPI mciExecute (LPCSTR lpstrCommand); +#endif /* ifdef WINVER < 0x030a */ + +/* MCI error return values */ +#define MCIERR_INVALID_DEVICE_ID (MCIERR_BASE + 1) +#define MCIERR_UNRECOGNIZED_KEYWORD (MCIERR_BASE + 3) +#define MCIERR_UNRECOGNIZED_COMMAND (MCIERR_BASE + 5) +#define MCIERR_HARDWARE (MCIERR_BASE + 6) +#define MCIERR_INVALID_DEVICE_NAME (MCIERR_BASE + 7) +#define MCIERR_OUT_OF_MEMORY (MCIERR_BASE + 8) +#define MCIERR_DEVICE_OPEN (MCIERR_BASE + 9) +#define MCIERR_CANNOT_LOAD_DRIVER (MCIERR_BASE + 10) +#define MCIERR_MISSING_COMMAND_STRING (MCIERR_BASE + 11) +#define MCIERR_PARAM_OVERFLOW (MCIERR_BASE + 12) +#define MCIERR_MISSING_STRING_ARGUMENT (MCIERR_BASE + 13) +#define MCIERR_BAD_INTEGER (MCIERR_BASE + 14) +#define MCIERR_PARSER_INTERNAL (MCIERR_BASE + 15) +#define MCIERR_DRIVER_INTERNAL (MCIERR_BASE + 16) +#define MCIERR_MISSING_PARAMETER (MCIERR_BASE + 17) +#define MCIERR_UNSUPPORTED_FUNCTION (MCIERR_BASE + 18) +#define MCIERR_FILE_NOT_FOUND (MCIERR_BASE + 19) +#define MCIERR_DEVICE_NOT_READY (MCIERR_BASE + 20) +#define MCIERR_INTERNAL (MCIERR_BASE + 21) +#define MCIERR_DRIVER (MCIERR_BASE + 22) +#define MCIERR_CANNOT_USE_ALL (MCIERR_BASE + 23) +#define MCIERR_MULTIPLE (MCIERR_BASE + 24) +#define MCIERR_EXTENSION_NOT_FOUND (MCIERR_BASE + 25) +#define MCIERR_OUTOFRANGE (MCIERR_BASE + 26) +#define MCIERR_FLAGS_NOT_COMPATIBLE (MCIERR_BASE + 28) +#define MCIERR_FILE_NOT_SAVED (MCIERR_BASE + 30) +#define MCIERR_DEVICE_TYPE_REQUIRED (MCIERR_BASE + 31) +#define MCIERR_DEVICE_LOCKED (MCIERR_BASE + 32) +#define MCIERR_DUPLICATE_ALIAS (MCIERR_BASE + 33) +#define MCIERR_BAD_CONSTANT (MCIERR_BASE + 34) +#define MCIERR_MUST_USE_SHAREABLE (MCIERR_BASE + 35) +#define MCIERR_MISSING_DEVICE_NAME (MCIERR_BASE + 36) +#define MCIERR_BAD_TIME_FORMAT (MCIERR_BASE + 37) +#define MCIERR_NO_CLOSING_QUOTE (MCIERR_BASE + 38) +#define MCIERR_DUPLICATE_FLAGS (MCIERR_BASE + 39) +#define MCIERR_INVALID_FILE (MCIERR_BASE + 40) +#define MCIERR_NULL_PARAMETER_BLOCK (MCIERR_BASE + 41) +#define MCIERR_UNNAMED_RESOURCE (MCIERR_BASE + 42) +#define MCIERR_NEW_REQUIRES_ALIAS (MCIERR_BASE + 43) +#define MCIERR_NOTIFY_ON_AUTO_OPEN (MCIERR_BASE + 44) +#define MCIERR_NO_ELEMENT_ALLOWED (MCIERR_BASE + 45) +#define MCIERR_NONAPPLICABLE_FUNCTION (MCIERR_BASE + 46) +#define MCIERR_ILLEGAL_FOR_AUTO_OPEN (MCIERR_BASE + 47) +#define MCIERR_FILENAME_REQUIRED (MCIERR_BASE + 48) +#define MCIERR_EXTRA_CHARACTERS (MCIERR_BASE + 49) +#define MCIERR_DEVICE_NOT_INSTALLED (MCIERR_BASE + 50) +#define MCIERR_GET_CD (MCIERR_BASE + 51) +#define MCIERR_SET_CD (MCIERR_BASE + 52) +#define MCIERR_SET_DRIVE (MCIERR_BASE + 53) +#define MCIERR_DEVICE_LENGTH (MCIERR_BASE + 54) +#define MCIERR_DEVICE_ORD_LENGTH (MCIERR_BASE + 55) +#define MCIERR_NO_INTEGER (MCIERR_BASE + 56) + +#define MCIERR_WAVE_OUTPUTSINUSE (MCIERR_BASE + 64) +#define MCIERR_WAVE_SETOUTPUTINUSE (MCIERR_BASE + 65) +#define MCIERR_WAVE_INPUTSINUSE (MCIERR_BASE + 66) +#define MCIERR_WAVE_SETINPUTINUSE (MCIERR_BASE + 67) +#define MCIERR_WAVE_OUTPUTUNSPECIFIED (MCIERR_BASE + 68) +#define MCIERR_WAVE_INPUTUNSPECIFIED (MCIERR_BASE + 69) +#define MCIERR_WAVE_OUTPUTSUNSUITABLE (MCIERR_BASE + 70) +#define MCIERR_WAVE_SETOUTPUTUNSUITABLE (MCIERR_BASE + 71) +#define MCIERR_WAVE_INPUTSUNSUITABLE (MCIERR_BASE + 72) +#define MCIERR_WAVE_SETINPUTUNSUITABLE (MCIERR_BASE + 73) + +#define MCIERR_SEQ_DIV_INCOMPATIBLE (MCIERR_BASE + 80) +#define MCIERR_SEQ_PORT_INUSE (MCIERR_BASE + 81) +#define MCIERR_SEQ_PORT_NONEXISTENT (MCIERR_BASE + 82) +#define MCIERR_SEQ_PORT_MAPNODEVICE (MCIERR_BASE + 83) +#define MCIERR_SEQ_PORT_MISCERROR (MCIERR_BASE + 84) +#define MCIERR_SEQ_TIMER (MCIERR_BASE + 85) +#define MCIERR_SEQ_PORTUNSPECIFIED (MCIERR_BASE + 86) +#define MCIERR_SEQ_NOMIDIPRESENT (MCIERR_BASE + 87) + +#define MCIERR_NO_WINDOW (MCIERR_BASE + 90) +#define MCIERR_CREATEWINDOW (MCIERR_BASE + 91) +#define MCIERR_FILE_READ (MCIERR_BASE + 92) +#define MCIERR_FILE_WRITE (MCIERR_BASE + 93) + +/* all custom device driver errors must be >= than this value */ +#define MCIERR_CUSTOM_DRIVER_BASE (MCIERR_BASE + 256) + +/* MCI command message identifiers */ +#define MCI_OPEN 0x0803 +#define MCI_CLOSE 0x0804 +#define MCI_ESCAPE 0x0805 +#define MCI_PLAY 0x0806 +#define MCI_SEEK 0x0807 +#define MCI_STOP 0x0808 +#define MCI_PAUSE 0x0809 +#define MCI_INFO 0x080A +#define MCI_GETDEVCAPS 0x080B +#define MCI_SPIN 0x080C +#define MCI_SET 0x080D +#define MCI_STEP 0x080E +#define MCI_RECORD 0x080F +#define MCI_SYSINFO 0x0810 +#define MCI_BREAK 0x0811 +#define MCI_SOUND 0x0812 +#define MCI_SAVE 0x0813 +#define MCI_STATUS 0x0814 +#define MCI_CUE 0x0830 +#define MCI_REALIZE 0x0840 +#define MCI_WINDOW 0x0841 +#define MCI_PUT 0x0842 +#define MCI_WHERE 0x0843 +#define MCI_FREEZE 0x0844 +#define MCI_UNFREEZE 0x0845 +#define MCI_LOAD 0x0850 +#define MCI_CUT 0x0851 +#define MCI_COPY 0x0852 +#define MCI_PASTE 0x0853 +#define MCI_UPDATE 0x0854 +#define MCI_RESUME 0x0855 +#define MCI_DELETE 0x0856 + +/* all custom MCI command messages must be >= than this value */ +#define MCI_USER_MESSAGES (0x400 + DRV_MCI_FIRST) + + +/* device ID for "all devices" */ +#define MCI_ALL_DEVICE_ID 0xFFFF + +/* constants for predefined MCI device types */ +#define MCI_DEVTYPE_VCR (MCI_STRING_OFFSET + 1) +#define MCI_DEVTYPE_VIDEODISC (MCI_STRING_OFFSET + 2) +#define MCI_DEVTYPE_OVERLAY (MCI_STRING_OFFSET + 3) +#define MCI_DEVTYPE_CD_AUDIO (MCI_STRING_OFFSET + 4) +#define MCI_DEVTYPE_DAT (MCI_STRING_OFFSET + 5) +#define MCI_DEVTYPE_SCANNER (MCI_STRING_OFFSET + 6) +#define MCI_DEVTYPE_ANIMATION (MCI_STRING_OFFSET + 7) +#define MCI_DEVTYPE_DIGITAL_VIDEO (MCI_STRING_OFFSET + 8) +#define MCI_DEVTYPE_OTHER (MCI_STRING_OFFSET + 9) +#define MCI_DEVTYPE_WAVEFORM_AUDIO (MCI_STRING_OFFSET + 10) +#define MCI_DEVTYPE_SEQUENCER (MCI_STRING_OFFSET + 11) + +#define MCI_DEVTYPE_FIRST MCI_DEVTYPE_VCR +#define MCI_DEVTYPE_LAST MCI_DEVTYPE_SEQUENCER + +/* return values for 'status mode' command */ +#define MCI_MODE_NOT_READY (MCI_STRING_OFFSET + 12) +#define MCI_MODE_STOP (MCI_STRING_OFFSET + 13) +#define MCI_MODE_PLAY (MCI_STRING_OFFSET + 14) +#define MCI_MODE_RECORD (MCI_STRING_OFFSET + 15) +#define MCI_MODE_SEEK (MCI_STRING_OFFSET + 16) +#define MCI_MODE_PAUSE (MCI_STRING_OFFSET + 17) +#define MCI_MODE_OPEN (MCI_STRING_OFFSET + 18) + +/* constants used in 'set time format' and 'status time format' commands */ +#define MCI_FORMAT_MILLISECONDS 0 +#define MCI_FORMAT_HMS 1 +#define MCI_FORMAT_MSF 2 +#define MCI_FORMAT_FRAMES 3 +#define MCI_FORMAT_SMPTE_24 4 +#define MCI_FORMAT_SMPTE_25 5 +#define MCI_FORMAT_SMPTE_30 6 +#define MCI_FORMAT_SMPTE_30DROP 7 +#define MCI_FORMAT_BYTES 8 +#define MCI_FORMAT_SAMPLES 9 +#define MCI_FORMAT_TMSF 10 + +/* MCI time format conversion macros */ +#define MCI_MSF_MINUTE(msf) ((BYTE)(msf)) +#define MCI_MSF_SECOND(msf) ((BYTE)(((WORD)(msf)) >> 8)) +#define MCI_MSF_FRAME(msf) ((BYTE)((msf)>>16)) + +#define MCI_MAKE_MSF(m, s, f) ((DWORD)(((BYTE)(m) | \ + ((WORD)(s)<<8)) | \ + (((DWORD)(BYTE)(f))<<16))) + +#define MCI_TMSF_TRACK(tmsf) ((BYTE)(tmsf)) +#define MCI_TMSF_MINUTE(tmsf) ((BYTE)(((WORD)(tmsf)) >> 8)) +#define MCI_TMSF_SECOND(tmsf) ((BYTE)((tmsf)>>16)) +#define MCI_TMSF_FRAME(tmsf) ((BYTE)((tmsf)>>24)) + +#define MCI_MAKE_TMSF(t, m, s, f) ((DWORD)(((BYTE)(t) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s) | \ + ((WORD)(f)<<8))<<16))) + +#define MCI_HMS_HOUR(hms) ((BYTE)(hms)) +#define MCI_HMS_MINUTE(hms) ((BYTE)(((WORD)(hms)) >> 8)) +#define MCI_HMS_SECOND(hms) ((BYTE)((hms)>>16)) + +#define MCI_MAKE_HMS(h, m, s) ((DWORD)(((BYTE)(h) | \ + ((WORD)(m)<<8)) | \ + (((DWORD)(BYTE)(s))<<16))) + + +/* flags for wParam of MM_MCINOTIFY message */ +#define MCI_NOTIFY_SUCCESSFUL 0x0001 +#define MCI_NOTIFY_SUPERSEDED 0x0002 +#define MCI_NOTIFY_ABORTED 0x0004 +#define MCI_NOTIFY_FAILURE 0x0008 + + +/* common flags for dwFlags parameter of MCI command messages */ +#define MCI_NOTIFY 0x00000001L +#define MCI_WAIT 0x00000002L +#define MCI_FROM 0x00000004L +#define MCI_TO 0x00000008L +#define MCI_TRACK 0x00000010L + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OPEN_SHAREABLE 0x00000100L +#define MCI_OPEN_ELEMENT 0x00000200L +#define MCI_OPEN_ALIAS 0x00000400L +#define MCI_OPEN_ELEMENT_ID 0x00000800L +#define MCI_OPEN_TYPE_ID 0x00001000L +#define MCI_OPEN_TYPE 0x00002000L + +/* flags for dwFlags parameter of MCI_SEEK command message */ +#define MCI_SEEK_TO_START 0x00000100L +#define MCI_SEEK_TO_END 0x00000200L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_STATUS_ITEM 0x00000100L +#define MCI_STATUS_START 0x00000200L + +/* flags for dwItem field of the MCI_STATUS_PARMS parameter block */ +#define MCI_STATUS_LENGTH 0x00000001L +#define MCI_STATUS_POSITION 0x00000002L +#define MCI_STATUS_NUMBER_OF_TRACKS 0x00000003L +#define MCI_STATUS_MODE 0x00000004L +#define MCI_STATUS_MEDIA_PRESENT 0x00000005L +#define MCI_STATUS_TIME_FORMAT 0x00000006L +#define MCI_STATUS_READY 0x00000007L +#define MCI_STATUS_CURRENT_TRACK 0x00000008L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_INFO_PRODUCT 0x00000100L +#define MCI_INFO_FILE 0x00000200L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_GETDEVCAPS_ITEM 0x00000100L + +/* flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_GETDEVCAPS_CAN_RECORD 0x00000001L +#define MCI_GETDEVCAPS_HAS_AUDIO 0x00000002L +#define MCI_GETDEVCAPS_HAS_VIDEO 0x00000003L +#define MCI_GETDEVCAPS_DEVICE_TYPE 0x00000004L +#define MCI_GETDEVCAPS_USES_FILES 0x00000005L +#define MCI_GETDEVCAPS_COMPOUND_DEVICE 0x00000006L +#define MCI_GETDEVCAPS_CAN_EJECT 0x00000007L +#define MCI_GETDEVCAPS_CAN_PLAY 0x00000008L +#define MCI_GETDEVCAPS_CAN_SAVE 0x00000009L + +/* flags for dwFlags parameter of MCI_SYSINFO command message */ +#define MCI_SYSINFO_QUANTITY 0x00000100L +#define MCI_SYSINFO_OPEN 0x00000200L +#define MCI_SYSINFO_NAME 0x00000400L +#define MCI_SYSINFO_INSTALLNAME 0x00000800L + +/* flags for dwFlags parameter of MCI_SET command message */ +#define MCI_SET_DOOR_OPEN 0x00000100L +#define MCI_SET_DOOR_CLOSED 0x00000200L +#define MCI_SET_TIME_FORMAT 0x00000400L +#define MCI_SET_AUDIO 0x00000800L +#define MCI_SET_VIDEO 0x00001000L +#define MCI_SET_ON 0x00002000L +#define MCI_SET_OFF 0x00004000L + +/* flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS */ +#define MCI_SET_AUDIO_ALL 0x00000000L +#define MCI_SET_AUDIO_LEFT 0x00000001L +#define MCI_SET_AUDIO_RIGHT 0x00000002L + +/* flags for dwFlags parameter of MCI_BREAK command message */ +#define MCI_BREAK_KEY 0x00000100L +#define MCI_BREAK_HWND 0x00000200L +#define MCI_BREAK_OFF 0x00000400L + +/* flags for dwFlags parameter of MCI_RECORD command message */ +#define MCI_RECORD_INSERT 0x00000100L +#define MCI_RECORD_OVERWRITE 0x00000200L + +/* flags for dwFlags parameter of MCI_SOUND command message */ +#define MCI_SOUND_NAME 0x00000100L + +/* flags for dwFlags parameter of MCI_SAVE command message */ +#define MCI_SAVE_FILE 0x00000100L + +/* flags for dwFlags parameter of MCI_LOAD command message */ +#define MCI_LOAD_FILE 0x00000100L + +/* generic parameter block for MCI command messages with no special parameters */ +typedef struct tagMCI_GENERIC_PARMS { + DWORD dwCallback; +} MCI_GENERIC_PARMS; +typedef MCI_GENERIC_PARMS FAR *LPMCI_GENERIC_PARMS; + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; +} MCI_OPEN_PARMS; +typedef MCI_OPEN_PARMS FAR *LPMCI_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_PLAY_PARMS; +typedef MCI_PLAY_PARMS FAR *LPMCI_PLAY_PARMS; + +/* parameter block for MCI_SEEK command message */ +typedef struct tagMCI_SEEK_PARMS { + DWORD dwCallback; + DWORD dwTo; +} MCI_SEEK_PARMS; +typedef MCI_SEEK_PARMS FAR *LPMCI_SEEK_PARMS; + +/* parameter block for MCI_STATUS command message */ +typedef struct tagMCI_STATUS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; + DWORD dwTrack; +} MCI_STATUS_PARMS; +typedef MCI_STATUS_PARMS FAR * LPMCI_STATUS_PARMS; + +/* parameter block for MCI_INFO command message */ +typedef struct tagMCI_INFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; +} MCI_INFO_PARMS; +typedef MCI_INFO_PARMS FAR * LPMCI_INFO_PARMS; + +/* parameter block for MCI_GETDEVCAPS command message */ +typedef struct tagMCI_GETDEVCAPS_PARMS { + DWORD dwCallback; + DWORD dwReturn; + DWORD dwItem; +} MCI_GETDEVCAPS_PARMS; +typedef MCI_GETDEVCAPS_PARMS FAR * LPMCI_GETDEVCAPS_PARMS; + +/* parameter block for MCI_SYSINFO command message */ +typedef struct tagMCI_SYSINFO_PARMS { + DWORD dwCallback; + LPSTR lpstrReturn; + DWORD dwRetSize; + DWORD dwNumber; + UINT wDeviceType; + UINT wReserved0; +} MCI_SYSINFO_PARMS; +typedef MCI_SYSINFO_PARMS FAR * LPMCI_SYSINFO_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; +} MCI_SET_PARMS; +typedef MCI_SET_PARMS FAR *LPMCI_SET_PARMS; + +/* parameter block for MCI_BREAK command message */ +typedef struct tagMCI_BREAK_PARMS { + DWORD dwCallback; + int nVirtKey; + UINT wReserved0; + HWND hwndBreak; + UINT wReserved1; +} MCI_BREAK_PARMS; +typedef MCI_BREAK_PARMS FAR * LPMCI_BREAK_PARMS; + +/* parameter block for MCI_SOUND command message */ +typedef struct tagMCI_SOUND_PARMS { + DWORD dwCallback; + LPCSTR lpstrSoundName; +} MCI_SOUND_PARMS; +typedef MCI_SOUND_PARMS FAR * LPMCI_SOUND_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_SAVE_PARMS; +typedef MCI_SAVE_PARMS FAR * LPMCI_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; +} MCI_LOAD_PARMS; +typedef MCI_LOAD_PARMS FAR * LPMCI_LOAD_PARMS; + +/* parameter block for MCI_RECORD command message */ +typedef struct tagMCI_RECORD_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_RECORD_PARMS; +typedef MCI_RECORD_PARMS FAR *LPMCI_RECORD_PARMS; + + +/* MCI extensions for videodisc devices */ + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_STATUS_MODE) */ +#define MCI_VD_MODE_PARK (MCI_VD_OFFSET + 1) + +/* flag for dwReturn field of MCI_STATUS_PARMS */ +/* MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) */ +#define MCI_VD_MEDIA_CLV (MCI_VD_OFFSET + 2) +#define MCI_VD_MEDIA_CAV (MCI_VD_OFFSET + 3) +#define MCI_VD_MEDIA_OTHER (MCI_VD_OFFSET + 4) + +#define MCI_VD_FORMAT_TRACK 0x4001 + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_VD_PLAY_REVERSE 0x00010000L +#define MCI_VD_PLAY_FAST 0x00020000L +#define MCI_VD_PLAY_SPEED 0x00040000L +#define MCI_VD_PLAY_SCAN 0x00080000L +#define MCI_VD_PLAY_SLOW 0x00100000L + +/* flag for dwFlags parameter of MCI_SEEK command message */ +#define MCI_VD_SEEK_REVERSE 0x00010000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_VD_STATUS_SPEED 0x00004002L +#define MCI_VD_STATUS_FORWARD 0x00004003L +#define MCI_VD_STATUS_MEDIA_TYPE 0x00004004L +#define MCI_VD_STATUS_SIDE 0x00004005L +#define MCI_VD_STATUS_DISC_SIZE 0x00004006L + +/* flags for dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_VD_GETDEVCAPS_CLV 0x00010000L +#define MCI_VD_GETDEVCAPS_CAV 0x00020000L + +#define MCI_VD_SPIN_UP 0x00010000L +#define MCI_VD_SPIN_DOWN 0x00020000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_VD_GETDEVCAPS_CAN_REVERSE 0x00004002L +#define MCI_VD_GETDEVCAPS_FAST_RATE 0x00004003L +#define MCI_VD_GETDEVCAPS_SLOW_RATE 0x00004004L +#define MCI_VD_GETDEVCAPS_NORMAL_RATE 0x00004005L + +/* flags for the dwFlags parameter of MCI_STEP command message */ +#define MCI_VD_STEP_FRAMES 0x00010000L +#define MCI_VD_STEP_REVERSE 0x00020000L + +/* flag for the MCI_ESCAPE command message */ +#define MCI_VD_ESCAPE_STRING 0x00000100L + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_VD_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; + } MCI_VD_PLAY_PARMS; +typedef MCI_VD_PLAY_PARMS FAR *LPMCI_VD_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_VD_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_VD_STEP_PARMS; +typedef MCI_VD_STEP_PARMS FAR *LPMCI_VD_STEP_PARMS; + +/* parameter block for MCI_ESCAPE command message */ +typedef struct tagMCI_VD_ESCAPE_PARMS { + DWORD dwCallback; + LPCSTR lpstrCommand; +} MCI_VD_ESCAPE_PARMS; +typedef MCI_VD_ESCAPE_PARMS FAR *LPMCI_VD_ESCAPE_PARMS; + + +/* MCI extensions for waveform audio devices */ + +/* flags for the dwFlags parameter of MCI_OPEN command message */ +#define MCI_WAVE_OPEN_BUFFER 0x00010000L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_FORMATTAG 0x00010000L +#define MCI_WAVE_SET_CHANNELS 0x00020000L +#define MCI_WAVE_SET_SAMPLESPERSEC 0x00040000L +#define MCI_WAVE_SET_AVGBYTESPERSEC 0x00080000L +#define MCI_WAVE_SET_BLOCKALIGN 0x00100000L +#define MCI_WAVE_SET_BITSPERSAMPLE 0x00200000L + +/* flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages */ +#define MCI_WAVE_INPUT 0x00400000L +#define MCI_WAVE_OUTPUT 0x00800000L + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_WAVE_STATUS_FORMATTAG 0x00004001L +#define MCI_WAVE_STATUS_CHANNELS 0x00004002L +#define MCI_WAVE_STATUS_SAMPLESPERSEC 0x00004003L +#define MCI_WAVE_STATUS_AVGBYTESPERSEC 0x00004004L +#define MCI_WAVE_STATUS_BLOCKALIGN 0x00004005L +#define MCI_WAVE_STATUS_BITSPERSAMPLE 0x00004006L +#define MCI_WAVE_STATUS_LEVEL 0x00004007L + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_WAVE_SET_ANYINPUT 0x04000000L +#define MCI_WAVE_SET_ANYOUTPUT 0x08000000L + +/* flags for the dwFlags parameter of MCI_GETDEVCAPS command message */ +#define MCI_WAVE_GETDEVCAPS_INPUTS 0x00004001L +#define MCI_WAVE_GETDEVCAPS_OUTPUTS 0x00004002L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_WAVE_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwBufferSeconds; +} MCI_WAVE_OPEN_PARMS; +typedef MCI_WAVE_OPEN_PARMS FAR *LPMCI_WAVE_OPEN_PARMS; + +/* parameter block for MCI_DELETE command message */ +typedef struct tagMCI_WAVE_DELETE_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; +} MCI_WAVE_DELETE_PARMS; +typedef MCI_WAVE_DELETE_PARMS FAR *LPMCI_WAVE_DELETE_PARMS; + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_WAVE_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + UINT wInput; + UINT wReserved0; + UINT wOutput; + UINT wReserved1; + UINT wFormatTag; + UINT wReserved2; + UINT nChannels; + UINT wReserved3; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + UINT nBlockAlign; + UINT wReserved4; + UINT wBitsPerSample; + UINT wReserved5; +} MCI_WAVE_SET_PARMS; +typedef MCI_WAVE_SET_PARMS FAR * LPMCI_WAVE_SET_PARMS; + + +/* MCI extensions for MIDI sequencer devices */ + +/* flags for the dwReturn field of MCI_STATUS_PARMS parameter block */ +/* MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) */ +#define MCI_SEQ_DIV_PPQN (0 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_24 (1 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_25 (2 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30DROP (3 + MCI_SEQ_OFFSET) +#define MCI_SEQ_DIV_SMPTE_30 (4 + MCI_SEQ_OFFSET) + +/* flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block */ +/* MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) */ +#define MCI_SEQ_FORMAT_SONGPTR 0x4001 +#define MCI_SEQ_FILE 0x4002 +#define MCI_SEQ_MIDI 0x4003 +#define MCI_SEQ_SMPTE 0x4004 +#define MCI_SEQ_NONE 65533 + +/* flags for the dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_SEQ_STATUS_TEMPO 0x00004002L +#define MCI_SEQ_STATUS_PORT 0x00004003L +#define MCI_SEQ_STATUS_SLAVE 0x00004007L +#define MCI_SEQ_STATUS_MASTER 0x00004008L +#define MCI_SEQ_STATUS_OFFSET 0x00004009L +#define MCI_SEQ_STATUS_DIVTYPE 0x0000400AL + +/* flags for the dwFlags parameter of MCI_SET command message */ +#define MCI_SEQ_SET_TEMPO 0x00010000L +#define MCI_SEQ_SET_PORT 0x00020000L +#define MCI_SEQ_SET_SLAVE 0x00040000L +#define MCI_SEQ_SET_MASTER 0x00080000L +#define MCI_SEQ_SET_OFFSET 0x01000000L + +/* parameter block for MCI_SET command message */ +typedef struct tagMCI_SEQ_SET_PARMS { + DWORD dwCallback; + DWORD dwTimeFormat; + DWORD dwAudio; + DWORD dwTempo; + DWORD dwPort; + DWORD dwSlave; + DWORD dwMaster; + DWORD dwOffset; +} MCI_SEQ_SET_PARMS; +typedef MCI_SEQ_SET_PARMS FAR * LPMCI_SEQ_SET_PARMS; + + +/* MCI extensions for animation devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_ANIM_OPEN_WS 0x00010000L +#define MCI_ANIM_OPEN_PARENT 0x00020000L +#define MCI_ANIM_OPEN_NOSTATIC 0x00040000L + +/* flags for dwFlags parameter of MCI_PLAY command message */ +#define MCI_ANIM_PLAY_SPEED 0x00010000L +#define MCI_ANIM_PLAY_REVERSE 0x00020000L +#define MCI_ANIM_PLAY_FAST 0x00040000L +#define MCI_ANIM_PLAY_SLOW 0x00080000L +#define MCI_ANIM_PLAY_SCAN 0x00100000L + +/* flags for dwFlags parameter of MCI_STEP command message */ +#define MCI_ANIM_STEP_REVERSE 0x00010000L +#define MCI_ANIM_STEP_FRAMES 0x00020000L + +/* flags for dwItem field of MCI_STATUS_PARMS parameter block */ +#define MCI_ANIM_STATUS_SPEED 0x00004001L +#define MCI_ANIM_STATUS_FORWARD 0x00004002L +#define MCI_ANIM_STATUS_HWND 0x00004003L +#define MCI_ANIM_STATUS_HPAL 0x00004004L +#define MCI_ANIM_STATUS_STRETCH 0x00004005L + +/* flags for the dwFlags parameter of MCI_INFO command message */ +#define MCI_ANIM_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_ANIM_GETDEVCAPS_CAN_REVERSE 0x00004001L +#define MCI_ANIM_GETDEVCAPS_FAST_RATE 0x00004002L +#define MCI_ANIM_GETDEVCAPS_SLOW_RATE 0x00004003L +#define MCI_ANIM_GETDEVCAPS_NORMAL_RATE 0x00004004L +#define MCI_ANIM_GETDEVCAPS_PALETTES 0x00004006L +#define MCI_ANIM_GETDEVCAPS_CAN_STRETCH 0x00004007L +#define MCI_ANIM_GETDEVCAPS_MAX_WINDOWS 0x00004008L + +/* flags for the MCI_REALIZE command message */ +#define MCI_ANIM_REALIZE_NORM 0x00010000L +#define MCI_ANIM_REALIZE_BKGD 0x00020000L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_ANIM_WINDOW_HWND 0x00010000L +#define MCI_ANIM_WINDOW_STATE 0x00040000L +#define MCI_ANIM_WINDOW_TEXT 0x00080000L +#define MCI_ANIM_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_ANIM_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block */ +/* MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) */ +#define MCI_ANIM_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_ANIM_RECT 0x00010000L +#define MCI_ANIM_PUT_SOURCE 0x00020000L +#define MCI_ANIM_PUT_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_ANIM_WHERE_SOURCE 0x00020000L +#define MCI_ANIM_WHERE_DESTINATION 0x00040000L + +/* flags for dwFlags parameter of MCI_UPDATE command message */ +#define MCI_ANIM_UPDATE_HDC 0x00020000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_ANIM_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; +} MCI_ANIM_OPEN_PARMS; +typedef MCI_ANIM_OPEN_PARMS FAR *LPMCI_ANIM_OPEN_PARMS; + +/* parameter block for MCI_PLAY command message */ +typedef struct tagMCI_ANIM_PLAY_PARMS { + DWORD dwCallback; + DWORD dwFrom; + DWORD dwTo; + DWORD dwSpeed; +} MCI_ANIM_PLAY_PARMS; +typedef MCI_ANIM_PLAY_PARMS FAR *LPMCI_ANIM_PLAY_PARMS; + +/* parameter block for MCI_STEP command message */ +typedef struct tagMCI_ANIM_STEP_PARMS { + DWORD dwCallback; + DWORD dwFrames; +} MCI_ANIM_STEP_PARMS; +typedef MCI_ANIM_STEP_PARMS FAR *LPMCI_ANIM_STEP_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_ANIM_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_ANIM_WINDOW_PARMS; +typedef MCI_ANIM_WINDOW_PARMS FAR * LPMCI_ANIM_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages */ +typedef struct tagMCI_ANIM_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_ANIM_RECT_PARMS; +typedef MCI_ANIM_RECT_PARMS FAR * LPMCI_ANIM_RECT_PARMS; + +/* parameter block for MCI_UPDATE PARMS */ +typedef struct tagMCI_ANIM_UPDATE_PARMS { + DWORD dwCallback; + RECT rc; + HDC hDC; +} MCI_ANIM_UPDATE_PARMS; +typedef MCI_ANIM_UPDATE_PARMS FAR * LPMCI_ANIM_UPDATE_PARMS; + + +/* MCI extensions for video overlay devices */ + +/* flags for dwFlags parameter of MCI_OPEN command message */ +#define MCI_OVLY_OPEN_WS 0x00010000L +#define MCI_OVLY_OPEN_PARENT 0x00020000L + +/* flags for dwFlags parameter of MCI_STATUS command message */ +#define MCI_OVLY_STATUS_HWND 0x00004001L +#define MCI_OVLY_STATUS_STRETCH 0x00004002L + +/* flags for dwFlags parameter of MCI_INFO command message */ +#define MCI_OVLY_INFO_TEXT 0x00010000L + +/* flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block */ +#define MCI_OVLY_GETDEVCAPS_CAN_STRETCH 0x00004001L +#define MCI_OVLY_GETDEVCAPS_CAN_FREEZE 0x00004002L +#define MCI_OVLY_GETDEVCAPS_MAX_WINDOWS 0x00004003L + +/* flags for dwFlags parameter of MCI_WINDOW command message */ +#define MCI_OVLY_WINDOW_HWND 0x00010000L +#define MCI_OVLY_WINDOW_STATE 0x00040000L +#define MCI_OVLY_WINDOW_TEXT 0x00080000L +#define MCI_OVLY_WINDOW_ENABLE_STRETCH 0x00100000L +#define MCI_OVLY_WINDOW_DISABLE_STRETCH 0x00200000L + +/* flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block */ +#define MCI_OVLY_WINDOW_DEFAULT 0x00000000L + +/* flags for dwFlags parameter of MCI_PUT command message */ +#define MCI_OVLY_RECT 0x00010000L +#define MCI_OVLY_PUT_SOURCE 0x00020000L +#define MCI_OVLY_PUT_DESTINATION 0x00040000L +#define MCI_OVLY_PUT_FRAME 0x00080000L +#define MCI_OVLY_PUT_VIDEO 0x00100000L + +/* flags for dwFlags parameter of MCI_WHERE command message */ +#define MCI_OVLY_WHERE_SOURCE 0x00020000L +#define MCI_OVLY_WHERE_DESTINATION 0x00040000L +#define MCI_OVLY_WHERE_FRAME 0x00080000L +#define MCI_OVLY_WHERE_VIDEO 0x00100000L + +/* parameter block for MCI_OPEN command message */ +typedef struct tagMCI_OVLY_OPEN_PARMS { + DWORD dwCallback; + UINT wDeviceID; + UINT wReserved0; + LPCSTR lpstrDeviceType; + LPCSTR lpstrElementName; + LPCSTR lpstrAlias; + DWORD dwStyle; + HWND hWndParent; + UINT wReserved1; + } MCI_OVLY_OPEN_PARMS; +typedef MCI_OVLY_OPEN_PARMS FAR *LPMCI_OVLY_OPEN_PARMS; + +/* parameter block for MCI_WINDOW command message */ +typedef struct tagMCI_OVLY_WINDOW_PARMS { + DWORD dwCallback; + HWND hWnd; + UINT wReserved1; + UINT nCmdShow; + UINT wReserved2; + LPCSTR lpstrText; +} MCI_OVLY_WINDOW_PARMS; +typedef MCI_OVLY_WINDOW_PARMS FAR * LPMCI_OVLY_WINDOW_PARMS; + +/* parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages */ +typedef struct tagMCI_OVLY_RECT_PARMS { + DWORD dwCallback; +#ifdef MCI_USE_OFFEXT + POINT ptOffset; + POINT ptExtent; +#else /* ifdef MCI_USE_OFFEXT */ + RECT rc; +#endif /* ifdef MCI_USE_OFFEXT */ +} MCI_OVLY_RECT_PARMS; +typedef MCI_OVLY_RECT_PARMS FAR * LPMCI_OVLY_RECT_PARMS; + +/* parameter block for MCI_SAVE command message */ +typedef struct tagMCI_OVLY_SAVE_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_SAVE_PARMS; +typedef MCI_OVLY_SAVE_PARMS FAR * LPMCI_OVLY_SAVE_PARMS; + +/* parameter block for MCI_LOAD command message */ +typedef struct tagMCI_OVLY_LOAD_PARMS { + DWORD dwCallback; + LPCSTR lpfilename; + RECT rc; +} MCI_OVLY_LOAD_PARMS; +typedef MCI_OVLY_LOAD_PARMS FAR * LPMCI_OVLY_LOAD_PARMS; + +#endif /* ifndef MMNOMCI */ + +/**************************************************************************** + + DISPLAY Driver extensions + +****************************************************************************/ + +#ifndef C1_TRANSPARENT + #define CAPS1 94 /* other caps */ + #define C1_TRANSPARENT 0x0001 /* new raster cap */ + #define NEWTRANSPARENT 3 /* use with SetBkMode() */ + + #define QUERYROPSUPPORT 40 /* use to determine ROP support */ +#endif /* ifndef C1_TRANSPARENT */ + +/**************************************************************************** + + DIB Driver extensions + +****************************************************************************/ + +#define SELECTDIB 41 /* DIB.DRV select dib escape */ +#define DIBINDEX(n) MAKELONG((n),0x10FF) + + +/**************************************************************************** + + ScreenSaver support + + The current application will receive a syscommand of SC_SCREENSAVE just + before the screen saver is invoked. If the app wishes to prevent a + screen save, return non-zero value, otherwise call DefWindowProc(). + +****************************************************************************/ + +#ifndef SC_SCREENSAVE + + #define SC_SCREENSAVE 0xF140 + +#endif /* ifndef SC_SCREENSAVE */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif + +#endif /* _INC_MMSYSTEM */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc new file mode 100644 index 000000000..7bef08693 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/mmsystem.inc @@ -0,0 +1,1484 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MMSYSTEM.INC - Multimedia assembly language structures & constants +; +; Copyright (c) 1990-1992, Microsoft Corp. All rights reserved. +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + + + +; If defined, the following flags inhibit inclusion +; of the indicated items: +; +; MMNODRV - Installable driver support +; MMNOSOUND - Sound support +; MMNOWAVE - Waveform support +; MMNOMIDI - MIDI support +; MMNOAUX - Auxiliary audio support +; MMNOTIMER - Timer support +; MMNOJOY - Joystick support +; MMNOMCI - MCI support +; MMNOMMIO - Multimedia file I/O support +; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; General constants and data types +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; general constants +MAXPNAMELEN equ 32 ; max product name length (including NULL) +MAXERRORLENGTH equ 128 ; max error text length (including NULL) + +; MMTIME data structure +MMTIME struc + mmt_wType dw ? ; indicates the contents of the union + mmt_TimeUnion dd ? ; union +MMTIME ends + +SMPTE struc + smpte_hour db ? ; hours + smpte_min db ? ; minutes + smpte_sec db ? ; seconds + smpte_frame db ? ; frames + smpte_fps db ? ; frames per second + smpte_reserved db ? ; pad +SMPTE ends + +; types for wType field in MMTIME struct +TIME_MS equ 0001h ; time in milliseconds +TIME_SAMPLES equ 0002h ; number of wave samples +TIME_BYTES equ 0004h ; current byte offset +TIME_SMPTE equ 0008h ; SMPTE time +TIME_MIDI equ 0010h ; MIDI time + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Multimedia Extensions Window Messages +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +MM_JOY1MOVE equ 3A0h ; joystick +MM_JOY2MOVE equ 3A1h +MM_JOY1ZMOVE equ 3A2h +MM_JOY2ZMOVE equ 3A3h +MM_JOY1BUTTONDOWN equ 3B5h +MM_JOY2BUTTONDOWN equ 3B6h +MM_JOY1BUTTONUP equ 3B7h +MM_JOY2BUTTONUP equ 3B8h + +MM_MCINOTIFY equ 3B9h ; MCI +MM_MCISYSTEM_STRING equ 3CAh + +MM_WOM_OPEN equ 3BBh ; waveform output +MM_WOM_CLOSE equ 3BCh +MM_WOM_DONE equ 3BDh + +MM_WIM_OPEN equ 3BEh ; waveform input +MM_WIM_CLOSE equ 3BFh +MM_WIM_DATA equ 3C0h + +MM_MIM_OPEN equ 3C1h ; MIDI input +MM_MIM_CLOSE equ 3C2h +MM_MIM_DATA equ 3C3h +MM_MIM_LONGDATA equ 3C4h +MM_MIM_ERROR equ 3C5h +MM_MIM_LONGERROR equ 3C6h + +MM_MOM_OPEN equ 3C7h ; MIDI output +MM_MOM_CLOSE equ 3C8h +MM_MOM_DONE equ 3C9h + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; String resource number bases (internal use) +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +MMSYSERR_BASE equ 0 +WAVERR_BASE equ 32 +MIDIERR_BASE equ 64 +TIMERR_BASE equ 96 +JOYERR_BASE equ 160 +MCIERR_BASE equ 256 + +MCI_STRING_OFFSET equ 512 +MCI_VD_OFFSET equ 1024 +MCI_CD_OFFSET equ 1088 +MCI_WAVE_OFFSET equ 1152 +MCI_SEQ_OFFSET equ 1216 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; General error return values +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; general error return values +MMSYSERR_NOERROR equ 0 ; no error +MMSYSERR_ERROR equ (MMSYSERR_BASE + 1) ; unspecified error +MMSYSERR_BADDEVICEID equ (MMSYSERR_BASE + 2) ; device ID out of range +MMSYSERR_NOTENABLED equ (MMSYSERR_BASE + 3) ; driver failed enable +MMSYSERR_ALLOCATED equ (MMSYSERR_BASE + 4) ; device already allocated +MMSYSERR_INVALHANDLE equ (MMSYSERR_BASE + 5) ; device handle is invalid +MMSYSERR_NODRIVER equ (MMSYSERR_BASE + 6) ; no device driver present +MMSYSERR_NOMEM equ (MMSYSERR_BASE + 7) ; memory allocation error +MMSYSERR_NOTSUPPORTED equ (MMSYSERR_BASE + 8) ; function isn't supported +MMSYSERR_BADERRNUM equ (MMSYSERR_BASE + 9) ; error value out of range +MMSYSERR_INVALFLAG equ (MMSYSERR_BASE + 10) ; invalid flags passed +MMSYSERR_INVALPARAM equ (MMSYSERR_BASE + 11) ; invalid parameter passed +MMSYSERR_LASTERROR equ (MMSYSERR_BASE + 11) ; last error in range + + +ifndef MMNODRV +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Installable driver support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +DRV_MCI_FIRST equ DRV_RESERVED +DRV_MCI_LAST equ (DRV_RESERVED + 0FFFh) + +endif ;ifndef MMNODRV + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Driver callback support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and +; midiOutOpen() to specify the type of the dwCallback parameter. +CALLBACK_TYPEMASK equ 00070000h ; callback type mask +CALLBACK_NULL equ 00000000h ; no callback +CALLBACK_WINDOW equ 00010000h ; dwCallback is a HWND +CALLBACK_TASK equ 00020000h ; dwCallback is a HTASK +CALLBACK_FUNCTION equ 00030000h ; dwCallback is a FARPROC + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Manufacturer and product IDs +; +; Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS, +; MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures. +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; manufacturer IDs +MM_MICROSOFT equ 1 ; Microsoft Corp. + +; product IDs +MM_MIDI_MAPPER equ 1 ; MIDI Mapper +MM_WAVE_MAPPER equ 2 ; Wave Mapper + +MM_SNDBLST_MIDIOUT equ 3 ; Sound Blaster MIDI output port +MM_SNDBLST_MIDIIN equ 4 ; Sound Blaster MIDI input port +MM_SNDBLST_SYNTH equ 5 ; Sound Blaster internal synthesizer +MM_SNDBLST_WAVEOUT equ 6 ; Sound Blaster waveform output +MM_SNDBLST_WAVEIN equ 7 ; Sound Blaster waveform input + +MM_ADLIB equ 9 ; Ad Lib-compatible synthesizer + +MM_MPU401_MIDIOUT equ 10 ; MPU401-compatible MIDI output port +MM_MPU401_MIDIIN equ 11 ; MPU401-compatible MIDI input port + +MM_PC_JOYSTICK equ 12 ; Joystick adapter + + +ifndef MMNOSOUND +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Sound support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; flag values for wFlags parameter +SND_SYNC equ 0000h ; play synchronously (default) +SND_ASYNC equ 0001h ; play asynchronously +SND_NODEFAULT equ 0002h ; don't use default sound +SND_MEMORY equ 0004h ; lpszSoundName points to a memory file +SND_LOOP equ 0008h ; loop the sound until next sndPlaySound +SND_NOSTOP equ 0010h ; don't stop any currently playing sound + +endif ;ifndef MMNOSOUND + + +ifndef MMNOWAVE +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Waveform audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; waveform audio error return values +WAVERR_BADFORMAT equ (WAVERR_BASE + 0) ; unsupported wave format +WAVERR_STILLPLAYING equ (WAVERR_BASE + 1) ; still something playing +WAVERR_UNPREPARED equ (WAVERR_BASE + 2) ; header not prepared +WAVERR_SYNC equ (WAVERR_BASE + 3) ; device is synchronous +WAVERR_LASTERROR equ (WAVERR_BASE + 3) ; last error in range + +; wave callback messages +WOM_OPEN equ MM_WOM_OPEN +WOM_CLOSE equ MM_WOM_CLOSE +WOM_DONE equ MM_WOM_DONE +WIM_OPEN equ MM_WIM_OPEN +WIM_CLOSE equ MM_WIM_CLOSE +WIM_DATA equ MM_WIM_DATA + +; device ID for wave device mapper +WAVE_MAPPER equ (-1) + +; flags for dwFlags parameter in waveOutOpen() and waveInOpen() +WAVE_FORMAT_QUERY equ 0001h +WAVE_ALLOWSYNC equ 0002h + +; wave data block header +WAVEHDR struc + lpWaveData dd ? ; pointer to locked data buffer + dwWaveBufferLength dd ? ; length of data buffer + dwWaveBytesRecorded dd ? ; used for input only + dwWaveUser dd ? ; for client's use + dwWaveFlags dd ? ; assorted flags (see defines) + dwWaveLoops dd ? ; loop control counter + lpWaveNext dd ? ; reserved for driver + Wavereserved dd ? ; reserved for driver +WAVEHDR ends + +; flags for dwFlags field of WAVEHDR +WHDR_DONE equ 00000001h ; done bit +WHDR_PREPARED equ 00000002h ; set if this header has been prepared +WHDR_BEGINLOOP equ 00000004h ; loop start block +WHDR_ENDLOOP equ 00000008h ; loop end block +WHDR_INQUEUE equ 00000010h ; reserved for driver + +; waveform output device capabilities structure +WAVEOUTCAPS struc + woc_wMid dw ? ; manufacturer ID + woc_wPid dw ? ; product ID + woc_vDriverVersion dw ? ; version of the driver + woc_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + woc_dwFormats dd ? ; formats supported + woc_wChannels dw ? ; number of sources supported + woc_dwSupport dd ? ; functionality supported by driver +WAVEOUTCAPS ends + +; flags for dwSupport field of WAVEOUTCAPS +WAVECAPS_PITCH equ 0001h ; supports pitch control +WAVECAPS_PLAYBACKRATE equ 0002h ; supports playback rate control +WAVECAPS_VOLUME equ 0004h ; supports volume control +WAVECAPS_LRVOLUME equ 0008h ; separate left-right volume control +WAVECAPS_SYNC equ 0010h + +; waveform input device capabilities structure +WAVEINCAPS struc + wic_wMid dw ? ; manufacturer ID + wic_wPid dw ? ; product ID + wic_vDriverVersion dw ? ; version of the driver + wic_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + wic_dwFormats dd ? ; formats supported + wic_wChannels dw ? ; number of channels supported +WAVEINCAPS ends + +; defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS +WAVE_INVALIDFORMAT equ 00000000h ; invalid format +WAVE_FORMAT_1M08 equ 00000001h ; 11.025 kHz, Mono, 8-bit +WAVE_FORMAT_1S08 equ 00000002h ; 11.025 kHz, Stereo, 8-bit +WAVE_FORMAT_1M16 equ 00000004h ; 11.025 kHz, Mono, 16-bit +WAVE_FORMAT_1S16 equ 00000008h ; 11.025 kHz, Stereo, 16-bit +WAVE_FORMAT_2M08 equ 00000010h ; 22.05 kHz, Mono, 8-bit +WAVE_FORMAT_2S08 equ 00000020h ; 22.05 kHz, Stereo, 8-bit +WAVE_FORMAT_2M16 equ 00000040h ; 22.05 kHz, Mono, 16-bit +WAVE_FORMAT_2S16 equ 00000080h ; 22.05 kHz, Stereo, 16-bit +WAVE_FORMAT_4M08 equ 00000100h ; 44.1 kHz, Mono, 8-bit +WAVE_FORMAT_4S08 equ 00000200h ; 44.1 kHz, Stereo, 8-bit +WAVE_FORMAT_4M16 equ 00000400h ; 44.1 kHz, Mono, 16-bit +WAVE_FORMAT_4S16 equ 00000800h ; 44.1 kHz, Stereo, 16-bit + +; general waveform format structure (information common to all formats) +WAVEFORMAT struc + wfmt_wFormatTag dw ? ; format type + wfmt_nChannels dw ? ; number of channels (i.e. mono, stereo, etc.) + wfmt_nSamplesPerSec dd ? ; sample rate + wfmt_nAvgBytesPerSec dd ? ; for buffer estimation + wfmt_nBlockAlign dw ? ; block size of data +WAVEFORMAT ends + +; flags for wFormatTag field of WAVEFORMAT +WAVE_FORMAT_PCM equ 1 + +; specific waveform format structure for PCM data +PCMWAVEFORMAT struc + pcm_wf db (SIZE WAVEFORMAT) dup (?) + pcm_wBitsPerSample dw ? +PCMWAVEFORMAT ends + +endif ;ifndef MMNOWAVE + + +ifndef MMNOMIDI +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MIDI audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MIDI error return values +MIDIERR_UNPREPARED equ (MIDIERR_BASE + 0) ; header not prepared +MIDIERR_STILLPLAYING equ (MIDIERR_BASE + 1) ; still something playing +MIDIERR_NOMAP equ (MIDIERR_BASE + 2) ; no current map +MIDIERR_NOTREADY equ (MIDIERR_BASE + 3) ; hardware is still busy +MIDIERR_NODEVICE equ (MIDIERR_BASE + 4) ; port no longer connected +MIDIERR_INVALIDSETUP equ (MIDIERR_BASE + 5) ; invalid setup +MIDIERR_LASTERROR equ (MIDIERR_BASE + 5) ; last error in range + +; MIDI audio data types +MIDIPATCHSIZE equ 128 + +; MIDI callback messages +MIM_OPEN equ MM_MIM_OPEN +MIM_CLOSE equ MM_MIM_CLOSE +MIM_DATA equ MM_MIM_DATA +MIM_LONGDATA equ MM_MIM_LONGDATA +MIM_ERROR equ MM_MIM_ERROR +MIM_LONGERROR equ MM_MIM_LONGERROR +MOM_OPEN equ MM_MOM_OPEN +MOM_CLOSE equ MM_MOM_CLOSE +MOM_DONE equ MM_MOM_DONE + +; device ID for MIDI mapper +MIDIMAPPER equ (-1) +MIDI_MAPPER equ (-1) + +; flags for wFlags parm of midiOutCachePatches(), +; midiOutCacheDrumPatches() +MIDI_CACHE_ALL equ 1 +MIDI_CACHE_BESTFIT equ 2 +MIDI_CACHE_QUERY equ 3 +MIDI_UNCACHE equ 4 + +; MIDI output device capabilities structure +MIDIOUTCAPS struc + moc_wMid dw ? ; manufacturer ID + moc_wPid dw ? ; product ID + moc_vDriverVersion dw ? ; version of the driver + moc_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + moc_wTechnology dw ? ; type of device + moc_wVoices dw ? ; # of voices (internal synth only) + moc_wNotes dw ? ; max # of notes (internal synth only) + moc_wChannelMask dw ? ; channels used (internal synth only) + moc_dwSupport dd ? ; functionality supported by driver +MIDIOUTCAPS ends + +; flags for wTechnology field of MIDIOUTCAPS structure +MOD_MIDIPORT equ 1 ; output port +MOD_SYNTH equ 2 ; generic internal synth +MOD_SQSYNTH equ 3 ; square wave internal synth +MOD_FMSYNTH equ 4 ; FM internal synth +MOD_MAPPER equ 5 ; MIDI mapper + +; flags for dwSupport field of MIDIOUTCAPS structure +MIDICAPS_VOLUME equ 0001h ; supports volume control +MIDICAPS_LRVOLUME equ 0002h ; separate left-right volume control +MIDICAPS_CACHE equ 0004h + +; MIDI output device capabilities structure +MIDIINCAPS struc + mic_wMid dw ? ; manufacturer ID + mic_wPid dw ? ; product ID + mic_vDriverVersion dw ? ; version of the driver + mic_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) +MIDIINCAPS ends + +; MIDI data block header +MIDIHDR struc + lpMidiData dd ? ; pointer to locked data block + dwMidiBufferLength dd ? ; length of data in data block + dwMidiBytesRecorded dd ? ; used for input only + dwMidiUser dd ? ; for client's use + dwMidiFlags dd ? ; assorted flags (see defines) + lpMidiNext dd ? ; reserved for driver + Midireserved dd ? ; reserved for driver +MIDIHDR ends + +; flags for dwFlags field of MIDIHDR structure +MHDR_DONE equ 00000001h ; done bit +MHDR_PREPARED equ 00000002h ; set if header prepared +MHDR_INQUEUE equ 00000004h ; reserved for driver + +endif ;ifndef MMNOMIDI + + +ifndef MMNOAUX +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Auxiliary audio support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; device ID for aux device mapper +AUX_MAPPER equ (-1) + +; Auxiliary audio device capabilities structure +AUXCAPS struc + acaps_wMid dw ? ; manufacturer ID + acaps_wPid dw ? ; product ID + acaps_vDriverVersion dw ? ; version of the driver + acaps_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + acaps_wTechnology dw ? ; type of device + acaps_dwSupport dd ? ; functionality supported by driver +AUXCAPS ends + +; flags for wTechnology field in AUXCAPS structure +AUXCAPS_CDAUDIO equ 1 ; audio from internal CD-ROM drive +AUXCAPS_AUXIN equ 2 ; audio from auxiliary input jacks + +; flags for dwSupport field in AUXCAPS structure +AUXCAPS_VOLUME equ 0001h ; supports volume control +AUXCAPS_LRVOLUME equ 0002h ; separate left-right volume control + +endif ;ifndef MMNOAUX + + +ifndef MMNOTIMER +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Timer support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; timer error return values +TIMERR_NOERROR equ (0) ; no error +TIMERR_NOCANDO equ (TIMERR_BASE+1) ; request not completed +TIMERR_STRUCT equ (TIMERR_BASE+33) ; time struct size + +; flags for wFlags parameter of timeSetEvent() function +TIME_ONESHOT equ 0 ; program timer for single event +TIME_PERIODIC equ 1 ; program for continuous periodic event + +; timer device capabilities data structure +TIMECAPS struc + tc_wPeriodMin dw ? ; minimum period supported + tc_wPeriodMax dw ? ; maximum period supported +TIMECAPS ends + +endif ;ifndef MMNOTIMER + + +ifndef MMNOJOY +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Joystick support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; joystick error return values +JOYERR_NOERROR equ (0) ; no error +JOYERR_PARMS equ (JOYERR_BASE+5) ; bad parameters +JOYERR_NOCANDO equ (JOYERR_BASE+6) ; request not completed +JOYERR_UNPLUGGED equ (JOYERR_BASE+7) ; joystick is unplugged + +; constants used with JOYINFO structure and MM_JOY* messages +JOY_BUTTON1 equ 0001h +JOY_BUTTON2 equ 0002h +JOY_BUTTON3 equ 0004h +JOY_BUTTON4 equ 0008h +JOY_BUTTON1CHG equ 0100h +JOY_BUTTON2CHG equ 0200h +JOY_BUTTON3CHG equ 0400h +JOY_BUTTON4CHG equ 0800h + +; joystick ID constants +JOYSTICKID1 equ 0 +JOYSTICKID2 equ 1 + +; joystick device capabilities data structure +JOYCAPS struc + jcaps_wMid dw ? ; manufacturer ID + jcaps_wPid dw ? ; product ID + jcaps_szPname db MAXPNAMELEN dup (?) ; product name (NULL terminated string) + jcaps_wXmin dw ? ; minimum x position value + jcaps_wXmax dw ? ; maximum x position value + jcaps_wYmin dw ? ; minimum y position value + jcaps_wYmax dw ? ; maximum y position value + jcaps_wZmin dw ? ; minimum z position value + jcaps_wZmax dw ? ; maximum z position value + jcaps_wNumButtons dw ? ; number of buttons + jcaps_wPeriodMin dw ? ; minimum message period when captured + jcaps_wPeriodMax dw ? ; maximum message period when captured +JOYCAPS ends + +; joystick information data structure +JOYINFO struc + jinfo_wXpos dw ? ; x position + jinfo_wYpos dw ? ; y position + jinfo_wZpos dw ? ; z position + jinfo_wButtons dw ? ; button states +JOYINFO ends + +endif ;ifndef MMNOJOY + +ifndef MMNOMMIO +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; Multimedia File I/O support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MMIO error return values +MMIOERR_BASE equ 256 +MMIOERR_FILENOTFOUND equ (MMIOERR_BASE + 1) ; file not found +MMIOERR_OUTOFMEMORY equ (MMIOERR_BASE + 2) ; out of memory +MMIOERR_CANNOTOPEN equ (MMIOERR_BASE + 3) ; cannot open +MMIOERR_CANNOTCLOSE equ (MMIOERR_BASE + 4) ; cannot close +MMIOERR_CANNOTREAD equ (MMIOERR_BASE + 5) ; cannot read +MMIOERR_CANNOTWRITE equ (MMIOERR_BASE + 6) ; cannot write +MMIOERR_CANNOTSEEK equ (MMIOERR_BASE + 7) ; cannot seek +MMIOERR_CANNOTEXPAND equ (MMIOERR_BASE + 8) ; cannot expand file +MMIOERR_CHUNKNOTFOUND equ (MMIOERR_BASE + 9) ; chunk not found +MMIOERR_UNBUFFERED equ (MMIOERR_BASE + 10) ; file is unbuffered + +; MMIO constants +CFSEPCHAR equ '+' ; compound file name separator char. + +; general MMIO information data structure +MMIOINFO struc + ; general fields + mmio_dwFlags dd ? ; general status flags + mmio_fccIOProc dd ? ; pointer to I/O procedure + mmio_pIOProc dd ? ; pointer to I/O procedure + mmio_wErrorRet dw ? ; place for error to be returned + mmio_htask dw ? ; alternate local task + + ; fields maintained by MMIO functions during buffered I/O + mmio_cchBuffer dd ? ; size of I/O buffer (or 0L) + mmio_pchBuffer dd ? ; start of I/O buffer (or NULL) + mmio_pchNext dd ? ; pointer to next byte to read/write + mmio_pchEndRead dd ? ; pointer to last valid byte to read + mmio_pchEndWrite dd ? ; pointer to last byte to write + mmio_lBufOffset dd ? ; disk offset of start of buffer + + ; fields maintained by I/O procedure + mmio_lDiskOffset dd ? ; disk offset of next read or write + mmio_adwInfo dd 3 dup (?) ; data specific to type of MMIOPROC + + ; other fields maintained by MMIO + mmio_dwReserved1 dd ? ; reserved for MMIO use + mmio_dwReserved2 dd ? ; reserved for MMIO use + mmio_hmmio dw ? ; handle to open file +MMIOINFO ends + +; RIFF chunk information data structure +MMCKINFO struc + mmck_ckid dd ? ; chunk ID + mmck_cksize dd ? ; chunk size + mmck_fccType dd ? ; form type or list type + mmck_dwDataOffset dd ? ; offset of data portion of chunk + mmck_dwFlags dd ? ; flags used by MMIO functions +MMCKINFO ends + +; bit field masks +MMIO_RWMODE equ 00000003h ; open file for reading/writing/both +MMIO_SHAREMODE equ 00000070h ; file sharing mode number + +; constants for dwFlags field of MMIOINFO +MMIO_CREATE equ 00001000h ; create new file (or truncate file) +MMIO_PARSE equ 00000100h ; parse new file returning path +MMIO_DELETE equ 00000200h ; create new file (or truncate file) +MMIO_EXIST equ 00004000h ; checks for existence of file +MMIO_ALLOCBUF equ 00010000h ; mmioOpen() should allocate a buffer +MMIO_GETTEMP equ 00020000h ; mmioOpen() should retrieve temp name + +MMIO_DIRTY equ 10000000h ; I/O buffer is dirty + + +; read/write mode numbers (bit field MMIO_RWMODE) +MMIO_READ equ 00000000h ; open file for reading only +MMIO_WRITE equ 00000001h ; open file for writing only +MMIO_READWRITE equ 00000002h ; open file for reading and writing + +; share mode numbers (bit field MMIO_SHAREMODE) +MMIO_COMPAT equ 00000000h ; compatibility mode +MMIO_EXCLUSIVE equ 00000010h ; exclusive-access mode +MMIO_DENYWRITE equ 00000020h ; deny writing to other processes +MMIO_DENYREAD equ 00000030h ; deny reading to other processes +MMIO_DENYNONE equ 00000040h ; deny nothing to other processes + +; various MMIO flags +MMIO_FHOPEN equ 0010h ; mmioClose: keep file handle open +MMIO_EMPTYBUF equ 0010h ; mmioFlush: empty the I/O buffer +MMIO_TOUPPER equ 0010h ; mmioStringToFOURCC: to u-case +MMIO_INSTALLPROC equ 00010000h ; mmioInstallIOProc: install MMIOProc +MMIO_GLOBALPROC equ 10000000h ; mmioInstallIOProc: install globally +MMIO_REMOVEPROC equ 00020000h ; mmioInstallIOProc: remove MMIOProc +MMIO_FINDPROC equ 00040000h ; mmioInstallIOProc: find an MMIOProc +MMIO_FINDCHUNK equ 0010h ; mmioDescend: find a chunk by ID +MMIO_FINDRIFF equ 0020h ; mmioDescend: find a LIST chunk +MMIO_FINDLIST equ 0040h ; mmioDescend: find a RIFF chunk +MMIO_CREATERIFF equ 0020h ; mmioCreateChunk: make a LIST chunk +MMIO_CREATELIST equ 0040h ; mmioCreateChunk: make a RIFF chunk + + +; message numbers for MMIOPROC I/O procedure functions +MMIOM_READ equ MMIO_READ ; read +MMIOM_WRITE equ MMIO_WRITE ; write +MMIOM_SEEK equ 2 ; seek to a new position in file +MMIOM_OPEN equ 3 ; open file +MMIOM_CLOSE equ 4 ; close file +MMIOM_WRITEFLUSH equ 5 ; write and flush +MMIOM_RENAME equ 6 ; rename specified file +MMIOM_USER equ 8000h ; beginning of user-defined messages + +mmioFOURCC MACRO ch0,ch1,ch2,ch3 + mov al,ch0 + mov ah,ch1 + mov dl,ch2 + mov dh,ch3 + ENDM + +; standard four character codes +FOURCC_RIFF equ mmioFOURCC('R', 'I', 'F', 'F') +FOURCC_LIST equ mmioFOURCC('L', 'I', 'S', 'T') + +; four character codes used to identify standard built-in I/O procedures +FOURCC_DOS equ mmioFOURCC('D', 'O', 'S', ' ') +FOURCC_MEM equ mmioFOURCC('M', 'E', 'M', ' ') + +; flags for mmioSeek() +ifndef SEEK_SET +SEEK_SET equ 0 ; seek to an absolute position +SEEK_CUR equ 1 ; seek relative to current position +SEEK_END equ 2 ; seek relative to end of file +endif ;ifndef SEEK_SET + +; other constants +MMIO_DEFAULTBUFFER equ 8192 ; default buffer size + +endif ;ifndef MMNOMMIO + +ifndef MMNOMCI +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; MCI support +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; MCI error return values +MCIERR_INVALID_DEVICE_ID equ (MCIERR_BASE + 1) +MCIERR_UNRECOGNIZED_KEYWORD equ (MCIERR_BASE + 3) +MCIERR_UNRECOGNIZED_COMMAND equ (MCIERR_BASE + 5) +MCIERR_HARDWARE equ (MCIERR_BASE + 6) +MCIERR_INVALID_DEVICE_NAME equ (MCIERR_BASE + 7) +MCIERR_OUT_OF_MEMORY equ (MCIERR_BASE + 8) +MCIERR_DEVICE_OPEN equ (MCIERR_BASE + 9) +MCIERR_CANNOT_LOAD_DRIVER equ (MCIERR_BASE + 10) +MCIERR_MISSING_COMMAND_STRING equ (MCIERR_BASE + 11) +MCIERR_PARAM_OVERFLOW equ (MCIERR_BASE + 12) +MCIERR_MISSING_STRING_ARGUMENT equ (MCIERR_BASE + 13) +MCIERR_BAD_INTEGER equ (MCIERR_BASE + 14) +MCIERR_PARSER_INTERNAL equ (MCIERR_BASE + 15) +MCIERR_DRIVER_INTERNAL equ (MCIERR_BASE + 16) +MCIERR_MISSING_PARAMETER equ (MCIERR_BASE + 17) +MCIERR_UNSUPPORTED_FUNCTION equ (MCIERR_BASE + 18) +MCIERR_FILE_NOT_FOUND equ (MCIERR_BASE + 19) +MCIERR_DEVICE_NOT_READY equ (MCIERR_BASE + 20) +MCIERR_INTERNAL equ (MCIERR_BASE + 21) +MCIERR_DRIVER equ (MCIERR_BASE + 22) +MCIERR_CANNOT_USE_ALL equ (MCIERR_BASE + 23) +MCIERR_MULTIPLE equ (MCIERR_BASE + 24) +MCIERR_EXTENSION_NOT_FOUND equ (MCIERR_BASE + 25) +MCIERR_OUTOFRANGE equ (MCIERR_BASE + 26) +MCIERR_FLAGS_NOT_COMPATIBLE equ (MCIERR_BASE + 28) +MCIERR_FILE_NOT_SAVED equ (MCIERR_BASE + 30) +MCIERR_DEVICE_TYPE_REQUIRED equ (MCIERR_BASE + 31) +MCIERR_DEVICE_LOCKED equ (MCIERR_BASE + 32) +MCIERR_DUPLICATE_ALIAS equ (MCIERR_BASE + 33) +MCIERR_BAD_CONSTANT equ (MCIERR_BASE + 34) +MCIERR_MUST_USE_SHAREABLE equ (MCIERR_BASE + 35) +MCIERR_MISSING_DEVICE_NAME equ (MCIERR_BASE + 36) +MCIERR_BAD_TIME_FORMAT equ (MCIERR_BASE + 37) +MCIERR_NO_CLOSING_QUOTE equ (MCIERR_BASE + 38) +MCIERR_DUPLICATE_FLAGS equ (MCIERR_BASE + 39) +MCIERR_INVALID_FILE equ (MCIERR_BASE + 40) +MCIERR_NULL_PARAMETER_BLOCK equ (MCIERR_BASE + 41) +MCIERR_UNNAMED_RESOURCE equ (MCIERR_BASE + 42) +MCIERR_NEW_REQUIRES_ALIAS equ (MCIERR_BASE + 43) +MCIERR_NOTIFY_ON_AUTO_OPEN equ (MCIERR_BASE + 44) +MCIERR_NO_ELEMENT_ALLOWED equ (MCIERR_BASE + 45) +MCIERR_NONAPPLICABLE_FUNCTION equ (MCIERR_BASE + 46) +MCIERR_ILLEGAL_FOR_AUTO_OPEN equ (MCIERR_BASE + 47) +MCIERR_FILENAME_REQUIRED equ (MCIERR_BASE + 48) +MCIERR_EXTRA_CHARACTERS equ (MCIERR_BASE + 49) +MCIERR_DEVICE_NOT_INSTALLED equ (MCIERR_BASE + 50) +MCIERR_GET_CD equ (MCIERR_BASE + 51) +MCIERR_SET_CD equ (MCIERR_BASE + 52) +MCIERR_SET_DRIVE equ (MCIERR_BASE + 53) +MCIERR_DEVICE_LENGTH equ (MCIERR_BASE + 54) +MCIERR_DEVICE_ORD_LENGTH equ (MCIERR_BASE + 55) +MCIERR_NO_INTEGER equ (MCIERR_BASE + 56) + +MCIERR_WAVE_OUTPUTSINUSE equ (MCIERR_BASE + 64) +MCIERR_WAVE_SETOUTPUTINUSE equ (MCIERR_BASE + 65) +MCIERR_WAVE_INPUTSINUSE equ (MCIERR_BASE + 66) +MCIERR_WAVE_SETINPUTINUSE equ (MCIERR_BASE + 67) +MCIERR_WAVE_OUTPUTUNSPECIFIED equ (MCIERR_BASE + 68) +MCIERR_WAVE_INPUTUNSPECIFIED equ (MCIERR_BASE + 69) +MCIERR_WAVE_OUTPUTSUNSUITABLE equ (MCIERR_BASE + 70) +MCIERR_WAVE_SETOUTPUTUNSUITABLE equ (MCIERR_BASE + 71) +MCIERR_WAVE_INPUTSUNSUITABLE equ (MCIERR_BASE + 72) +MCIERR_WAVE_SETINPUTUNSUITABLE equ (MCIERR_BASE + 73) + +MCIERR_SEQ_DIV_INCOMPATIBLE equ (MCIERR_BASE + 80) +MCIERR_SEQ_PORT_INUSE equ (MCIERR_BASE + 81) +MCIERR_SEQ_PORT_NONEXISTENT equ (MCIERR_BASE + 82) +MCIERR_SEQ_PORT_MAPNODEVICE equ (MCIERR_BASE + 83) +MCIERR_SEQ_PORT_MISCERROR equ (MCIERR_BASE + 84) +MCIERR_SEQ_TIMER equ (MCIERR_BASE + 85) +MCIERR_SEQ_PORTUNSPECIFIED equ (MCIERR_BASE + 86) +MCIERR_SEQ_NOMIDIPRESENT equ (MCIERR_BASE + 87) + +MCIERR_NO_WINDOW equ (MCIERR_BASE + 90) +MCIERR_CREATEWINDOW equ (MCIERR_BASE + 91) +MCIERR_FILE_READ equ (MCIERR_BASE + 92) +MCIERR_FILE_WRITE equ (MCIERR_BASE + 93) + +; all custom device driver errors must be >= than this value +MCIERR_CUSTOM_DRIVER_BASE equ (MCIERR_BASE + 256) + +; MCI command message identifiers +MCI_OPEN equ 0803h +MCI_CLOSE equ 0804h +MCI_ESCAPE equ 0805h +MCI_PLAY equ 0806h +MCI_SEEK equ 0807h +MCI_STOP equ 0808h +MCI_PAUSE equ 0809h +MCI_INFO equ 080Ah +MCI_GETDEVCAPS equ 080Bh +MCI_SPIN equ 080Ch +MCI_SET equ 080Dh +MCI_STEP equ 080Eh +MCI_RECORD equ 080Fh +MCI_SYSINFO equ 0810h +MCI_BREAK equ 0811h +MCI_SOUND equ 0812h +MCI_SAVE equ 0813h +MCI_STATUS equ 0814h +MCI_CUE equ 0830h +MCI_REALIZE equ 0840h +MCI_WINDOW equ 0841h +MCI_PUT equ 0842h +MCI_WHERE equ 0843h +MCI_FREEZE equ 0844h +MCI_UNFREEZE equ 0845h +MCI_LOAD equ 0850h +MCI_CUT equ 0851h +MCI_COPY equ 0852h +MCI_PASTE equ 0853h +MCI_UPDATE equ 0854h +MCI_RESUME equ 0855h +MCI_DELETE equ 0856h + +; all custom MCI command messages must be >= than this value +MCI_USER_MESSAGES equ (400h + DRV_MCI_FIRST) + + +; device ID for "all devices" +MCI_ALL_DEVICE_ID equ 0FFFFh + +; constants for predefined MCI device types +MCI_DEVTYPE_VCR equ (MCI_STRING_OFFSET + 1) +MCI_DEVTYPE_VIDEODISC equ (MCI_STRING_OFFSET + 2) +MCI_DEVTYPE_OVERLAY equ (MCI_STRING_OFFSET + 3) +MCI_DEVTYPE_CD_AUDIO equ (MCI_STRING_OFFSET + 4) +MCI_DEVTYPE_DAT equ (MCI_STRING_OFFSET + 5) +MCI_DEVTYPE_SCANNER equ (MCI_STRING_OFFSET + 6) +MCI_DEVTYPE_ANIMATION equ (MCI_STRING_OFFSET + 7) +MCI_DEVTYPE_DIGITAL_VIDEO equ (MCI_STRING_OFFSET + 8) +MCI_DEVTYPE_OTHER equ (MCI_STRING_OFFSET + 9) +MCI_DEVTYPE_WAVEFORM_AUDIO equ (MCI_STRING_OFFSET + 10) +MCI_DEVTYPE_SEQUENCER equ (MCI_STRING_OFFSET + 11) + +MCI_DEVTYPE_FIRST equ MCI_DEVTYPE_VCR +MCI_DEVTYPE_LAST equ MCI_DEVTYPE_SEQUENCER + +; return values for 'status mode' command +MCI_MODE_NOT_READY equ (MCI_STRING_OFFSET + 12) +MCI_MODE_STOP equ (MCI_STRING_OFFSET + 13) +MCI_MODE_PLAY equ (MCI_STRING_OFFSET + 14) +MCI_MODE_RECORD equ (MCI_STRING_OFFSET + 15) +MCI_MODE_SEEK equ (MCI_STRING_OFFSET + 16) +MCI_MODE_PAUSE equ (MCI_STRING_OFFSET + 17) +MCI_MODE_OPEN equ (MCI_STRING_OFFSET + 18) + +; constants used in 'set time format' and 'status time format' commands +MCI_FORMAT_MILLISECONDS equ 0 +MCI_FORMAT_HMS equ 1 +MCI_FORMAT_MSF equ 2 +MCI_FORMAT_FRAMES equ 3 +MCI_FORMAT_SMPTE_24 equ 4 +MCI_FORMAT_SMPTE_25 equ 5 +MCI_FORMAT_SMPTE_30 equ 6 +MCI_FORMAT_SMPTE_30DROP equ 7 +MCI_FORMAT_BYTES equ 8 +MCI_FORMAT_SAMPLES equ 9 +MCI_FORMAT_TMSF equ 10 + +; flags for wParam of MM_MCINOTIFY message +MCI_NOTIFY_SUCCESSFUL equ 0001h +MCI_NOTIFY_SUPERSEDED equ 0002h +MCI_NOTIFY_ABORTED equ 0004h +MCI_NOTIFY_FAILURE equ 0008h + + +; common flags for dwFlags parameter of MCI command messages +MCI_NOTIFY equ 00000001h +MCI_WAIT equ 00000002h +MCI_FROM equ 00000004h +MCI_TO equ 00000008h +MCI_TRACK equ 00000010h + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_OPEN_SHAREABLE equ 00000100h +MCI_OPEN_ELEMENT equ 00000200h +MCI_OPEN_ALIAS equ 00000400h +MCI_OPEN_ELEMENT_ID equ 00000800h +MCI_OPEN_TYPE_ID equ 00001000h +MCI_OPEN_TYPE equ 00002000h + +; flags for dwFlags parameter of MCI_SEEK command message +MCI_SEEK_TO_START equ 00000100h +MCI_SEEK_TO_END equ 00000200h + +; flags for dwFlags parameter of MCI_STATUS command message +MCI_STATUS_ITEM equ 00000100h +MCI_STATUS_START equ 00000200h + +; flags for dwItem field of the MCI_STATUS_PARMS parameter block +MCI_STATUS_LENGTH equ 00000001h +MCI_STATUS_POSITION equ 00000002h +MCI_STATUS_NUMBER_OF_TRACKS equ 00000003h +MCI_STATUS_MODE equ 00000004h +MCI_STATUS_MEDIA_PRESENT equ 00000005h +MCI_STATUS_TIME_FORMAT equ 00000006h +MCI_STATUS_READY equ 00000007h +MCI_STATUS_CURRENT_TRACK equ 00000008h + +; flags for dwFlags parameter of MCI_INFO command message +MCI_INFO_PRODUCT equ 00000100h +MCI_INFO_FILE equ 00000200h + +; flags for dwFlags parameter of MCI_GETDEVCAPS command message +MCI_GETDEVCAPS_ITEM equ 00000100h + +; flags for dwItem field of the MCI_GETDEVCAPS_PARMS parameter block +MCI_GETDEVCAPS_CAN_RECORD equ 00000001h +MCI_GETDEVCAPS_HAS_AUDIO equ 00000002h +MCI_GETDEVCAPS_HAS_VIDEO equ 00000003h +MCI_GETDEVCAPS_DEVICE_TYPE equ 00000004h +MCI_GETDEVCAPS_USES_FILES equ 00000005h +MCI_GETDEVCAPS_COMPOUND_DEVICE equ 00000006h +MCI_GETDEVCAPS_CAN_EJECT equ 00000007h +MCI_GETDEVCAPS_CAN_PLAY equ 00000008h +MCI_GETDEVCAPS_CAN_SAVE equ 00000009h + +; flags for dwFlags parameter of MCI_SYSINFO command message +MCI_SYSINFO_QUANTITY equ 00000100h +MCI_SYSINFO_OPEN equ 00000200h +MCI_SYSINFO_NAME equ 00000400h +MCI_SYSINFO_INSTALLNAME equ 00000800h + +; flags for dwFlags parameter of MCI_SET command message +MCI_SET_DOOR_OPEN equ 00000100h +MCI_SET_DOOR_CLOSED equ 00000200h +MCI_SET_TIME_FORMAT equ 00000400h +MCI_SET_AUDIO equ 00000800h +MCI_SET_VIDEO equ 00001000h +MCI_SET_ON equ 00002000h +MCI_SET_OFF equ 00004000h + +; flags for dwAudio field of MCI_SET_PARMS or MCI_SEQ_SET_PARMS +MCI_SET_AUDIO_ALL equ 00000000h +MCI_SET_AUDIO_LEFT equ 00000001h +MCI_SET_AUDIO_RIGHT equ 00000002h + +; flags for dwFlags parameter of MCI_BREAK command message +MCI_BREAK_KEY equ 00000100h +MCI_BREAK_HWND equ 00000200h +MCI_BREAK_OFF equ 00000400h + +; flags for dwFlags parameter of MCI_RECORD command message +MCI_RECORD_INSERT equ 00000100h +MCI_RECORD_OVERWRITE equ 00000200h + +; flags for dwFlags parameter of MCI_SOUND command message +MCI_SOUND_NAME equ 00000100h + +; flags for dwFlags parameter of MCI_SAVE command message +MCI_SAVE_FILE equ 00000100h + +; flags for dwFlags parameter of MCI_LOAD command message +MCI_LOAD_FILE equ 00000100h + +; generic parameter block for MCI command messages with no special parameters +MCI_GENERIC_PARMS struc + mcigen_dwCallback dd ? +MCI_GENERIC_PARMS ends + +; parameter block for MCI_OPEN command message +MCI_OPEN_PARMS struc + mciopen_dwCallback dd ? + mciopen_wDeviceID dw ? + mciopen_wReserved0 dw ? + mciopen_lpstrDeviceType dd ? + mciopen_lpstrElementName dd ? + mciopen_lpstrAlias dd ? +MCI_OPEN_PARMS ends + +; parameter block for MCI_PLAY command message +MCI_PLAY_PARMS struc + mciplay_dwCallback dd ? + mciplay_dwFrom dd ? + mciplay_dwTo dd ? +MCI_PLAY_PARMS ends + +; parameter block for MCI_SEEK command message +MCI_SEEK_PARMS struc + mciseek_dwCallback dd ? + mciseek_dwTo dd ? +MCI_SEEK_PARMS ends + +; parameter block for MCI_STATUS command message +MCI_STATUS_PARMS struc + mcistat_dwCallback dd ? + mcistat_dwReturn dd ? + mcistat_dwItem dd ? + mcistat_dwTrack dd ? +MCI_STATUS_PARMS ends + +; parameter block for MCI_INFO command message +MCI_INFO_PARMS struc + mciinfo_dwCallback dd ? + mciinfo_lpstrReturn dd ? + mciinfo_dwRetSize dd ? +MCI_INFO_PARMS ends + +; parameter block for MCI_GETDEVCAPS command message +MCI_GETDEVCAPS_PARMS struc + mcigdc_dwCallback dd ? + mcigdc_dwReturn dd ? + mcigdc_dwItem dd ? +MCI_GETDEVCAPS_PARMS ends + +; parameter block for MCI_SYSINFO command message +MCI_SYSINFO_PARMS struc + mcisi_dwCallback dd ? + mcisi_lpstrReturn dd ? + mcisi_dwRetSize dd ? + mcisi_dwNumber dd ? + mcisi_wDeviceType dw ? + mcisi_wReserved0 dw ? +MCI_SYSINFO_PARMS ends + +; parameter block for MCI_SET command message +MCI_SET_PARMS struc + mciset_dwCallback dd ? + mciset_dwTimeFormat dd ? + mciset_dwAudio dd ? +MCI_SET_PARMS ends + +; parameter block for MCI_BREAK command message +MCI_BREAK_PARMS struc + mcibreak_dwCallback dd ? + mcibreak_nVirtKey dw ? + mcibreak_wReserved0 dw ? + mcibreak_hwndBreak dw ? + mcibreak_wReserved1 dw ? +MCI_BREAK_PARMS ends + +; parameter block for MCI_SOUND command message +MCI_SOUND_PARMS struc + mcisnd_dwCallback dd ? + mcisnd_lpstrSoundName dd ? +MCI_SOUND_PARMS ends + +; parameter block for MCI_SAVE command message +MCI_SAVE_PARMS struc + mcisave_dwCallback dd ? + mcisave_lpfilename dd ? +MCI_SAVE_PARMS ends + +; parameter block for MCI_LOAD command message +MCI_LOAD_PARMS struc + mciload_dwCallback dd ? + mciload_lpfilename dd ? +MCI_LOAD_PARMS ends + +; parameter block for MCI_RECORD command message +MCI_RECORD_PARMS struc + mcirec_dwCallback dd ? + mcirec_dwFrom dd ? + mcirec_dwTo dd ? +MCI_RECORD_PARMS ends + + +; +; MCI extensions for videodisc devices +; + +; flag for dwReturn field of MCI_STATUS_PARMS +; MCI_STATUS command, (dwItem == MCI_STATUS_MODE) +MCI_VD_MODE_PARK equ (MCI_VD_OFFSET + 1) + +; flag for dwReturn field of MCI_STATUS_PARMS +; MCI_STATUS command, (dwItem == MCI_VD_STATUS_MEDIA_TYPE) +MCI_VD_MEDIA_CLV equ (MCI_VD_OFFSET + 2) +MCI_VD_MEDIA_CAV equ (MCI_VD_OFFSET + 3) +MCI_VD_MEDIA_OTHER equ (MCI_VD_OFFSET + 4) + +MCI_VD_FORMAT_TRACK equ 4001h + +; flags for dwFlags parameter of MCI_PLAY command message +MCI_VD_PLAY_REVERSE equ 00010000h +MCI_VD_PLAY_FAST equ 00020000h +MCI_VD_PLAY_SPEED equ 00040000h +MCI_VD_PLAY_SCAN equ 00080000h +MCI_VD_PLAY_SLOW equ 00100000h + +; flag for dwFlags parameter of MCI_SEEK command message +MCI_VD_SEEK_REVERSE equ 00010000h + +; flags for dwItem field of MCI_STATUS_PARMS parameter block +MCI_VD_STATUS_SPEED equ 00004002h +MCI_VD_STATUS_FORWARD equ 00004003h +MCI_VD_STATUS_MEDIA_TYPE equ 00004004h +MCI_VD_STATUS_SIDE equ 00004005h +MCI_VD_STATUS_DISC_SIZE equ 00004006h + +; flags for dwFlags parameter of MCI_GETDEVCAPS command message +MCI_VD_GETDEVCAPS_CLV equ 00010000h +MCI_VD_GETDEVCAPS_CAV equ 00020000h + +MCI_VD_SPIN_UP equ 0001h +MCI_VD_SPIN_DOWN equ 0002h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_VD_GETDEVCAPS_CAN_REVERSE equ 00004002h +MCI_VD_GETDEVCAPS_FAST_RATE equ 00004003h +MCI_VD_GETDEVCAPS_SLOW_RATE equ 00004004h +MCI_VD_GETDEVCAPS_NORMAL_RATE equ 00004005h + +; flags for the dwFlags parameter of MCI_STEP command message +MCI_VD_STEP_FRAMES equ 00010000h +MCI_VD_STEP_REVERSE equ 00020000h + +; flag for the MCI_ESCAPE command message +MCI_VD_ESCAPE_STRING equ 00000100h + +; parameter block for MCI_PLAY command message +MCI_VD_PLAY_PARMS struc + mcivdplay_dwCallback dd ? + mcivdplay_dwFrom dd ? + mcivdplay_dwTo dd ? + mcivdplay_dwSpeed dd ? +MCI_VD_PLAY_PARMS ends + +; parameter block for MCI_STEP command message +MCI_VD_STEP_PARMS struc + mcivdstep_dwCallback dd ? + mcivdstep_dwFrames dd ? +MCI_VD_STEP_PARMS ends + +; parameter block for MCI_ESCAPE command message +MCI_VD_ESCAPE_PARMS struc + mcivcesc_dwCallback dd ? + mcivcesc_lpstrCommand dd ? +MCI_VD_ESCAPE_PARMS ends + + +; +; MCI extensions for waveform audio devices +; + +; flags for the dwFlags parameter of MCI_OPEN command message +MCI_WAVE_OPEN_BUFFER equ 00010000h + +; flags for the dwFlags parameter of MCI_SET command message +MCI_WAVE_SET_FORMATTAG equ 00010000h +MCI_WAVE_SET_CHANNELS equ 00020000h +MCI_WAVE_SET_SAMPLESPERSEC equ 00040000h +MCI_WAVE_SET_AVGBYTESPERSEC equ 00080000h +MCI_WAVE_SET_BLOCKALIGN equ 00100000h +MCI_WAVE_SET_BITSPERSAMPLE equ 00200000h + +; flags for the dwFlags parameter of MCI_STATUS, MCI_SET command messages +MCI_WAVE_INPUT equ 00400000h +MCI_WAVE_OUTPUT equ 00800000h + +; flags for the dwItem field of MCI_STATUS_PARMS parameter block +MCI_WAVE_STATUS_FORMATTAG equ 00004001h +MCI_WAVE_STATUS_CHANNELS equ 00004002h +MCI_WAVE_STATUS_SAMPLESPERSEC equ 00004003h +MCI_WAVE_STATUS_AVGBYTESPERSEC equ 00004004h +MCI_WAVE_STATUS_BLOCKALIGN equ 00004005h +MCI_WAVE_STATUS_BITSPERSAMPLE equ 00004006h +MCI_WAVE_STATUS_LEVEL equ 00004007h + +; flags for the dwFlags parameter of MCI_SET command message +MCI_WAVE_SET_ANYINPUT equ 04000000h +MCI_WAVE_SET_ANYOUTPUT equ 08000000h + +; flags for the dwFlags parameter of MCI_GETDEVCAPS command message +MCI_WAVE_GETDEVCAPS_INPUTS equ 00004001h +MCI_WAVE_GETDEVCAPS_OUTPUTS equ 00004002h + +; parameter block for MCI_OPEN command message +MCI_WAVE_OPEN_PARMS struc + mciwopen_dwCallback dd ? + mciwopen_wDeviceID dw ? + mciwopen_wReserved0 dw ? + mciwopen_lpstrDeviceType dd ? + mciwopen_lpstrElementName dd ? + mciwopen_lpstrAlias dd ? + mciwopen_dwBufferSeconds dd ? +MCI_WAVE_OPEN_PARMS ends + +; parameter block for MCI_DELETE command message +MCI_WAVE_DELETE_PARMS struc + mciwdel_dwCallback dd ? + mciwdel_dwFrom dd ? + mciwdel_dwTo dd ? +MCI_WAVE_DELETE_PARMS ends + +; parameter block for MCI_SET command message +MCI_WAVE_SET_PARMS struc + mciwset_dwCallback dd ? + mciwset_dwTimeFormat dd ? + mciwset_dwAudio dd ? + mciwset_wInput dw ? + mciwset_wReserved0 dw ? + mciwset_wOutput dw ? + mciwset_wReserved1 dw ? + mciwset_wFormatTag dw ? + mciwset_wReserved2 dw ? + mciwset_nChannels dw ? + mciwset_wReserved3 dw ? + mciwset_nSamplesPerSec dw ? + mciwset_nAvgBytesPerSec dw ? + mciwset_nBlockAlign dw ? + mciwset_wReserved4 dw ? + mciwset_wBitsPerSample dw ? + mciwset_wReserved5 dw ? +MCI_WAVE_SET_PARMS ends + + +; +; MCI extensions for MIDI sequencer devices +; + +; flags for the dwReturn field of MCI_STATUS_PARMS parameter block +; MCI_STATUS command, (dwItem == MCI_SEQ_STATUS_DIVTYPE) +MCI_SEQ_DIV_PPQN equ (0 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_24 equ (1 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_25 equ (2 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_30DROP equ (3 + MCI_SEQ_OFFSET) +MCI_SEQ_DIV_SMPTE_30 equ (4 + MCI_SEQ_OFFSET) + +; flags for the dwMaster field of MCI_SEQ_SET_PARMS parameter block +; MCI_SET command, (dwFlags == MCI_SEQ_SET_MASTER) +MCI_SEQ_FORMAT_SONGPTR equ 4001h +MCI_SEQ_FILE equ 4002h +MCI_SEQ_MIDI equ 4003h +MCI_SEQ_SMPTE equ 4004h +MCI_SEQ_NONE equ 65533 + +; flags for the dwItem field of MCI_STATUS_PARMS parameter block +MCI_SEQ_STATUS_TEMPO equ 00004002h +MCI_SEQ_STATUS_PORT equ 00004003h +MCI_SEQ_STATUS_SLAVE equ 00004007h +MCI_SEQ_STATUS_MASTER equ 00004008h +MCI_SEQ_STATUS_OFFSET equ 00004009h +MCI_SEQ_STATUS_DIVTYPE equ 0000400Ah + +; flags for the dwFlags parameter of MCI_SET command message +MCI_SEQ_SET_TEMPO equ 00010000h +MCI_SEQ_SET_PORT equ 00020000h +MCI_SEQ_SET_SLAVE equ 00040000h +MCI_SEQ_SET_MASTER equ 00080000h +MCI_SEQ_SET_OFFSET equ 01000000h + +; parameter block for MCI_SET command message +MCI_SEQ_SET_PARMS struc + mcisset_dwCallback dd ? + mcisset_dwTimeFormat dd ? + mcisset_dwAudio dd ? + mcisset_dwTempo dd ? + mcisset_dwPort dd ? + mcisset_dwSlave dd ? + mcisset_dwMaster dd ? + mcisset_dwOffset dd ? +MCI_SEQ_SET_PARMS ends + + +; +; MCI extensions for animation devices +; + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_ANIM_OPEN_WS equ 00010000h +MCI_ANIM_OPEN_PARENT equ 00020000h +MCI_ANIM_OPEN_NOSTATIC equ 00040000h + +; flags for dwFlags parameter of MCI_PLAY command message +MCI_ANIM_PLAY_SPEED equ 00010000h +MCI_ANIM_PLAY_REVERSE equ 00020000h +MCI_ANIM_PLAY_FAST equ 00040000h +MCI_ANIM_PLAY_SLOW equ 00080000h +MCI_ANIM_PLAY_SCAN equ 00100000h + +; flags for dwFlags parameter of MCI_STEP command message +MCI_ANIM_STEP_REVERSE equ 00010000h +MCI_ANIM_STEP_FRAMES equ 00020000h + +; flags for dwItem field of MCI_STATUS_PARMS parameter block +MCI_ANIM_STATUS_SPEED equ 00004001h +MCI_ANIM_STATUS_FORWARD equ 00004002h +MCI_ANIM_STATUS_HWND equ 00004003h +MCI_ANIM_STATUS_HPAL equ 00004004h +MCI_ANIM_STATUS_STRETCH equ 00004005h + +; flags for the dwFlags parameter of MCI_INFO command message +MCI_ANIM_INFO_TEXT equ 00010000h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_ANIM_GETDEVCAPS_CAN_REVERSE equ 00004001h +MCI_ANIM_GETDEVCAPS_FAST_RATE equ 00004002h +MCI_ANIM_GETDEVCAPS_SLOW_RATE equ 00004003h +MCI_ANIM_GETDEVCAPS_NORMAL_RATE equ 00004004h +MCI_ANIM_GETDEVCAPS_PALETTES equ 00004006h +MCI_ANIM_GETDEVCAPS_CAN_STRETCH equ 00004007h +MCI_ANIM_GETDEVCAPS_MAX_WINDOWS equ 00004008h + +; flags for the MCI_REALIZE command message +MCI_ANIM_REALIZE_NORM equ 00010000h +MCI_ANIM_REALIZE_BKGD equ 00020000h + +; flags for dwFlags parameter of MCI_WINDOW command message +MCI_ANIM_WINDOW_HWND equ 00010000h +MCI_ANIM_WINDOW_STATE equ 00040000h +MCI_ANIM_WINDOW_TEXT equ 00080000h +MCI_ANIM_WINDOW_ENABLE_STRETCH equ 00100000h +MCI_ANIM_WINDOW_DISABLE_STRETCH equ 00200000h + +; flags for hWnd field of MCI_ANIM_WINDOW_PARMS parameter block +; MCI_WINDOW command message, (dwFlags == MCI_ANIM_WINDOW_HWND) +MCI_ANIM_WINDOW_DEFAULT equ 00000000h + +; flags for dwFlags parameter of MCI_PUT command message +MCI_ANIM_RECT equ 00010000h +MCI_ANIM_PUT_SOURCE equ 00020000h +MCI_ANIM_PUT_DESTINATION equ 00040000h + +; flags for dwFlags parameter of MCI_WHERE command message +MCI_ANIM_WHERE_SOURCE equ 00020000h +MCI_ANIM_WHERE_DESTINATION equ 00040000h + +; flags for dwFlags parameter of MCI_UPDATE command message +MCI_ANIM_UPDATE_HDC equ 00020000h + +; parameter block for MCI_OPEN command message +MCI_ANIM_OPEN_PARMS struc + mciaopen_dwCallback dd ? + mciaopen_wDeviceID dw ? + mciaopen_wReserved0 dw ? + mciaopen_lpstrDeviceType dd ? + mciaopen_lpstrElementName dd ? + mciaopen_lpstrAlias dd ? + mciaopen_dwStyle dd ? + mciaopen_hWndParent dw ? + mciaopen_wReserved1 dw ? +MCI_ANIM_OPEN_PARMS ends + +; parameter block for MCI_PLAY command message +MCI_ANIM_PLAY_PARMS struc + mciaplay_dwCallback dd ? + mciaplay_dwFrom dd ? + mciaplay_dwTo dd ? + mciaplay_dwSpeed dd ? +MCI_ANIM_PLAY_PARMS ends + +; parameter block for MCI_STEP command message +MCI_ANIM_STEP_PARMS struc + mciastep_dwCallback dd ? + mciastep_dwFrames dd ? +MCI_ANIM_STEP_PARMS ends + +; parameter block for MCI_WINDOW command message +MCI_ANIM_WINDOW_PARMS struc + mciawin_dwCallback dd ? + mciawin_hWnd dw ? + mciawin_wReserved1 dw ? + mciawin_nCmdShow dw ? + mciawin_wReserved2 dw ? + mciawin_lpstrText dd ? +MCI_ANIM_WINDOW_PARMS ends + +; parameter block for MCI_PUT, MCI_UPDATE, MCI_WHERE command messages +MCI_ANIM_RECT_PARMS struc + mciarect_dwCallback dd ? +ifdef MCI_USE_OFFEXT + mciarect_ptOffset db (SIZE POINT) dup (?) + mciarect_ptExtent db (SIZE POINT) dup (?) +else ;ifdef MCI_USE_OFFEXT + mciarect_rc db (SIZE RECT) dup (?) +endif ;ifdef MCI_USE_OFFEXT +MCI_ANIM_RECT_PARMS ends + +; parameter block for MCI_UPDATE PARMS +MCI_ANIM_UPDATE_PARMS struc + mciaupd_dwCallback dd ? + mciaupd_rc db (SIZE RECT) dup (?) + mciaupd_hDC dw ? +MCI_ANIM_UPDATE_PARMS ends + + +; +; MCI extensions for video overlay devices +; + +; flags for dwFlags parameter of MCI_OPEN command message +MCI_OVLY_OPEN_WS equ 00010000h +MCI_OVLY_OPEN_PARENT equ 00020000h + +; flags for dwFlags parameter of MCI_STATUS command message +MCI_OVLY_STATUS_HWND equ 00004001h +MCI_OVLY_STATUS_STRETCH equ 00004002h + +; flags for dwFlags parameter of MCI_INFO command message +MCI_OVLY_INFO_TEXT equ 00010000h + +; flags for dwItem field of MCI_GETDEVCAPS_PARMS parameter block +MCI_OVLY_GETDEVCAPS_CAN_STRETCH equ 00004001h +MCI_OVLY_GETDEVCAPS_CAN_FREEZE equ 00004002h +MCI_OVLY_GETDEVCAPS_MAX_WINDOWS equ 00004003h + +; flags for dwFlags parameter of MCI_WINDOW command message +MCI_OVLY_WINDOW_HWND equ 00010000h +MCI_OVLY_WINDOW_STATE equ 00040000h +MCI_OVLY_WINDOW_TEXT equ 00080000h +MCI_OVLY_WINDOW_ENABLE_STRETCH equ 00100000h +MCI_OVLY_WINDOW_DISABLE_STRETCH equ 00200000h + +; flags for hWnd parameter of MCI_OVLY_WINDOW_PARMS parameter block +MCI_OVLY_WINDOW_DEFAULT equ 00000000h + +; flags for dwFlags parameter of MCI_PUT command message +MCI_OVLY_RECT equ 00010000h +MCI_OVLY_PUT_SOURCE equ 00020000h +MCI_OVLY_PUT_DESTINATION equ 00040000h +MCI_OVLY_PUT_FRAME equ 00080000h +MCI_OVLY_PUT_VIDEO equ 00100000h + +; flags for dwFlags parameter of MCI_WHERE command message +MCI_OVLY_WHERE_SOURCE equ 00020000h +MCI_OVLY_WHERE_DESTINATION equ 00040000h +MCI_OVLY_WHERE_FRAME equ 00080000h +MCI_OVLY_WHERE_VIDEO equ 00100000h + +; parameter block for MCI_OPEN command message +MCI_OVLY_OPEN_PARMS struc + mcioopen_dwCallback dd ? + mcioopen_wDeviceID dw ? + mcioopen_wReserved0 dw ? + mcioopen_lpstrDeviceType dd ? + mcioopen_lpstrElementName dd ? + mcioopen_lpstrAlias dd ? + mcioopen_dwStyle dd ? + mcioopen_hWndParent dw ? + mcioopen_wReserved1 dw ? +MCI_OVLY_OPEN_PARMS ends + +; parameter block for MCI_WINDOW command message +MCI_OVLY_WINDOW_PARMS struc + mciowin_dwCallback dd ? + mciowin_hWnd dw ? + mciowin_wReserved1 dw ? + mciowin_nCmdShow dw ? + mciowin_wReserved2 dw ? + mciowin_lpstrText dd ? +MCI_OVLY_WINDOW_PARMS ends + +; parameter block for MCI_PUT, MCI_UPDATE, and MCI_WHERE command messages +MCI_OVLY_RECT_PARMS struc + mciorect_dwCallback dd ? +ifdef MCI_USE_OFFEXT + mciorect_ptOffset db (SIZE POINT) dup (?) + mciorect_ptExtent db (SIZE POINT) dup (?) +else ;ifdef MCI_USE_OFFEXT + mciorect_rc db (SIZE RECT) dup (?) +endif ;ifdef MCI_USE_OFFEXT +MCI_OVLY_RECT_PARMS ends + +; parameter block for MCI_SAVE command message +MCI_OVLY_SAVE_PARMS struc + mciosave_dwCallback dd ? + mciosave_lpfilename dd ? + mciosave_rc db (SIZE RECT) dup (?) +MCI_OVLY_SAVE_PARMS ends + +; parameter block for MCI_LOAD command message +MCI_OVLY_LOAD_PARMS struc + mcioload_dwCallback dd ? + mcioload_lpfilename dd ? + mcioload_rc db (SIZE RECT) dup (?) +MCI_OVLY_LOAD_PARMS ends + +endif ;ifndef MMNOMCI + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; DISPLAY Driver extensions +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +ifndef C1_TRANSPARENT + CAPS1 equ 94 ; other caps + C1_TRANSPARENT equ 0001h ; new raster cap + NEWTRANSPARENT equ 3 ; use with SetBkMode() + + QUERYROPSUPPORT equ 40 ; use to determine ROP support +endif ;ifndef C1_TRANSPARENT + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; DIB Driver extensions +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +SELECTDIB equ 41 ; DIB.DRV select dib escape +DIBINDEX MACRO a + mov ax,a + mov dx,10ffh + ENDM + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; +; ScreenSaver support +; +; The current application will receive a syscommand of SC_SCREENSAVE just +; before the screen saver is invoked. If the app wishes to prevent a +; screen save, return non-zero value, otherwise call DefWindowProc(). +; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +ifndef SC_SCREENSAVE + + SC_SCREENSAVE equ 0F140h + +endif ;ifndef SC_SCREENSAVE diff --git a/private/oleauto/tools/win16/hdos/c800/include/new.h b/private/oleauto/tools/win16/hdos/c800/include/new.h new file mode 100644 index 000000000..408e34a0b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/new.h @@ -0,0 +1,48 @@ +/*** +*new.h - declarations and definitions for C++ memory allocation functions +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for C++ memory allocation functions. +* +****/ + +#ifndef _INC_NEW + +#ifdef __cplusplus + + +/* constants for based heap routines */ + +#define _NULLSEG ((__segment)0) +#define _NULLOFF ((void __based(void) *)0xffff) + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +typedef int (__cdecl * _PNH)( size_t ); +typedef int (__cdecl * _PNHH)( unsigned long, size_t ); +typedef int (__cdecl * _PNHB)( __segment, size_t ); + +/* function prototypes */ + +_PNH __cdecl _set_new_handler( _PNH ); +_PNH __cdecl _set_nnew_handler( _PNH ); +_PNH __cdecl _set_fnew_handler( _PNH ); +_PNHH __cdecl _set_hnew_handler( _PNHH ); +_PNHB __cdecl _set_bnew_handler( _PNHB ); + +#else + +/* handler functions only supported in C++, emit appropriate error */ +#error Functions declared in new.h can only be used in C++ source + +#endif + +#define _INC_NEW +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ole.h b/private/oleauto/tools/win16/hdos/c800/include/ole.h new file mode 100644 index 000000000..37bcf9cad --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ole.h @@ -0,0 +1,504 @@ +/*****************************************************************************\ +* * +* ole.h - Object Linking and Embedding functions, types, and definitions* +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1990-1992, Microsoft Corp. All rights reserved.* +* * +\*****************************************************************************/ + +#ifndef _INC_OLE +#define _INC_OLE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef WINAPI /* If not included with 3.1 headers... */ +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + +#ifdef STRICT +#define OLE_LPCSTR LPCSTR +#define OLE_CONST const +#else /* STRICT */ +#define OLE_LPCSTR LPSTR +#define OLE_CONST +#endif /* !STRICT */ + + +/* Object types */ +#define OT_LINK 1L +#define OT_EMBEDDED 2L +#define OT_STATIC 3L + +/* activate verbs */ +#define OLEVERB_PRIMARY 0 + +/* target device info structure */ +typedef struct _OLETARGETDEVICE +{ + UINT otdDeviceNameOffset; + UINT otdDriverNameOffset; + UINT otdPortNameOffset; + UINT otdExtDevmodeOffset; + UINT otdExtDevmodeSize; + UINT otdEnvironmentOffset; + UINT otdEnvironmentSize; + BYTE otdData[1]; +} OLETARGETDEVICE; +typedef OLETARGETDEVICE FAR* LPOLETARGETDEVICE; + +/* flags used in some methods */ +#define OF_SET 0x0001 +#define OF_GET 0x0002 +#define OF_HANDLER 0x0004 + +/* return codes for OLE functions */ +typedef enum +{ + OLE_OK, /* 0 Function operated correctly */ + + OLE_WAIT_FOR_RELEASE, /* 1 Command has been initiated, client */ + /* must wait for release. keep dispatching */ + /* messages till OLE_RELESE in callback */ + + OLE_BUSY, /* 2 Tried to execute a method while another */ + /* method is in progress. */ + + OLE_ERROR_PROTECT_ONLY, /* 3 Ole APIs are called in real mode */ + OLE_ERROR_MEMORY, /* 4 Could not alloc or lock memory */ + OLE_ERROR_STREAM, /* 5 (OLESTREAM) stream error */ + OLE_ERROR_STATIC, /* 6 Non static object expected */ + OLE_ERROR_BLANK, /* 7 Critical data missing */ + OLE_ERROR_DRAW, /* 8 Error while drawing */ + OLE_ERROR_METAFILE, /* 9 Invalid metafile */ + OLE_ERROR_ABORT, /* 10 Client chose to abort metafile drawing */ + OLE_ERROR_CLIPBOARD, /* 11 Failed to get/set clipboard data */ + OLE_ERROR_FORMAT, /* 12 Requested format is not available */ + OLE_ERROR_OBJECT, /* 13 Not a valid object */ + OLE_ERROR_OPTION, /* 14 Invalid option(link update / render) */ + OLE_ERROR_PROTOCOL, /* 15 Invalid protocol */ + OLE_ERROR_ADDRESS, /* 16 One of the pointers is invalid */ + OLE_ERROR_NOT_EQUAL, /* 17 Objects are not equal */ + OLE_ERROR_HANDLE, /* 18 Invalid handle encountered */ + OLE_ERROR_GENERIC, /* 19 Some general error */ + OLE_ERROR_CLASS, /* 20 Invalid class */ + OLE_ERROR_SYNTAX, /* 21 Command syntax is invalid */ + OLE_ERROR_DATATYPE, /* 22 Data format is not supported */ + OLE_ERROR_PALETTE, /* 23 Invalid color palette */ + OLE_ERROR_NOT_LINK, /* 24 Not a linked object */ + OLE_ERROR_NOT_EMPTY, /* 25 Client doc contains objects. */ + OLE_ERROR_SIZE, /* 26 Incorrect buffer size passed to the api */ + /* that places some string in caller's */ + /* buffer */ + + OLE_ERROR_DRIVE, /* 27 Drive letter in doc name is invalid */ + OLE_ERROR_NETWORK, /* 28 Failed to establish connection to a */ + /* network share on which the document */ + /* is located */ + + OLE_ERROR_NAME, /* 29 Invalid name(doc name, object name), */ + /* etc.. passed to the APIs */ + + OLE_ERROR_TEMPLATE, /* 30 Server failed to load template */ + OLE_ERROR_NEW, /* 31 Server failed to create new doc */ + OLE_ERROR_EDIT, /* 32 Server failed to create embedded */ + /* instance */ + OLE_ERROR_OPEN, /* 33 Server failed to open document, */ + /* possible invalid link */ + + OLE_ERROR_NOT_OPEN, /* 34 Object is not open for editing */ + OLE_ERROR_LAUNCH, /* 35 Failed to launch server */ + OLE_ERROR_COMM, /* 36 Failed to communicate with server */ + OLE_ERROR_TERMINATE, /* 37 Error in termination */ + OLE_ERROR_COMMAND, /* 38 Error in execute */ + OLE_ERROR_SHOW, /* 39 Error in show */ + OLE_ERROR_DOVERB, /* 40 Error in sending do verb, or invalid */ + /* verb */ + OLE_ERROR_ADVISE_NATIVE, /* 41 Item could be missing */ + OLE_ERROR_ADVISE_PICT, /* 42 Item could be missing or server doesn't */ + /* this format. */ + + OLE_ERROR_ADVISE_RENAME, /* 43 Server doesn't support rename */ + OLE_ERROR_POKE_NATIVE, /* 44 Failure of poking native data to server */ + OLE_ERROR_REQUEST_NATIVE, /* 45 Server failed to render native data */ + OLE_ERROR_REQUEST_PICT, /* 46 Server failed to render presentation */ + /* data */ + OLE_ERROR_SERVER_BLOCKED, /* 47 Trying to block a blocked server or */ + /* trying to revoke a blocked server */ + /* or document */ + + OLE_ERROR_REGISTRATION, /* 48 Server is not registered in regestation */ + /* data base */ + OLE_ERROR_ALREADY_REGISTERED,/*49 Trying to register same doc multiple */ + /* times */ + OLE_ERROR_TASK, /* 50 Server or client task is invalid */ + OLE_ERROR_OUTOFDATE, /* 51 Object is out of date */ + OLE_ERROR_CANT_UPDATE_CLIENT,/* 52 Embed doc's client doesn't accept */ + /* updates */ + OLE_ERROR_UPDATE, /* 53 erorr while trying to update */ + OLE_ERROR_SETDATA_FORMAT, /* 54 Server app doesn't understand the */ + /* format given to its SetData method */ + OLE_ERROR_STATIC_FROM_OTHER_OS,/* 55 trying to load a static object created */ + /* on another Operating System */ + + /* Following are warnings */ + OLE_WARN_DELETE_DATA = 1000 /* Caller must delete the data when he is */ + /* done with it. */ +} OLESTATUS; + + + +/* Codes for CallBack events */ +typedef enum +{ + OLE_CHANGED, /* 0 */ + OLE_SAVED, /* 1 */ + OLE_CLOSED, /* 2 */ + OLE_RENAMED, /* 3 */ + OLE_QUERY_PAINT, /* 4 Interruptible paint support */ + OLE_RELEASE, /* 5 Object is released(asynchronous operation */ + /* is completed) */ + OLE_QUERY_RETRY /* 6 Query for retry when server sends busy ACK */ +} OLE_NOTIFICATION; + +typedef enum +{ + OLE_NONE, /* 0 no method active */ + OLE_DELETE, /* 1 object delete */ + OLE_LNKPASTE, /* 2 PasteLink(auto reconnect) */ + OLE_EMBPASTE, /* 3 paste(and update) */ + OLE_SHOW, /* 4 Show */ + OLE_RUN, /* 5 Run */ + OLE_ACTIVATE, /* 6 Activate */ + OLE_UPDATE, /* 7 Update */ + OLE_CLOSE, /* 8 Close */ + OLE_RECONNECT, /* 9 Reconnect */ + OLE_SETUPDATEOPTIONS, /* 10 setting update options */ + OLE_SERVERUNLAUNCH, /* 11 server is being unlaunched */ + OLE_LOADFROMSTREAM, /* 12 LoadFromStream(auto reconnect) */ + OLE_SETDATA, /* 13 OleSetData */ + OLE_REQUESTDATA, /* 14 OleRequestData */ + OLE_OTHER, /* 15 other misc async operations */ + OLE_CREATE, /* 16 create */ + OLE_CREATEFROMTEMPLATE, /* 17 CreatefromTemplate */ + OLE_CREATELINKFROMFILE, /* 18 CreateLinkFromFile */ + OLE_COPYFROMLNK, /* 19 CopyFromLink(auto reconnect) */ + OLE_CREATEFROMFILE, /* 20 CreateFromFile */ + OLE_CREATEINVISIBLE /* 21 CreateInvisible */ +} OLE_RELEASE_METHOD; + +/* rendering options */ +typedef enum +{ + olerender_none, + olerender_draw, + olerender_format +} OLEOPT_RENDER; + +/* standard clipboard format type */ +typedef WORD OLECLIPFORMAT; + +/* Link update options */ +typedef enum +{ + oleupdate_always, + oleupdate_onsave, +#ifndef OLE_INTERNAL + oleupdate_oncall +#else + oleupdate_oncall, + oleupdate_onclose +#endif /* OLE_INTERNAL */ +} OLEOPT_UPDATE; + +typedef HANDLE HOBJECT; +typedef LONG LHSERVER; +typedef LONG LHCLIENTDOC; +typedef LONG LHSERVERDOC; + +typedef struct _OLEOBJECT FAR* LPOLEOBJECT; +typedef struct _OLESTREAM FAR* LPOLESTREAM; +typedef struct _OLECLIENT FAR* LPOLECLIENT; + + +#ifndef OLE_INTERNAL +/* object method table definitions. */ +typedef struct _OLEOBJECTVTBL +{ + void FAR* (CALLBACK* QueryProtocol) (LPOLEOBJECT, OLE_LPCSTR); + OLESTATUS (CALLBACK* Release) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Show) (LPOLEOBJECT, BOOL); + OLESTATUS (CALLBACK* DoVerb) (LPOLEOBJECT, UINT, BOOL, BOOL); + OLESTATUS (CALLBACK* GetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*); + OLESTATUS (CALLBACK* SetData) (LPOLEOBJECT, OLECLIPFORMAT, HANDLE); + OLESTATUS (CALLBACK* SetTargetDevice) (LPOLEOBJECT, HGLOBAL); + OLESTATUS (CALLBACK* SetBounds) (LPOLEOBJECT, OLE_CONST RECT FAR*); + OLECLIPFORMAT (CALLBACK* EnumFormats) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (CALLBACK* SetColorScheme) (LPOLEOBJECT, OLE_CONST LOGPALETTE FAR*); + /* Server has to implement only the above methods. */ + +#ifndef SERVERONLY + /* Extra methods required for client. */ + OLESTATUS (CALLBACK* Delete) (LPOLEOBJECT); + OLESTATUS (CALLBACK* SetHostNames) (LPOLEOBJECT, OLE_LPCSTR, OLE_LPCSTR); + OLESTATUS (CALLBACK* SaveToStream) (LPOLEOBJECT, LPOLESTREAM); + OLESTATUS (CALLBACK* Clone) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* CopyFromLink) (LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* Equal) (LPOLEOBJECT, LPOLEOBJECT); + OLESTATUS (CALLBACK* CopyToClipboard) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Draw) (LPOLEOBJECT, HDC, OLE_CONST RECT FAR*, OLE_CONST RECT FAR*, HDC); + OLESTATUS (CALLBACK* Activate) (LPOLEOBJECT, UINT, BOOL, BOOL, HWND, OLE_CONST RECT FAR*); + OLESTATUS (CALLBACK* Execute) (LPOLEOBJECT, HGLOBAL, UINT); + OLESTATUS (CALLBACK* Close) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Update) (LPOLEOBJECT); + OLESTATUS (CALLBACK* Reconnect) (LPOLEOBJECT); + + OLESTATUS (CALLBACK* ObjectConvert) (LPOLEOBJECT, OLE_LPCSTR, LPOLECLIENT, LHCLIENTDOC, OLE_LPCSTR, LPOLEOBJECT FAR*); + OLESTATUS (CALLBACK* GetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE FAR*); + OLESTATUS (CALLBACK* SetLinkUpdateOptions) (LPOLEOBJECT, OLEOPT_UPDATE); + + OLESTATUS (CALLBACK* Rename) (LPOLEOBJECT, OLE_LPCSTR); + OLESTATUS (CALLBACK* QueryName) (LPOLEOBJECT, LPSTR, UINT FAR*); + + OLESTATUS (CALLBACK* QueryType) (LPOLEOBJECT, LONG FAR*); + OLESTATUS (CALLBACK* QueryBounds) (LPOLEOBJECT, RECT FAR*); + OLESTATUS (CALLBACK* QuerySize) (LPOLEOBJECT, DWORD FAR*); + OLESTATUS (CALLBACK* QueryOpen) (LPOLEOBJECT); + OLESTATUS (CALLBACK* QueryOutOfDate) (LPOLEOBJECT); + + OLESTATUS (CALLBACK* QueryReleaseStatus) (LPOLEOBJECT); + OLESTATUS (CALLBACK* QueryReleaseError) (LPOLEOBJECT); + OLE_RELEASE_METHOD (CALLBACK* QueryReleaseMethod)(LPOLEOBJECT); + + OLESTATUS (CALLBACK* RequestData) (LPOLEOBJECT, OLECLIPFORMAT); + OLESTATUS (CALLBACK* ObjectLong) (LPOLEOBJECT, UINT, LONG FAR*); + +/* This method is internal only */ + OLESTATUS (CALLBACK* ChangeData) (LPOLEOBJECT, HANDLE, LPOLECLIENT, BOOL); +#endif /* !SERVERONLY */ +} OLEOBJECTVTBL; +typedef OLEOBJECTVTBL FAR* LPOLEOBJECTVTBL; + +typedef struct _OLEOBJECT +{ + LPOLEOBJECTVTBL lpvtbl; +} OLEOBJECT; +#endif /* !OLE_NTERNAL */ + +/* ole client definitions */ +typedef struct _OLECLIENTVTBL +{ + int (CALLBACK* CallBack)(LPOLECLIENT, OLE_NOTIFICATION, LPOLEOBJECT); +} OLECLIENTVTBL; + +typedef OLECLIENTVTBL FAR* LPOLECLIENTVTBL; + +typedef struct _OLECLIENT +{ + LPOLECLIENTVTBL lpvtbl; +} OLECLIENT; + +/* Stream definitions */ +typedef struct _OLESTREAMVTBL +{ + DWORD (CALLBACK* Get)(LPOLESTREAM, void FAR*, DWORD); + DWORD (CALLBACK* Put)(LPOLESTREAM, OLE_CONST void FAR*, DWORD); +} OLESTREAMVTBL; +typedef OLESTREAMVTBL FAR* LPOLESTREAMVTBL; + +typedef struct _OLESTREAM +{ + LPOLESTREAMVTBL lpstbl; +} OLESTREAM; + +/* Public Function Prototypes */ +OLESTATUS WINAPI OleDelete(LPOLEOBJECT); +OLESTATUS WINAPI OleRelease(LPOLEOBJECT); +OLESTATUS WINAPI OleSaveToStream(LPOLEOBJECT, LPOLESTREAM); +OLESTATUS WINAPI OleEqual(LPOLEOBJECT, LPOLEOBJECT ); +OLESTATUS WINAPI OleCopyToClipboard(LPOLEOBJECT); +OLESTATUS WINAPI OleSetHostNames(LPOLEOBJECT, LPCSTR, LPCSTR); +OLESTATUS WINAPI OleSetTargetDevice(LPOLEOBJECT, HGLOBAL); +OLESTATUS WINAPI OleSetBounds(LPOLEOBJECT, const RECT FAR*); +OLESTATUS WINAPI OleSetColorScheme(LPOLEOBJECT, const LOGPALETTE FAR*); +OLESTATUS WINAPI OleQueryBounds(LPOLEOBJECT, RECT FAR*); +OLESTATUS WINAPI OleQuerySize(LPOLEOBJECT, DWORD FAR*); +OLESTATUS WINAPI OleDraw(LPOLEOBJECT, HDC, const RECT FAR*, const RECT FAR*, HDC); +OLESTATUS WINAPI OleQueryOpen(LPOLEOBJECT); +OLESTATUS WINAPI OleActivate(LPOLEOBJECT, UINT, BOOL, BOOL, HWND, const RECT FAR*); +OLESTATUS WINAPI OleExecute(LPOLEOBJECT, HGLOBAL, UINT); +OLESTATUS WINAPI OleClose(LPOLEOBJECT); +OLESTATUS WINAPI OleUpdate(LPOLEOBJECT); +OLESTATUS WINAPI OleReconnect(LPOLEOBJECT); +OLESTATUS WINAPI OleGetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE FAR*); +OLESTATUS WINAPI OleSetLinkUpdateOptions(LPOLEOBJECT, OLEOPT_UPDATE); +void FAR* WINAPI OleQueryProtocol(LPOLEOBJECT, LPCSTR); + +/* Routines related to asynchronous operations. */ +OLESTATUS WINAPI OleQueryReleaseStatus(LPOLEOBJECT); +OLESTATUS WINAPI OleQueryReleaseError(LPOLEOBJECT); +OLE_RELEASE_METHOD WINAPI OleQueryReleaseMethod(LPOLEOBJECT); + +OLESTATUS WINAPI OleQueryType(LPOLEOBJECT, LONG FAR*); + +/* LOWORD is major version, HIWORD is minor version */ +DWORD WINAPI OleQueryClientVersion(void); +DWORD WINAPI OleQueryServerVersion(void); + +/* Converting to format (as in clipboard): */ +OLECLIPFORMAT WINAPI OleEnumFormats(LPOLEOBJECT, OLECLIPFORMAT); +OLESTATUS WINAPI OleGetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE FAR*); +OLESTATUS WINAPI OleSetData(LPOLEOBJECT, OLECLIPFORMAT, HANDLE); +OLESTATUS WINAPI OleQueryOutOfDate(LPOLEOBJECT); +OLESTATUS WINAPI OleRequestData(LPOLEOBJECT, OLECLIPFORMAT); + +/* Query apis for creation from clipboard */ +OLESTATUS WINAPI OleQueryLinkFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR, OLEOPT_RENDER, OLECLIPFORMAT); + +/* Object creation functions */ +OLESTATUS WINAPI OleCreateFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateLinkFromClip(LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateLinkFromFile(LPCSTR, LPOLECLIENT, LPCSTR, LPCSTR, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleLoadFromStream(LPOLESTREAM, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleCreate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleCreateInvisible(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT, BOOL); +OLESTATUS WINAPI OleCreateFromTemplate(LPCSTR, LPOLECLIENT, LPCSTR, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*, OLEOPT_RENDER, OLECLIPFORMAT); +OLESTATUS WINAPI OleClone(LPOLEOBJECT, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleCopyFromLink(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleObjectConvert(LPOLEOBJECT, LPCSTR, LPOLECLIENT, LHCLIENTDOC, LPCSTR, LPOLEOBJECT FAR*); +OLESTATUS WINAPI OleRename(LPOLEOBJECT, LPCSTR); +OLESTATUS WINAPI OleQueryName(LPOLEOBJECT, LPSTR, UINT FAR*); +OLESTATUS WINAPI OleRevokeObject(LPOLECLIENT); +BOOL WINAPI OleIsDcMeta(HDC); + +/* client document API */ +OLESTATUS WINAPI OleRegisterClientDoc(LPCSTR, LPCSTR, LONG, LHCLIENTDOC FAR*); +OLESTATUS WINAPI OleRevokeClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleRenameClientDoc(LHCLIENTDOC, LPCSTR); +OLESTATUS WINAPI OleRevertClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleSavedClientDoc(LHCLIENTDOC); +OLESTATUS WINAPI OleEnumObjects(LHCLIENTDOC, LPOLEOBJECT FAR*); + +/* server usage definitions */ +typedef enum { + OLE_SERVER_MULTI, /* multiple instances */ + OLE_SERVER_SINGLE /* single instance(multiple document) */ +} OLE_SERVER_USE; + +/* Server API */ +typedef struct _OLESERVER FAR* LPOLESERVER; + +OLESTATUS WINAPI OleRegisterServer(LPCSTR, LPOLESERVER, LHSERVER FAR*, HINSTANCE, OLE_SERVER_USE); +OLESTATUS WINAPI OleRevokeServer(LHSERVER); +OLESTATUS WINAPI OleBlockServer(LHSERVER); +OLESTATUS WINAPI OleUnblockServer(LHSERVER, BOOL FAR*); + +/* APIs to keep server open */ +OLESTATUS WINAPI OleLockServer(LPOLEOBJECT, LHSERVER FAR*); +OLESTATUS WINAPI OleUnlockServer(LHSERVER); + +/* Server document API */ + +typedef struct _OLESERVERDOC FAR* LPOLESERVERDOC; + +OLESTATUS WINAPI OleRegisterServerDoc(LHSERVER, LPCSTR, LPOLESERVERDOC, LHSERVERDOC FAR*); +OLESTATUS WINAPI OleRevokeServerDoc(LHSERVERDOC); +OLESTATUS WINAPI OleRenameServerDoc(LHSERVERDOC, LPCSTR); +OLESTATUS WINAPI OleRevertServerDoc(LHSERVERDOC); +OLESTATUS WINAPI OleSavedServerDoc(LHSERVERDOC); + +typedef struct _OLESERVERVTBL +{ + OLESTATUS (CALLBACK* Open) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* document name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Create)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* CreateFromTemplate)(LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* lp template name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Edit) (LPOLESERVER, LHSERVERDOC, OLE_LPCSTR, OLE_LPCSTR, LPOLESERVERDOC FAR*); + /* long handle to doc(privtate to DLL) */ + /* lp to OLESERVER */ + /* lp class name */ + /* lp doc name */ + /* place holder for returning oledoc. */ + + OLESTATUS (CALLBACK* Exit) (LPOLESERVER); + /* lp OLESERVER */ + + OLESTATUS (CALLBACK* Release) (LPOLESERVER); + /* lp OLESERVER */ + + OLESTATUS (CALLBACK* Execute)(LPOLESERVER, HGLOBAL); + /* lp OLESERVER */ + /* handle to command strings */ +} OLESERVERVTBL; +typedef OLESERVERVTBL FAR* LPOLESERVERVTBL; + +typedef struct _OLESERVER +{ + LPOLESERVERVTBL lpvtbl; +} OLESERVER; + +typedef struct _OLESERVERDOCVTBL +{ + OLESTATUS (CALLBACK* Save) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* Close) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* SetHostNames)(LPOLESERVERDOC, OLE_LPCSTR, OLE_LPCSTR); + OLESTATUS (CALLBACK* SetDocDimensions)(LPOLESERVERDOC, OLE_CONST RECT FAR*); + OLESTATUS (CALLBACK* GetObject) (LPOLESERVERDOC, OLE_LPCSTR, LPOLEOBJECT FAR*, LPOLECLIENT); + OLESTATUS (CALLBACK* Release) (LPOLESERVERDOC); + OLESTATUS (CALLBACK* SetColorScheme)(LPOLESERVERDOC, OLE_CONST LOGPALETTE FAR*); + OLESTATUS (CALLBACK* Execute) (LPOLESERVERDOC, HGLOBAL); +} OLESERVERDOCVTBL; +typedef OLESERVERDOCVTBL FAR* LPOLESERVERDOCVTBL; + +typedef struct _OLESERVERDOC +{ + LPOLESERVERDOCVTBL lpvtbl; +} OLESERVERDOC; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_OLE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/ostream.h b/private/oleauto/tools/win16/hdos/c800/include/ostream.h new file mode 100644 index 000000000..799885115 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ostream.h @@ -0,0 +1,129 @@ +/*** +*ostream.h - definitions/declarations for the ostream class +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the ostream class. +* [AT&T C++] +* +****/ + +#ifndef _INC_OSTREAM +#define _INC_OSTREAM + +#include <ios.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +typedef long streamoff, streampos; + +class ostream : virtual public ios { + +public: + ostream(streambuf*); + virtual ~ostream(); + + ostream& flush(); + int opfx(); + void osfx(); + +inline ostream& operator<<(ostream& (*f)(ostream&)); +inline ostream& operator<<(ios& (*f)(ios&)); + ostream& operator<<(const char _HFAR_ *); +inline ostream& operator<<(const unsigned char _HFAR_ *); +inline ostream& operator<<(const signed char _HFAR_ *); +inline ostream& operator<<(char); + ostream& operator<<(unsigned char); +inline ostream& operator<<(signed char); + ostream& operator<<(short); + ostream& operator<<(unsigned short); + ostream& operator<<(int); + ostream& operator<<(unsigned int); + ostream& operator<<(long); + ostream& operator<<(unsigned long); +inline ostream& operator<<(float); + ostream& operator<<(double); + ostream& operator<<(long double); + ostream& operator<<(const void _HFAR_ *); + ostream& operator<<(streambuf*); +inline ostream& put(char); + ostream& put(unsigned char); +inline ostream& put(signed char); + ostream& write(const char _HFAR_ *,int); +inline ostream& write(const unsigned char _HFAR_ *,int); +inline ostream& write(const signed char _HFAR_ *,int); + ostream& seekp(streampos); + ostream& seekp(streamoff,ios::seek_dir); + streampos tellp(); + +protected: + ostream(); + ostream(const ostream&); // treat as private + ostream& operator=(streambuf*); // treat as private + ostream& operator=(const ostream& _os) {return operator=(_os.rdbuf()); } + int do_opfx(int); // not used + void do_osfx(); // not used + +private: + ostream(ios&); + ostream& writepad(const char _HFAR_ *, const char _HFAR_ *); + int x_floatused; +}; + +inline ostream& ostream::operator<<(ostream& (*f)(ostream&)) { (*f)(*this); return *this; } +inline ostream& ostream::operator<<(ios& (*f)(ios& )) { (*f)(*this); return *this; } + +inline ostream& ostream::operator<<(char c) { return operator<<((unsigned char) c); } +inline ostream& ostream::operator<<(signed char c) { return operator<<((unsigned char) c); } + +inline ostream& ostream::operator<<(const unsigned char _HFAR_ * s) { return operator<<((const char _HFAR_ *) s); } +inline ostream& ostream::operator<<(const signed char _HFAR_ * s) { return operator<<((const char _HFAR_ *) s); } + +inline ostream& ostream::operator<<(float f) { x_floatused = 1; return operator<<((double) f); } + +inline ostream& ostream::put(char c) { return put((unsigned char) c); } +inline ostream& ostream::put(signed char c) { return put((unsigned char) c); } + +inline ostream& ostream::write(const unsigned char _HFAR_ * s, int n) { return write((char _HFAR_ *) s, n); } +inline ostream& ostream::write(const signed char _HFAR_ * s, int n) { return write((char _HFAR_ *) s, n); } + + +class ostream_withassign : public ostream { + public: + ostream_withassign(); + ostream_withassign(streambuf* _is); + ~ostream_withassign(); + ostream& operator=(const ostream& _os) { return ostream::operator=(_os.rdbuf()); } + ostream& operator=(streambuf* _sb) { return ostream::operator=(_sb); } +}; + +#ifndef _WINDLL +extern ostream_withassign cout; +extern ostream_withassign cerr; +extern ostream_withassign clog; +#endif + +inline ostream& flush(ostream& _outs) { return _outs.flush(); } +inline ostream& endl(ostream& _outs) { return _outs << '\n' << flush; } +inline ostream& ends(ostream& _outs) { return _outs << char('\0'); } + +ios& dec(ios&); +ios& hex(ios&); +ios& oct(ios&); + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/penwin.h b/private/oleauto/tools/win16/hdos/c800/include/penwin.h new file mode 100644 index 000000000..fbe2d112e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/penwin.h @@ -0,0 +1,818 @@ +/*****************************************************************************\ +* * +* penwin.h - Pen Windows functions, types, and definitions * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWS +#include <windows.h> /* <windows.h> must be pre-included */ +#endif /* _INC_WINDOWS */ + +#ifndef _INC_PENWIN /* prevent multiple includes */ +#define _INC_PENWIN + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/****** General Pen Windows Definitions *************************************/ + +typedef int REC; +typedef LONG SYV; +typedef SYV FAR *LPSYV; +typedef HANDLE HREC; +typedef int CL; +typedef LONG ALC; +typedef UINT HKP; +typedef int (CALLBACK * LPDF)(int, LPVOID, LPVOID, int, DWORD, DWORD); + +#define BITPENUP 0x8000 +#define FPenUpX(x) (((x) & BITPENUP)!=0) + +/* Default pen cursor to indicate writing, points northwest */ +#define IDC_PEN MAKEINTRESOURCE(32631) + +/* alternate select cursor: upsidedown standard arrow, points southeast */ +#define IDC_ALTSELECT MAKEINTRESOURCE(32501) + +#define RC_WDEFAULT (0xFFFF) +#define RC_LDEFAULT (0xFFFFFFFFL) +#define RC_WDEFAULTFLAGS (0x8000) +#define RC_LDEFAULTFLAGS (0x80000000L) + +/* HIWORD(SYV) defines and detection macros */ + +#define SYVHI_SPECIAL 0 +#define FIsSpecial(syv) (HIWORD((syv))==SYVHI_SPECIAL) +#define SYVHI_ANSI 1 +#define FIsAnsi(syv) (HIWORD((syv))==SYVHI_ANSI) +#define SYVHI_GESTURE 2 +#define FIsGesture(syv) (HIWORD((syv))==SYVHI_GESTURE) +#define SYVHI_KANJI 3 +#define FIsKanji(syv) (HIWORD((syv))==SYVHI_KANJI) +#define SYVHI_SHAPE 4 +#define FIsShape(syv) (HIWORD((syv))==SYVHI_SHAPE) +#define SYVHI_UNICODE 5 +#define FIsUniCode(syv) (HIWORD((syv))==SYVHI_UNICODE) +#define SYVHI_VKEY 6 +#define FIsVKey(syv) (HIWORD((syv))==SYVHI_VKEY) + +/* Macros to convert between SYV and ANSI */ + +#define ChSyvToAnsi(syv) ((BYTE) (LOBYTE(LOWORD((syv))))) +#define SyvCharacterToSymbol(c) ((LONG)(unsigned char)(c) | 0x00010000) +#define SyvKanjiToSymbol(c) ((LONG)(WORD)(c) | 0x00030000) + +/* SYV values with special meanings to Pen Windows */ + +#define SYV_NULL 0x00000000L +#define SYV_UNKNOWN 0x00000001L +#define SYV_EMPTY 0x00000003L +#define SYV_BEGINOR 0x00000010L +#define SYV_ENDOR 0x00000011L +#define SYV_OR 0x00000012L +#define SYV_SOFTNEWLINE 0x00000020L +#define SYV_SPACENULL SyvCharacterToSymbol('\0') + +/* SYV values for gestures (map into UNICODE space) */ + +#define SYV_KKCONVERT 0x0002FFD4L +#define SYV_CLEAR 0x0002FFD5L +#define SYV_EXTENDSELECT 0x0002FFD8L +#define SYV_UNDO 0x0002FFD9L +#define SYV_COPY 0x0002FFDAL +#define SYV_CUT 0x0002FFDBL +#define SYV_PASTE 0x0002FFDCL +#define SYV_CLEARWORD 0x0002FFDDL +#define SYV_USER 0x0002FFDEL /* ;Reserved */ +#define SYV_CORRECT 0x0002FFDFL + +#define SYV_BACKSPACE 0x00020008L +#define SYV_TAB 0x00020009L +#define SYV_RETURN 0x0002000DL +#define SYV_SPACE 0x00020020L + +#define FIsStdGesture(syv) \ + ((syv) == SYV_CLEAR \ + || (syv) == SYV_EXTENDSELECT\ + || (syv) == SYV_UNDO \ + || (syv) == SYV_COPY \ + || (syv) == SYV_CUT \ + || (syv) == SYV_PASTE \ + || (syv) == SYV_CLEARWORD \ + || (syv) == SYV_KKCONVERT \ + || (syv) == SYV_USER \ + || (syv) == SYV_CORRECT) + +#define FIsAnsiGesture(syv) \ + ((syv) == SYV_BACKSPACE \ + || (syv) == SYV_TAB \ + || (syv) == SYV_RETURN \ + || (syv) == SYV_SPACE) + +/* Application specific gestures, Circle a-z and Circle A-Z */ + +#define SYV_APPGESTUREMASK 0x00020000L +#define SYV_CIRCLEUPA 0x000224B6L +#define SYV_CIRCLEUPZ 0x000224CFL +#define SYV_CIRCLELOA 0x000224D0L +#define SYV_CIRCLELOZ 0x000224E9L + +/* Gesture Macros */ + +#define FIsLoAppGesture(syv) (syv >= SYV_CIRCLELOA && syv <= SYV_CIRCLELOZ) +#define FIsUpAppGesture(syv) (syv >= SYV_CIRCLEUPA && syv <= SYV_CIRCLEUPZ) +#define FIsAppGesture(syv) (syv>=SYV_CIRCLEUPA && syv<=SYV_CIRCLELOZ) + +#define SyvAppGestureFromLoAnsi(ansi) ((DWORD)(BYTE)ansi- 'a' + SYV_CIRCLELOA) +#define SyvAppGestureFromUpAnsi(ansi) ((DWORD)(BYTE)ansi- 'A' + SYV_CIRCLEUPA) +#define AnsiFromSyvAppGesture(syv) ChSyvToAnsi( \ + syv-(FIsUpAppGesture(syv)? SYV_CIRCLEUPA-(SYV)'A': SYV_CIRCLELOA-(SYV)'a')) + +/* SYV definitions for shapes */ + +#define SYV_SHAPELINE 0x00040001L +#define SYV_SHAPEELLIPSE 0x00040002L +#define SYV_SHAPERECT 0x00040003L +#define SYV_SHAPEMIN SYV_SHAPELINE +#define SYV_SHAPEMAX SYV_SHAPERECT + +/****** Recognition Error Codes *********************************************/ + +#define REC_OEM (-1024) +#define REC_LANGUAGE (-48) +#define REC_GUIDE (-47) +#define REC_PARAMERROR (-46) +#define REC_INVALIDREF (-45) +#define REC_RECTEXCLUDE (-44) +#define REC_RECTBOUND (-43) +#define REC_PCM (-42) +#define REC_RESULTMODE (-41) +#define REC_HWND (-40) +#define REC_ALC (-39) +#define REC_ERRORLEVEL (-38) +#define REC_CLVERIFY (-37) +#define REC_DICT (-36) +#define REC_HREC (-35) +#define REC_BADEVENTREF (-33) +#define REC_NOCOLLECTION (-32) + +#define REC_DEBUG (-32) + +#define REC_POINTEREVENT (-31) +#define REC_BADHPENDATA (-9) +#define REC_OOM (-8) +#define REC_NOINPUT (-7) +#define REC_NOTABLET (-6) +#define REC_BUSY (-5) +#define REC_BUFFERTOOSMALL (-4) +#define REC_ABORT (-3) + +#define REC_OVERFLOW (-1) + +#define REC_OK 0 +#define REC_TERMBOUND 1 +#define REC_TERMEX 2 +#define REC_TERMPENUP 3 +#define REC_TERMRANGE 4 +#define REC_TERMTIMEOUT 5 +#define REC_DONE 6 +#define REC_TERMOEM 512 + +/****** Pen Driver Structures and Entry points ******************************/ + +typedef struct tagOEMPENINFO + { + UINT wPdt; + UINT wValueMax; + UINT wDistinct; + } + OEMPENINFO, FAR *LPOEMPENINFO; + +#define PDT_NULL 0 +#define PDT_PRESSURE 1 +#define PDT_HEIGHT 2 +#define PDT_ANGLEXY 3 +#define PDT_ANGLEZ 4 +#define PDT_BARRELROTATION 5 +#define PDT_OEMSPECIFIC 16 + +#define MAXOEMDATAWORDS 6 + +typedef struct tagPENPACKET + { + UINT wTabletX; + UINT wTabletY; + UINT wPDK; + UINT rgwOemData[MAXOEMDATAWORDS]; + } + PENPACKET, FAR *LPPENPACKET; + +typedef BOOL (CALLBACK * LPFNRAWHOOK)(LPPENPACKET); + +typedef struct tagPENINFO + { + UINT cxRawWidth; + UINT cyRawHeight; + UINT wDistinctWidth; + UINT wDistinctHeight; + int nSamplingRate; + int nSamplingDist; + LONG lPdc; + int cPens; + int cbOemData; + OEMPENINFO rgoempeninfo[MAXOEMDATAWORDS]; + UINT rgwReserved[8]; + } + PENINFO, FAR *LPPENINFO; + +#define PDC_INTEGRATED 0x00000001L +#define PDC_PROXIMITY 0x00000002L +#define PDC_RANGE 0x00000004L +#define PDC_INVERT 0x00000008L +#define PDC_RELATIVE 0x00000010L +#define PDC_BARREL1 0x00000020L +#define PDC_BARREL2 0x00000040L +#define PDC_BARREL3 0x00000080L + +typedef struct tagSTROKEINFO + { + UINT cPnt; + UINT cbPnts; + UINT wPdk; + DWORD dwTick; + } + STROKEINFO, FAR *LPSTROKEINFO; + +typedef struct tagCALBSTRUCT + { + int wOffsetX; + int wOffsetY; + int wDistinctWidth; + int wDistinctHeight; + } + CALBSTRUCT, FAR *LPCALBSTRUCT; + +/****** DRV_ values for pen driver specific messages ************************/ + +#define DRV_SetPenDriverEntryPoints DRV_RESERVED+1 +#define DRV_RemovePenDriverEntryPoints DRV_RESERVED+2 +#define DRV_SetPenSamplingRate DRV_RESERVED+3 +#define DRV_SetPenSamplingDist DRV_RESERVED+4 +#define DRV_GetName DRV_RESERVED+5 +#define DRV_GetVersion DRV_RESERVED+6 +#define DRV_GetPenInfo DRV_RESERVED+7 +#define DRV_GetCalibration DRV_RESERVED+11 +#define DRV_SetCalibration DRV_RESERVED+12 + +VOID WINAPI UpdatePenInfo(LPPENINFO); +BOOL WINAPI EndPenCollection(REC); +REC WINAPI GetPenHwData(LPPOINT, LPVOID, int, UINT, LPSTROKEINFO); +REC WINAPI GetPenHwEventData(UINT, UINT, LPPOINT, LPVOID, int, LPSTROKEINFO); +VOID WINAPI PenPacket(VOID); +BOOL WINAPI SetPenHook(HKP, LPFNRAWHOOK); + +/****** Pen Hardware Constants **********************************************/ + +#define PDK_UP 0x0000 +#define PDK_DOWN 0x0001 +#define PDK_BARREL1 0x0002 +#define PDK_BARREL2 0x0004 +#define PDK_BARREL3 0x0008 +#define PDK_TRANSITION 0x0010 +#define PDK_INVERTED 0x0080 +#define PDK_OUTOFRANGE 0x4000 +#define PDK_DRIVER 0x8000 +#define PDK_TIPMASK 0x0001 +#define PDK_SWITCHES (PDK_DOWN|PDK_BARREL1|PDK_BARREL2|PDK_BARREL3) + +#define PCM_PENUP 0x00000001L +#define PCM_RANGE 0x00000002L +#define PCM_INVERT 0x00000020L +#define PCM_RECTEXCLUDE 0x00002000L +#define PCM_RECTBOUND 0x00004000L +#define PCM_TIMEOUT 0x00008000L +#define PCM_ADDDEFAULTS RC_LDEFAULTFLAGS /* 0x80000000L */ + +/****** Virtual Event Layer *************************************************/ + +VOID WINAPI PostVirtualKeyEvent(UINT, BOOL); +VOID WINAPI PostVirtualMouseEvent(UINT, int, int); +VOID WINAPI AtomicVirtualEvent(BOOL); + +#define VWM_MOUSEMOVE 0x0001 +#define VWM_MOUSELEFTDOWN 0x0002 +#define VWM_MOUSELEFTUP 0x0004 +#define VWM_MOUSERIGHTDOWN 0x0008 +#define VWM_MOUSERIGHTUP 0x0010 + +/****** RC Definition *************************************************************/ + +#define CL_NULL 0 +#define CL_MINIMUM 1 +#define CL_MAXIMUM 100 +#define INKWIDTH_MINIMUM 0 +#define INKWIDTH_MAXIMUM 15 +#define ENUM_MINIMUM 1 +#define ENUM_MAXIMUM 4096 +#define MAXDICTIONARIES 16 + +typedef struct tagGUIDE + { + int xOrigin; + int yOrigin; + int cxBox; + int cyBox; + int cxBase; + int cyBase; + int cHorzBox; + int cVertBox; + int cyMid; + } + GUIDE, FAR *LPGUIDE; + +typedef BOOL (CALLBACK * RCYIELDPROC)(VOID); + +#define cbRcLanguageMax 44 +#define cbRcUserMax 32 +#define cbRcrgbfAlcMax 32 +#define cwRcReservedMax 8 + +typedef struct tagRC + { + HREC hrec; + HWND hwnd; + UINT wEventRef; + UINT wRcPreferences; + LONG lRcOptions; + RCYIELDPROC lpfnYield; + BYTE lpUser[cbRcUserMax]; + UINT wCountry; + UINT wIntlPreferences; + char lpLanguage[cbRcLanguageMax]; + LPDF rglpdf[MAXDICTIONARIES]; + UINT wTryDictionary; + CL clErrorLevel; + ALC alc; + ALC alcPriority; + BYTE rgbfAlc[cbRcrgbfAlcMax]; + UINT wResultMode; + UINT wTimeOut; + LONG lPcm; + RECT rectBound; + RECT rectExclude; + GUIDE guide; + UINT wRcOrient; + UINT wRcDirect; + int nInkWidth; + COLORREF rgbInk; + DWORD dwAppParam; + DWORD dwDictParam; + DWORD dwRecognizer; + UINT rgwReserved[cwRcReservedMax]; + } + RC, FAR *LPRC; + +typedef HANDLE HPENDATA; + +typedef struct tagSYC + { + UINT wStrokeFirst; + UINT wPntFirst; + UINT wStrokeLast; + UINT wPntLast; + BOOL fLastSyc; + } + SYC, FAR *LPSYC; + +#define wPntAll (UINT)0xFFFF +#define iSycNull (-1) + +typedef struct tagSYE + { + SYV syv; + LONG lRecogVal; + CL cl; + int iSyc; + } + SYE, FAR *LPSYE; + +#define MAXHOTSPOT 8 + +typedef struct tagSYG + { + POINT rgpntHotSpots[MAXHOTSPOT]; + int cHotSpot; + int nFirstBox; + LONG lRecogVal; + LPSYE lpsye; + int cSye; + LPSYC lpsyc; + int cSyc; + } + SYG, FAR *LPSYG; + +typedef int (CALLBACK *ENUMPROC)(LPSYV, int, VOID FAR *); + +typedef struct tagRCRESULT + { + SYG syg; + UINT wResultsType; + int cSyv; + LPSYV lpsyv; + HANDLE hSyv; + int nBaseLine; + int nMidLine; + HPENDATA hpendata; + RECT rectBoundInk; + POINT pntEnd; + LPRC lprc; + } + RCRESULT, FAR *LPRCRESULT; + +#define RCRT_DEFAULT 0x0000 +#define RCRT_UNIDENTIFIED 0x0001 +#define RCRT_GESTURE 0x0002 +#define RCRT_NOSYMBOLMATCH 0x0004 +#define RCRT_PRIVATE 0x4000 +#define RCRT_NORECOG 0x8000 +#define RCRT_ALREADYPROCESSED 0x0008 +#define RCRT_GESTURETRANSLATED 0x0010 +#define RCRT_GESTURETOKEYS 0x0020 + +#define HKP_SETHOOK 0 +#define HKP_UNHOOK 0xFFFF +#define HWR_RESULTS 0 +#define HWR_APPWIDE 1 + +#define PEN_NOINKWIDTH 0 +#define LPDFNULL ((LPDF)NULL) + +#define RPA_DEFAULT 1 + +/* GetGlobalRC return codes */ +#define GGRC_OK 0 +#define GGRC_DICTBUFTOOSMALL 1 +#define GGRC_PARAMERROR 2 + +/* SetGlobalRC return code flags */ +#define SGRC_OK 0x0000 +#define SGRC_USER 0x0001 +#define SGRC_PARAMERROR 0x0002 +#define SGRC_RC 0x0004 +#define SGRC_RECOGNIZER 0x0008 +#define SGRC_DICTIONARY 0x0010 +#define SGRC_INIFILE 0x0020 + +#define GetWEventRef() (LOWORD(GetMessageExtraInfo())) + +HREC WINAPI InstallRecognizer(LPSTR); +VOID WINAPI UninstallRecognizer(HREC); +UINT WINAPI GetGlobalRC(LPRC, LPSTR, LPSTR, int); +UINT WINAPI SetGlobalRC(LPRC, LPSTR, LPSTR); +VOID WINAPI RegisterPenApp(UINT, BOOL); +UINT WINAPI IsPenAware(VOID); +BOOL WINAPI SetRecogHook(UINT, UINT, HWND); +VOID WINAPI InitRC(HWND, LPRC); +REC WINAPI Recognize(LPRC); +REC WINAPI RecognizeData(LPRC, HPENDATA); +BOOL WINAPI TrainInk(LPRC, HPENDATA, LPSYV); +BOOL WINAPI TrainContext(LPRCRESULT, LPSYE, int, LPSYC, int); +REC WINAPI ProcessWriting(HWND, LPRC); +BOOL WINAPI CorrectWriting(HWND, LPSTR, UINT, LPRC, DWORD, DWORD); +VOID WINAPI EmulatePen(BOOL); +int WINAPI GetSymbolMaxLength(LPSYG); +int WINAPI GetSymbolCount(LPSYG); +VOID WINAPI FirstSymbolFromGraph(LPSYG, LPSYV, int, int FAR *); +UINT WINAPI EnumSymbols(LPSYG, WORD, ENUMPROC, LPVOID); + +/****** Miscellaneous Functions *********************************************/ + +BOOL WINAPI TPtoDP(LPPOINT, int); +BOOL WINAPI DPtoTP(LPPOINT, int); +VOID WINAPI BoundingRectFromPoints(LPPOINT, int, LPRECT); +BOOL WINAPI SymbolToCharacter(LPSYV, int, LPSTR, LPINT); +int WINAPI CharacterToSymbol(LPSTR, int, LPSYV); +UINT WINAPI GetVersionPenWin(VOID); +BOOL WINAPI ExecuteGesture(HWND, SYV, LPRCRESULT); + +/****** RC Options and Flags ***********************************************/ + +#define ALC_ALL 0x000043FFL +#define ALC_DEFAULT 0x00000000L +#define ALC_LCALPHA 0x00000001L +#define ALC_UCALPHA 0x00000002L +#define ALC_ALPHA 0x00000003L +#define ALC_NUMERIC 0x00000004L +#define ALC_ALPHANUMERIC 0x00000007L +#define ALC_PUNC 0x00000008L +#define ALC_MATH 0x00000010L +#define ALC_MONETARY 0x00000020L +#define ALC_OTHER 0x00000040L +#define ALC_WHITE 0x00000100L +#define ALC_NONPRINT 0x00000200L +#define ALC_GESTURE 0x00004000L +#define ALC_USEBITMAP 0x00008000L +#define ALC_DBCS 0x00000400L +#define ALC_HIRAGANA 0x00010000L +#define ALC_KATAKANA 0x00020000L +#define ALC_KANJI 0x00040000L +#define ALC_OEM 0x0FF80000L +#define ALC_RESERVED 0xF0003800L +#define ALC_NOPRIORITY 0x00000000L +#define ALC_SYSMINIMUM (ALC_ALPHANUMERIC | ALC_PUNC | ALC_WHITE | ALC_GESTURE) + +#define MpAlcB(lprc,i) ((lprc)->rgbfAlc[((i) & 0xff) >> 3]) +#define MpIbf(i) ((BYTE)(1 << ((i) & 7))) + +#define SetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) |= MpIbf(i);} while (0) +#define ResetAlcBitAnsi(lprc,i) do {MpAlcB(lprc,i) &= ~MpIbf(i);} while (0) +#define IsAlcBitAnsi(lprc, i) ((MpAlcB(lprc,i) & MpIbf(i)) != 0) + +#define RCD_DEFAULT 0 +#define RCD_LR 1 +#define RCD_RL 2 +#define RCD_TB 3 +#define RCD_BT 4 + +#define RCO_NOPOINTEREVENT 0x00000001L +#define RCO_SAVEALLDATA 0x00000002L +#define RCO_SAVEHPENDATA 0x00000004L +#define RCO_NOFLASHUNKNOWN 0x00000008L +#define RCO_TABLETCOORD 0x00000010L +#define RCO_NOSPACEBREAK 0x00000020L +#define RCO_NOHIDECURSOR 0x00000040L +#define RCO_NOHOOK 0x00000080L +#define RCO_BOXED 0x00000100L +#define RCO_SUGGEST 0x00000200L +#define RCO_DISABLEGESMAP 0x00000400L +#define RCO_NOFLASHCURSOR 0x00000800L +#define RCO_COLDRECOG 0x00008000L + +#define RCP_LEFTHAND 0x0001 +#define RCP_MAPCHAR 0x0004 + +#define RCOR_NORMAL 1 +#define RCOR_RIGHT 2 +#define RCOR_UPSIDEDOWN 3 +#define RCOR_LEFT 4 + +#define RRM_STROKE 0 +#define RRM_SYMBOL 1 +#define RRM_WORD 2 +#define RRM_NEWLINE 3 +#define RRM_COMPLETE 16 + +#define RCIP_ALLANSICHAR 0x0001 +#define RCIP_MASK 0x0001 + +#define CWR_STRIPCR 0x00000001L +#define CWR_STRIPLF 0x00000002L +#define CWR_STRIPTAB 0x00000004L +#define CWR_SINGLELINEEDIT 0x00000007L +#define CWR_TITLE 0x00000010L +#define CWR_KKCONVERT 0x00000020L + +#define MAP_GESTOGES (RCRT_GESTURE|RCRT_GESTURETRANSLATED) +#define MAP_GESTOVKEYS (RCRT_GESTURETOKEYS|RCRT_ALREADYPROCESSED) + +#define IsGestureToGesture(lprcresult) (((lprcresult)->wResultstype & MAP_GESTOGES \ + ) == MAP_GESTOGES) + +#define IsGestureToVkeys(lprcresult) (((lprcresult)->wResultstype & MAP_GESTOVKEYS \ + ) == MAP_GESTOVKEYS) + +#define SetAlreadyProcessed(lprcresult) ((lprcresult)->wResultsType = ((lprcresult)->wResultsType \ + & ~RCRT_GESTURETOKEYS) | RCRT_ALREADYPROCESSED) + +/****** Pen Data Type *******************************************************/ + +typedef struct tagPENDATAHEADER + { + UINT wVersion; + UINT cbSizeUsed; + UINT cStrokes; + UINT cPnt; + UINT cPntStrokeMax; + RECT rectBound; + UINT wPndts; + int nInkWidth; + DWORD rgbInk; + } + PENDATAHEADER, FAR *LPPENDATAHEADER, FAR *LPPENDATA; + +#define PDTS_LOMETRIC 0x0000 +#define PDTS_HIMETRIC 0x0001 +#define PDTS_HIENGLISH 0x0002 +#define PDTS_SCALEMAX 0x0003 +#define PDTS_DISPLAY 0x0003 +#define PDTS_ARBITRARY 0x0004 +#define PDTS_SCALEMASK 0x000F +#define PDTS_STANDARDSCALE PDTS_HIENGLISH + +#define PDTS_NOPENINFO 0x0100 +#define PDTS_NOUPPOINTS 0x0200 +#define PDTS_NOOEMDATA 0x0400 +#define PDTS_NOCOLINEAR 0x0800 +#define PDTS_COMPRESSED 0x8000 +#define PDTS_COMPRESSMETHOD 0x00F0 +#define PDTS_COMPRESS2NDDERIV 0x0010 + +#define PDTT_DEFAULT 0x0000 +#define PDTT_PENINFO PDTS_NOPENINFO +#define PDTT_UPPOINTS PDTS_NOUPPOINTS +#define PDTT_OEMDATA PDTS_NOOEMDATA +#define PDTT_COLINEAR PDTS_NOCOLINEAR +#define PDTT_COMPRESS PDTS_COMPRESSED +#define PDTT_DECOMPRESS 0x4000 +#define PDTT_ALL (PDTT_PENINFO|PDTT_UPPOINTS|PDTT_OEMDATA|PDTT_COLINEAR) + +#define DestroyPenData(hpendata) (GlobalFree(hpendata)==NULL) +#define EndEnumStrokes(hpendata) GlobalUnlock(hpendata) + +BOOL WINAPI IsPenEvent(UINT, LONG); +BOOL WINAPI GetPenAsyncState(UINT); + +BOOL WINAPI GetPenDataInfo(HPENDATA, LPPENDATAHEADER, LPPENINFO, DWORD); +BOOL WINAPI GetPenDataStroke(LPPENDATA, UINT, LPPOINT FAR *, LPVOID FAR *, LPSTROKEINFO ); +BOOL WINAPI GetPointsFromPenData(HPENDATA, UINT, UINT, UINT, LPPOINT); +VOID WINAPI DrawPenData(HDC, LPRECT, HPENDATA); +BOOL WINAPI MetricScalePenData(HPENDATA, UINT); +BOOL WINAPI ResizePenData(HPENDATA, LPRECT); +BOOL WINAPI OffsetPenData(HPENDATA, int, int); +BOOL WINAPI RedisplayPenData(HDC, HPENDATA, LPPOINT, LPPOINT, int, DWORD); +HPENDATA WINAPI CompactPenData(HPENDATA, UINT ); +HPENDATA WINAPI DuplicatePenData(HPENDATA, UINT); +HPENDATA WINAPI CreatePenData(LPPENINFO, int, UINT, UINT); +HPENDATA WINAPI AddPointsPenData(HPENDATA, LPPOINT, LPVOID, LPSTROKEINFO); +LPPENDATA WINAPI BeginEnumStrokes(HPENDATA ); + +/****** New Windows Messages ************************************************/ + +#define WM_RCRESULT (WM_PENWINFIRST+1) +#define WM_HOOKRCRESULT (WM_PENWINFIRST+2) +#define WM_GLOBALRCCHANGE (WM_PENWINFIRST+3) +#define WM_SKB (WM_PENWINFIRST+4) +#define WM_HEDITCTL (WM_PENWINFIRST+5) + +/****** Dictionary **********************************************************/ + +#define cbDictPathMax 255 +#define DIRQ_QUERY 1 +#define DIRQ_DESCRIPTION 2 +#define DIRQ_CONFIGURE 3 +#define DIRQ_OPEN 4 +#define DIRQ_CLOSE 5 +#define DIRQ_SETWORDLISTS 6 +#define DIRQ_STRING 7 +#define DIRQ_SUGGEST 8 +#define DIRQ_ADD 9 +#define DIRQ_DELETE 10 +#define DIRQ_FLUSH 11 +#define DIRQ_RCCHANGE 12 +#define DIRQ_SYMBOLGRAPH 13 +#define DIRQ_INIT 14 +#define DIRQ_CLEANUP 15 +#define DIRQ_COPYRIGHT 16 + + +#define DIRQ_USER 4096 + +BOOL WINAPI DictionarySearch(LPRC, LPSYE, int, LPSYV, int); + +/****** Handwriting Edit Control ********************************************/ + +#define HE_GETRC 3 +#define HE_SETRC 4 +#define HE_GETINFLATE 5 +#define HE_SETINFLATE 6 +#define HE_GETUNDERLINE 7 +#define HE_SETUNDERLINE 8 +#define HE_GETINKHANDLE 9 +#define HE_SETINKMODE 10 +#define HE_STOPINKMODE 11 +#define HE_GETRCRESULTCODE 12 +#define HE_DEFAULTFONT 13 +#define HE_CHARPOSITION 14 +#define HE_CHAROFFSET 15 + +#define HE_GETRCRESULT 22 + +#define HE_KKCONVERT 30 +#define HE_GETKKCONVERT 31 +#define HE_CANCELKKCONVERT 32 +#define HE_FIXKKCONVERT 33 + +#define HEKK_DEFAULT 0 +#define HEKK_CONVERT 1 +#define HEKK_CANDIDATE 2 + +#define HEP_NORECOG 0 +#define HEP_RECOG 1 +#define HEP_WAITFORTAP 2 + +#define HN_ENDREC 4 +#define HN_DELAYEDRECOGFAIL 5 + +#define HN_RCRESULT 20 + +#define HN_ENDKKCONVERT 30 + +typedef struct tagRECTOFS + { + int dLeft; + int dTop; + int dRight; + int dBottom; + } + RECTOFS, FAR *LPRECTOFS; + +/****** Boxed Edit Control **************************************************/ + +typedef struct tagBOXLAYOUT + { + int cyCusp; + int cyEndCusp; + UINT style; + DWORD rgbText; + DWORD rgbBox; + DWORD rgbSelect; + } + BOXLAYOUT, FAR *LPBOXLAYOUT; + +#define BXS_NONE 0U +#define BXS_RECT 1U +#define BXS_ENDTEXTMARK 2U +#define BXS_MASK 3U + +#define HE_GETBOXLAYOUT 20 +#define HE_SETBOXLAYOUT 21 + +#define BXD_CELLWIDTH 12 +#define BXD_CELLHEIGHT 16 +#define BXD_BASEHEIGHT 13 +#define BXD_BASEHORZ 0 +#define BXD_CUSPHEIGHT 2 +#define BXD_ENDCUSPHEIGHT 4 + +/****** Screen Keyboard *****************************************************/ + +typedef struct tagSKBINFO + { + HWND hwnd; + UINT nPad; + BOOL fVisible; + BOOL fMinimized; + RECT rect; + DWORD dwReserved; + } + SKBINFO, FAR *LPSKBINFO; + +#define SKB_QUERY 0x0000 +#define SKB_SHOW 0x0001 +#define SKB_HIDE 0x0002 +#define SKB_CENTER 0x0010 +#define SKB_MOVE 0x0020 +#define SKB_MINIMIZE 0x0040 +#define SKB_FULL 0x0100 +#define SKB_BASIC 0x0200 +#define SKB_NUMPAD 0x0400 + +#define OBM_SKBBTNUP 32767 +#define OBM_SKBBTNDOWN 32766 +#define OBM_SKBBTNDISABLED 32765 + +#define SKN_CHANGED 1 + +#define SKN_POSCHANGED 1 +#define SKN_PADCHANGED 2 +#define SKN_MINCHANGED 4 +#define SKN_VISCHANGED 8 +#define SKN_TERMINATED 0xffff + +BOOL WINAPI ShowKeyboard(HWND, UINT, LPPOINT, LPSKBINFO); + +/****** New ComboBox Notifications *****************************************/ + +#define CBN_ENDREC 16 +#define CBN_DELAYEDRECOGFAIL 17 +#define CBN_RCRESULT 18 + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* #define _INC_PENWIN */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/penwoem.h b/private/oleauto/tools/win16/hdos/c800/include/penwoem.h new file mode 100644 index 000000000..b9c96d68c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/penwoem.h @@ -0,0 +1,75 @@ +/*****************************************************************************\ +* * +* penwoem.h - Pen Windows APIs into recognizer layer. * +* Assumes windows.h and penwin.h have been previously included. * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_PENWOEM /* prevent multiple includes */ +#define _INC_PENWOEM + +#ifndef RC_INVOKED +#pragma pack(1) +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +typedef int (CALLBACK *LPFUNCRESULTS) (LPRCRESULT, REC); + +/* Initialization Functions */ + +#define WCR_RECOGNAME 0 +#define WCR_QUERY 1 +#define WCR_CONFIGDIALOG 2 +#define WCR_DEFAULT 3 +#define WCR_RCCHANGE 4 +#define WCR_VERSION 5 +#define WCR_TRAIN 6 +#define WCR_TRAINSAVE 7 +#define WCR_TRAINMAX 8 +#define WCR_TRAINDIRTY 9 +#define WCR_TRAINCUSTOM 10 +#define WCR_QUERYLANGUAGE 11 +#define WCR_USERCHANGE 12 +#define WCR_PRIVATE 1024 + +/* sub-function of WCR_USERCHANGE */ +#define CRUC_REMOVE 1 + +/* Return values for WCR_TRAIN Function */ +#define TRAIN_NONE 0x0000 +#define TRAIN_DEFAULT 0x0001 +#define TRAIN_CUSTOM 0x0002 +#define TRAIN_BOTH (TRAIN_DEFAULT | TRAIN_CUSTOM) + +/* Control values for TRAINSAVE */ +#define TRAIN_SAVE 0 /* Save changes that have been made */ +#define TRAIN_REVERT 1 /* Discard changes that have been made */ + +UINT WINAPI ConfigRecognizer(UINT, WPARAM, LPARAM); +BOOL WINAPI InitRecognizer(LPRC); +VOID WINAPI CloseRecognizer(VOID); + +/* Recognition Functions */ +REC WINAPI RecognizeInternal(LPRC, LPFUNCRESULTS); +REC WINAPI RecognizeDataInternal(LPRC, HPENDATA, LPFUNCRESULTS); + +/* Training Functions */ +BOOL WINAPI TrainInkInternal(LPRC, HPENDATA, LPSYV); +BOOL WINAPI TrainContextInternal(LPRCRESULT, LPSYE, int, LPSYC, int); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* #define _INC_PENWOEM */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/pgchart.h b/private/oleauto/tools/win16/hdos/c800/include/pgchart.h new file mode 100644 index 000000000..5be26e358 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/pgchart.h @@ -0,0 +1,256 @@ +/*** +*pgchart.h - Declare constants, functions and macros for charting library. +* +* Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file declares the presentation graphics library functions and +* the structures and manifest constants that are used with them. +* +***************************************************************************/ + + +#ifdef __cplusplus +extern "C" { /* allow use with C++ */ +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* Force word alignment to avoid possible -Zp override */ +#pragma pack(2) + + +/* Required for the missing value definition */ +#ifndef FLT_MAX +#define FLT_MAX 3.402823466e+38F /* max value */ +#endif + +#define _PG_PALETTELEN 16 /* Number of entries in internal palette */ +#define _PG_MAXCHARTTYPE 5 /* Maximum available chart type */ +#define _PG_MAXCHARTSTYLE 2 /* Maximum chart style */ +#define _PG_TITLELEN 70 /* Maximum title text length */ + +#define _PG_LEFT 1 /* Positions used for titles and legends */ +#define _PG_CENTER 2 +#define _PG_RIGHT 3 +#define _PG_BOTTOM 4 +#define _PG_OVERLAY 5 + +#define _PG_LINEARAXIS 1 /* Used to specify axis types */ +#define _PG_LOGAXIS 2 + +#define _PG_DECFORMAT 1 /* Used to specify tic mark label format */ +#define _PG_EXPFORMAT 2 + +#define _PG_BARCHART 1 /* Charttype for a bar chart */ +#define _PG_COLUMNCHART 2 /* Charttype for a column chart */ +#define _PG_PLAINBARS 1 /* Styles for bar and column charts */ +#define _PG_STACKEDBARS 2 + +#define _PG_LINECHART 3 /* Charttype for a line chart */ +#define _PG_SCATTERCHART 4 /* Charttype for a scatter chart */ +#define _PG_POINTANDLINE 1 /* Styles for line and scatter charts */ +#define _PG_POINTONLY 2 + +#define _PG_PIECHART 5 /* Charttype for pie chart */ +#define _PG_PERCENT 1 /* Styles for pie charts */ +#define _PG_NOPERCENT 2 + +#define _PG_MISSINGVALUE (-FLT_MAX) /* Indicates missing data values */ + + +/* Error codes */ + +/* Numbers greater than 100 will terminate chart routine, others will cause + * default values to be used + */ +#define _PG_NOTINITIALIZED 102 /* If library not initialized */ +#define _PG_BADSCREENMODE 103 /* Graphics mode not set before charting */ +#define _PG_BADCHARTSTYLE 04 /* Chart style invalid */ +#define _PG_BADCHARTTYPE 104 /* Chart type invalid */ +#define _PG_BADLEGENDWINDOW 105 /* Invalid legend window specified */ +#define _PG_BADCHARTWINDOW 07 /* x1=x2 or y1=y2 in chart window spec. */ +#define _PG_BADDATAWINDOW 107 /* If chart window is too small */ +#define _PG_NOMEMORY 108 /* Not enough memory for data arrays */ +#define _PG_BADLOGBASE 05 /* Log base <= 0 */ +#define _PG_BADSCALEFACTOR 06 /* Scale factor = 0 */ +#define _PG_TOOSMALLN 109 /* Number of data points <= 0 */ +#define _PG_TOOFEWSERIES 110 /* Number of series <= 0 */ + + +/* Typedefs */ + +/* Typedef for chart title */ +#ifndef _TITLETYPE_DEFINED +typedef struct { + char title[_PG_TITLELEN]; /* Title text */ + short titlecolor; /* Internal palette color for title text */ + short justify; /* _PG_LEFT, _PG_CENTER, _PG_RIGHT */ +} _titletype; +#define _TITLETYPE_DEFINED +#endif + +/* Typedef for chart axes */ +#ifndef _AXISTYPE_DEFINED +typedef struct { + short grid; /* TRUE=grid lines drawn; FALSE no lines */ + short gridstyle; /* Style number from style pool for grid lines */ + _titletype axistitle; /* Title definition for axis */ + short axiscolor; /* Color for axis */ + short labeled; /* TRUE=tic marks and titles drawn */ + short rangetype; /* _PG_LINEARAXIS, _PG_LOGAXIS */ + float logbase; /* Base used if log axis */ + short autoscale; /* TRUE=next 7 values calculated by system */ + float scalemin; /* Minimum value of scale */ + float scalemax; /* Maximum value of scale */ + float scalefactor; /* Scale factor for data on this axis */ + _titletype scaletitle; /* Title definition for scaling factor */ + float ticinterval; /* Distance between tic marks (world coord.) */ + short ticformat; /* _PG_EXPFORMAT or _PG_DECFORMAT for tic labels */ + short ticdecimals; /* Number of decimals for tic labels (max=9)*/ +} _axistype; +#define _AXISTYPE_DEFINED +#endif + +/* Typedef used for defining chart and data windows */ +#ifndef _WINDOWTYPE_DEFINED +typedef struct { + short x1; /* Left edge of window in pixels */ + short y1; /* Top edge of window in pixels */ + short x2; /* Right edge of window in pixels */ + short y2; /* Bottom edge of window in pixels */ + short border; /* TRUE for border, FALSE otherwise */ + short background; /* Internal palette color for window bgnd */ + short borderstyle; /* Style bytes for window border */ + short bordercolor; /* Internal palette color for window border */ +} _windowtype; +#define _WINDOWTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _LEGENDTYPE_DEFINED +typedef struct { + short legend; /* TRUE=draw legend; FALSE=no legend */ + short place; /* _PG_RIGHT, _PG_BOTTOM, _PG_OVERLAY */ + short textcolor; /* Internal palette color for text */ + short autosize; /* TRUE=system calculates size */ + _windowtype legendwindow; /* Window definition for legend */ +} _legendtype; +#define _LEGENDTYPE_DEFINED +#endif + +/* Typedef for legend definition */ +#ifndef _CHARTENV_DEFINED +typedef struct { + short charttype; /* _PG_BARCHART, _PG_COLUMNCHART, + _PG_LINECHART, _PG_SCATTERCHART, + _PG_PIECHART */ + short chartstyle; /* Style for selected chart type */ + _windowtype chartwindow; /* Window definition for overall chart */ + _windowtype datawindow; /* Window definition for data part of chart */ + _titletype maintitle; /* Main chart title */ + _titletype subtitle; /* Chart sub-title */ + _axistype xaxis; /* Definition for X-axis */ + _axistype yaxis; /* Definition for Y-axis */ + _legendtype legend; /* Definition for legend */ +} _chartenv; +#define _CHARTENV_DEFINED +#endif + +/* Typedef for character bitmap */ +#ifndef _CHARMAP_DEFINED +typedef unsigned char _charmap[8]; +#define _CHARMAP_DEFINED +#endif + +/* Typedef for pattern bitmap */ +#ifndef _FILLMAP_DEFINED +typedef unsigned char _fillmap[8]; +#define _FILLMAP_DEFINED +#endif + +/* Typedef for palette entry definition */ +#ifndef _PALETTEENTRY_DEFINED +typedef struct { + unsigned short color; + unsigned short style; + _fillmap fill; + char plotchar; +} _paletteentry; +#define _PALETTEENTRY_DEFINED +#endif + +/* Typedef for palette definition */ +#ifndef _PALETTETYPE_DEFINED +typedef _paletteentry _palettetype[_PG_PALETTELEN]; +#define _PALETTETYPE_DEFINED +#endif + +/* Typedef for style sets */ +#ifndef _STYLESET_DEFINED +typedef unsigned short _styleset[_PG_PALETTELEN]; +#define _STYLESET_DEFINED +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define titletype _titletype +#define axistype _axistype +#define windowtype _windowtype +#define legendtype _legendtype +#define chartenv _chartenv +#define charmap _charmap +#define fillmap _fillmap +#define paletteentry _paletteentry +#define palettetype _palettetype +#define styleset _styleset +#endif + + +/* Function prototypes for charting routines */ + +short __far __cdecl _pg_initchart(void); +short __far __cdecl _pg_defaultchart(_chartenv __far *, short, short); + +short __far __cdecl _pg_chart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_chartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartscatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_chartscatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_chartpie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +/* Function prototypes for support routines */ + +short __far __cdecl _pg_hlabelchart(_chartenv __far *, short, short, short, const char __far *); +short __far __cdecl _pg_vlabelchart(_chartenv __far *, short, short, short, const char __far *); + +short __far __cdecl _pg_analyzechart(_chartenv __far *, const char __far * const __far *, const float __far *, short); +short __far __cdecl _pg_analyzechartms(_chartenv __far *, const char __far * const __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzescatter(_chartenv __far *, const float __far *, const float __far *, short); +short __far __cdecl _pg_analyzescatterms(_chartenv __far *, const float __far *, const float __far *, short, short, short, const char __far * const __far *); + +short __far __cdecl _pg_analyzepie(_chartenv __far *, const char __far * const __far *, const float __far *, const short __far *, short); + +short __far __cdecl _pg_getpalette(_paletteentry __far *); +short __far __cdecl _pg_setpalette(const _paletteentry __far *); +short __far __cdecl _pg_resetpalette(void); + +void __far __cdecl _pg_getstyleset(unsigned short __far *); +void __far __cdecl _pg_setstyleset(const unsigned short __far *); +void __far __cdecl _pg_resetstyleset(void); + +short __far __cdecl _pg_getchardef(short, unsigned char __far *); +short __far __cdecl _pg_setchardef(short, const unsigned char __far *); + + +/* Restore default packing */ +#pragma pack() + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/print.h b/private/oleauto/tools/win16/hdos/c800/include/print.h new file mode 100644 index 000000000..263dff97d --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/print.h @@ -0,0 +1,302 @@ +/*****************************************************************************\ +* * +* print.h - Printing helper functions, types, and definitions * +* * +* Copyright (c) 1985-1992. Microsoft Corp. All rights reserved.* +* * +******************************************************************************* +* +* PRINTDRIVER - For inclusion with a printer driver +* NOPQ - Prevent inclusion of priority queue APIs +* +\*****************************************************************************/ + +#ifndef _INC_PRINT +#define _INC_PRINT + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifdef PRINTDRIVER + +#define NORASTEROPS +#define NOTEXTMETRICS +#define NOGDICAPMASKS +#define NOGDIOBJ +#define NOBITMAP +#define NOSOUND +#define NOTEXTMETRIC +#define NOCOMM +#define NOKANJI + +#include <windows.h> + +#undef NORASTEROPS +#undef NOTEXTMETRICS +#undef NOGDICAPMASKS +#undef NOGDICAPMASKS +#undef NOGDIOBJ +#undef NOBITMAP +#undef NOSOUND +#undef NOTEXTMETRIC +#undef NOCOMM +#undef NOKANJI + +#define NOPTRC /* don't allow gdidefs.inc to redef these */ +#define PTTYPE POINT + +#define PQERROR (-1) + +#ifndef NOPQ + +DECLARE_HANDLE(HPQ); + +HPQ WINAPI CreatePQ(int); +int WINAPI MinPQ(HPQ); +int WINAPI ExtractPQ(HPQ); +int WINAPI InsertPQ(HPQ, int, int); +int WINAPI SizePQ(HPQ, int); +void WINAPI DeletePQ(HPQ); +#endif /* !NOPQ */ + +/* Spool routines for use by printer drivers */ + +DECLARE_HANDLE(HPJOB); + +HPJOB WINAPI OpenJob(LPSTR, LPSTR, HPJOB); +int WINAPI StartSpoolPage(HPJOB); +int WINAPI EndSpoolPage(HPJOB); +int WINAPI WriteSpool(HPJOB, LPSTR, int); +int WINAPI CloseJob(HPJOB); +int WINAPI DeleteJob(HPJOB, int); +int WINAPI WriteDialog(HPJOB, LPSTR, int); +int WINAPI DeleteSpoolPage(HPJOB); + +#endif /* !PRINTDRIVER */ + +typedef struct tagBANDINFOSTRUCT +{ + BOOL fGraphics; + BOOL fText; + RECT rcGraphics; +} BANDINFOSTRUCT, FAR* LPBI; + +#define USA_COUNTRYCODE 1 + +/* + * Printer driver initialization using ExtDeviceMode() + * and DeviceCapabilities(). + * This replaces Drivinit.h + */ + +/* size of a device name string */ +#define CCHDEVICENAME 32 +#define CCHPAPERNAME 64 + +/* current version of specification */ +#define DM_SPECVERSION 0x30A + +/* field selection bits */ +#define DM_ORIENTATION 0x0000001L +#define DM_PAPERSIZE 0x0000002L +#define DM_PAPERLENGTH 0x0000004L +#define DM_PAPERWIDTH 0x0000008L +#define DM_SCALE 0x0000010L +#define DM_COPIES 0x0000100L +#define DM_DEFAULTSOURCE 0x0000200L +#define DM_PRINTQUALITY 0x0000400L +#define DM_COLOR 0x0000800L +#define DM_DUPLEX 0x0001000L +#define DM_YRESOLUTION 0x0002000L +#define DM_TTOPTION 0x0004000L + +/* orientation selections */ +#define DMORIENT_PORTRAIT 1 +#define DMORIENT_LANDSCAPE 2 + +/* paper selections */ +/* Warning: The PostScript driver mistakingly uses DMPAPER_ values between + * 50 and 56. Don't use this range when defining new paper sizes. + */ +#define DMPAPER_FIRST DMPAPER_LETTER +#define DMPAPER_LETTER 1 /* Letter 8 1/2 x 11 in */ +#define DMPAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */ +#define DMPAPER_TABLOID 3 /* Tabloid 11 x 17 in */ +#define DMPAPER_LEDGER 4 /* Ledger 17 x 11 in */ +#define DMPAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */ +#define DMPAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */ +#define DMPAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */ +#define DMPAPER_A3 8 /* A3 297 x 420 mm */ +#define DMPAPER_A4 9 /* A4 210 x 297 mm */ +#define DMPAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */ +#define DMPAPER_A5 11 /* A5 148 x 210 mm */ +#define DMPAPER_B4 12 /* B4 250 x 354 */ +#define DMPAPER_B5 13 /* B5 182 x 257 mm */ +#define DMPAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */ +#define DMPAPER_QUARTO 15 /* Quarto 215 x 275 mm */ +#define DMPAPER_10X14 16 /* 10x14 in */ +#define DMPAPER_11X17 17 /* 11x17 in */ +#define DMPAPER_NOTE 18 /* Note 8 1/2 x 11 in */ +#define DMPAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */ +#define DMPAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */ +#define DMPAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */ +#define DMPAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */ +#define DMPAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */ +#define DMPAPER_CSHEET 24 /* C size sheet */ +#define DMPAPER_DSHEET 25 /* D size sheet */ +#define DMPAPER_ESHEET 26 /* E size sheet */ +#define DMPAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */ +#define DMPAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */ +#define DMPAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */ +#define DMPAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */ +#define DMPAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */ +#define DMPAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */ +#define DMPAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */ +#define DMPAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */ +#define DMPAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */ +#define DMPAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */ +#define DMPAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */ +#define DMPAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */ +#define DMPAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */ +#define DMPAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */ +#define DMPAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */ + +#define DMPAPER_LAST DMPAPER_FANFOLD_LGL_GERMAN + +#define DMPAPER_USER 256 + +/* bin selections */ +#define DMBIN_FIRST DMBIN_UPPER +#define DMBIN_UPPER 1 +#define DMBIN_ONLYONE 1 +#define DMBIN_LOWER 2 +#define DMBIN_MIDDLE 3 +#define DMBIN_MANUAL 4 +#define DMBIN_ENVELOPE 5 +#define DMBIN_ENVMANUAL 6 +#define DMBIN_AUTO 7 +#define DMBIN_TRACTOR 8 +#define DMBIN_SMALLFMT 9 +#define DMBIN_LARGEFMT 10 +#define DMBIN_LARGECAPACITY 11 +#define DMBIN_CASSETTE 14 +#define DMBIN_LAST DMBIN_CASSETTE + +#define DMBIN_USER 256 /* device specific bins start here */ + +/* print qualities */ +#define DMRES_DRAFT (-1) +#define DMRES_LOW (-2) +#define DMRES_MEDIUM (-3) +#define DMRES_HIGH (-4) + +/* color enable/disable for color printers */ +#define DMCOLOR_MONOCHROME 1 +#define DMCOLOR_COLOR 2 + +/* duplex enable */ +#define DMDUP_SIMPLEX 1 +#define DMDUP_VERTICAL 2 +#define DMDUP_HORIZONTAL 3 + +/* TrueType options */ +#define DMTT_BITMAP 1 /* print TT fonts as graphics */ +#define DMTT_DOWNLOAD 2 /* download TT fonts as soft fonts */ +#define DMTT_SUBDEV 3 /* substitute device fonts for TT fonts */ + +typedef struct tagDEVMODE +{ + char dmDeviceName[CCHDEVICENAME]; + UINT dmSpecVersion; + UINT dmDriverVersion; + UINT dmSize; + UINT dmDriverExtra; + DWORD dmFields; + int dmOrientation; + int dmPaperSize; + int dmPaperLength; + int dmPaperWidth; + int dmScale; + int dmCopies; + int dmDefaultSource; + int dmPrintQuality; + int dmColor; + int dmDuplex; + int dmYResolution; + int dmTTOption; +} DEVMODE; + +typedef DEVMODE* PDEVMODE, NEAR* NPDEVMODE, FAR* LPDEVMODE; + +/* mode selections for the device mode function */ +#define DM_UPDATE 1 +#define DM_COPY 2 +#define DM_PROMPT 4 +#define DM_MODIFY 8 + +#define DM_IN_BUFFER DM_MODIFY +#define DM_IN_PROMPT DM_PROMPT +#define DM_OUT_BUFFER DM_COPY +#define DM_OUT_DEFAULT DM_UPDATE + +/* device capabilities indices */ +#define DC_FIELDS 1 +#define DC_PAPERS 2 +#define DC_PAPERSIZE 3 +#define DC_MINEXTENT 4 +#define DC_MAXEXTENT 5 +#define DC_BINS 6 +#define DC_DUPLEX 7 +#define DC_SIZE 8 +#define DC_EXTRA 9 +#define DC_VERSION 10 +#define DC_DRIVER 11 +#define DC_BINNAMES 12 +#define DC_ENUMRESOLUTIONS 13 +#define DC_FILEDEPENDENCIES 14 +#define DC_TRUETYPE 15 +#define DC_PAPERNAMES 16 +#define DC_ORIENTATION 17 +#define DC_COPIES 18 + +/* bit fields of the return value (DWORD) for DC_TRUETYPE */ +#define DCTT_BITMAP 0x0000001L +#define DCTT_DOWNLOAD 0x0000002L +#define DCTT_SUBDEV 0x0000004L + +/* export ordinal definitions */ +#define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90) +#define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91) +#define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13) + +/* define types of pointers to ExtDeviceMode() and DeviceCapabilities() + * functions + */ +typedef UINT (CALLBACK* LPFNDEVMODE)(HWND, HMODULE, DEVMODE FAR*, + LPSTR, LPSTR, DEVMODE FAR*, LPSTR, UINT); + +typedef DWORD (CALLBACK* LPFNDEVCAPS)(LPSTR, LPSTR, UINT, LPSTR, DEVMODE FAR*); + +HDC WINAPI ResetDC(HDC, const DEVMODE FAR*); + +/* this structure is used by the GETSETSCREENPARAMS escape */ +typedef struct tagSCREENPARAMS +{ + int angle; + int frequency; +} SCREENPARAMS; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_PRINT */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/process.h b/private/oleauto/tools/win16/hdos/c800/include/process.h new file mode 100644 index 000000000..56e67d8c2 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/process.h @@ -0,0 +1,144 @@ +/*** +*process.h - definition and declarations for process control functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations and definitions for the +* spawnxx, execxx, and various other process control routines. +* +****/ + +#ifndef _INC_PROCESS + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* mode values for spawnxx routines + * (only P_WAIT and P_OVERLAY are supported on MS-DOS) + */ + +#ifndef _MT +extern int __near __cdecl _p_overlay; +#endif + +#define _P_WAIT 0 +#define _P_NOWAIT 1 +#ifdef _MT +#define _P_OVERLAY 2 +#else +#define _P_OVERLAY _p_overlay +#endif +#define _OLD_P_OVERLAY 2 +#define _P_NOWAITO 3 +#define _P_DETACH 4 + + +/* function prototypes */ + +#ifdef _MT +int __cdecl _beginthread(void(__cdecl *)(void *), + void *, unsigned, void *); +void __cdecl _endthread(void); +#endif +void __cdecl abort(void); +void __cdecl _cexit(void); +void __cdecl _c_exit(void); +#ifndef _WINDOWS +int __cdecl _execl(const char *, const char *, ...); +int __cdecl _execle(const char *, const char *, ...); +int __cdecl _execlp(const char *, const char *, ...); +int __cdecl _execlpe(const char *, const char *, ...); +int __cdecl _execv(const char *, + const char * const *); +int __cdecl _execve(const char *, + const char * const *, const char * const *); +int __cdecl _execvp(const char *, + const char * const *); +int __cdecl _execvpe(const char *, + const char * const *, const char * const *); +#endif +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __cdecl _getpid(void); +#ifndef _WINDOWS +int __cdecl _spawnl(int, const char *, const char *, + ...); +int __cdecl _spawnle(int, const char *, const char *, + ...); +int __cdecl _spawnlp(int, const char *, const char *, + ...); +int __cdecl _spawnlpe(int, const char *, const char *, + ...); +int __cdecl _spawnv(int, const char *, + const char * const *); +int __cdecl _spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl _spawnvp(int, const char *, + const char * const *); +int __cdecl _spawnvpe(int, const char *, + const char * const *, const char * const *); +int __cdecl system(const char *); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_WAIT _P_WAIT +#define P_NOWAIT _P_NOWAIT +#define P_OVERLAY _P_OVERLAY +#define OLD_P_OVERLAY _OLD_P_OVERLAY +#define P_NOWAITO _P_NOWAITO +#define P_DETACH _P_DETACH + +#ifndef _WINDOWS +int __cdecl execl(const char *, const char *, ...); +int __cdecl execle(const char *, const char *, ...); +int __cdecl execlp(const char *, const char *, ...); +int __cdecl execlpe(const char *, const char *, ...); +int __cdecl execv(const char *, + const char * const *); +int __cdecl execve(const char *, + const char * const *, const char * const *); +int __cdecl execvp(const char *, + const char * const *); +int __cdecl execvpe(const char *, + const char * const *, const char * const *); +#endif +int __cdecl getpid(void); +#ifndef _WINDOWS +int __cdecl spawnl(int, const char *, const char *, + ...); +int __cdecl spawnle(int, const char *, const char *, + ...); +int __cdecl spawnlp(int, const char *, const char *, + ...); +int __cdecl spawnlpe(int, const char *, const char *, + ...); +int __cdecl spawnv(int, const char *, + const char * const *); +int __cdecl spawnve(int, const char *, + const char * const *, const char * const *); +int __cdecl spawnvp(int, const char *, + const char * const *); +int __cdecl spawnvpe(int, const char *, + const char * const *, const char * const *); +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_PROCESS +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h b/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h new file mode 100644 index 000000000..337f02311 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/scrnsave.h @@ -0,0 +1,168 @@ +/*****************************************************************************\ +* * +* scrnsave.h Windows 3.1 screensaver defines and definitions. +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_SCRNSAVE +#define _INC_SCRNSAVE + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* !RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If not included with 3.1 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define LPARAM LONG +#define WPARAM WORD +#define LRESULT LONG +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#endif /* _INC_WINDOWS */ + + +/* Icon resource ID. + * + * This should be the first icon used and must have this resource number. + * This is needed as the first icon in the file will be grabbed + */ +#define ID_APP 100 +#define DLG_CHANGEPASSWORD 2000 +#define DLG_ENTERPASSWORD 2001 +#define DLG_INVALIDPASSWORD 2002 +#define DLG_SCRNSAVECONFIGURE 2003 + +#define idsIsPassword 1000 +#define idsIniFile 1001 +#define idsScreenSaver 1002 +#define idsPassword 1003 +#define idsDifferentPW 1004 +#define idsChangePW 1005 +#define idsBadOldPW 1006 +#define idsAppName 1007 +#define idsNoHelpMemory 1008 +#define idsHelpFile 1009 + +/* This function is the Window Procedure for the screen saver. It is + * up to the programmer to handle any of the messages that wish to be + * interpretted. Any unused messages are then passed back to + * DefScreenSaverProc if desired which will take default action on any + * unprocessed message... + */ +LRESULT WINAPI ScreenSaverProc(HWND, unsigned, UINT, LPARAM); + +/* This function performs default message processing. Currently handles + * the following messages: + * + * WM_SYSCOMMAND: return FALSE if wParam is SC_SCREENSAVE or SC_CLOSE + * + * WM_DESTROY: PostQuitMessage(0) + * + * WM_SETCURSOR: By default, this will set the cursor to a null cursor, + * thereby removing it from the screen. + * + * WM_LBUTTONDOWN: + * WM_MBUTTONDOWN: + * WM_RBUTTONDOWN: + * WM_KEYDOWN: + * WM_KEYUP: + * WM_MOUSEMOVE: By default, these will cause the program to terminate. + * Unless the password option is enabled. In that case + * the DlgGetPassword() dialog box is brought up. + * + * WM_NCACTIVATE: + * WM_ACTIVATEAPP: + * WM_ACTIVATE: By default, if the wParam parameter is FALSE (signifying + * that transfer is being taken away from the application), + * then the program will terminate. Termination is + * accomplished by generating a WM_CLOSE message. This way, + * if the user sets something up in the WM_CREATE, a + * WM_DESTROY will be generated and it can be destroyed + * properly. + * This message is ignored, however is the password option + * is enabled. + */ +LRESULT WINAPI DefScreenSaverProc(HWND, UINT, WPARAM, LPARAM); + +/* A function is also needed for configuring the screen saver. The function + * should be exactly like it is below and must be exported such that the + * program can use MAKEPROCINSTANCE on it and call up a dialog box. Further- + * more, the template used for the dialog must be called + * ScreenSaverConfigure to allow the main function to access it... + */ +BOOL WINAPI ScreenSaverConfigureDialog(HWND, UINT, WPARAM, LPARAM); + +/* This function is called from the ScreenSaveConfigureDialog() to change + * the Screen Saver's password. Note: passwords are GLOBAL to all + * screen savers using this model. Whether or not the password is enabled + * is LOCAL to a particular screen saver. + */ +BOOL WINAPI DlgChangePassword(HWND, UINT, WPARAM, LPARAM); + +/* To allow the programmer the ability to register child control windows, this + * function is called prior to the creation of the dialog box. Any + * registering that is required should be done here, or return TRUE if none + * is needed... + */ +BOOL _cdecl RegisterDialogClasses(HINSTANCE); + +/* The following three functions are called by DefScreenSaverProc and must + * be exported by all screensavers using this model. + */ +BOOL WINAPI DlgGetPassword(HWND, UINT, WPARAM, LPARAM); +BOOL WINAPI DlgInvalidPassword(HWND, UINT, WPARAM, LPARAM); +DWORD WINAPI HelpMessageFilterHookFunction(int, WORD, LPMSG); + +/* + * There are only three other points that should be of notice: + * 1) The screen saver must have a string declared as 'szAppName' contaning the + * name of the screen saver, and it must be declared as a global. + * 2) The screen saver EXE file should be renamed to a file with a SCR + * extension so that the screen saver dialog form the control panel can + * find it when is searches for screen savers. + */ +#define WS_GT (WS_GROUP | WS_TABSTOP) +#define MAXFILELEN 13 +#define TITLEBARNAMELEN 40 +#define BUFFLEN 255 + +/* The following globals are defined in scrnsave.lib */ +extern HINSTANCE _cdecl hMainInstance; +extern HWND _cdecl hMainWindow; +extern char _cdecl szName[TITLEBARNAMELEN]; +extern char _cdecl szIsPassword[22]; +extern char _cdecl szIniFile[MAXFILELEN]; +extern char _cdecl szScreenSaver[22]; +extern char _cdecl szPassword[16]; +extern char _cdecl szDifferentPW[BUFFLEN]; +extern char _cdecl szChangePW[30]; +extern char _cdecl szBadOldPW[BUFFLEN]; +extern char _cdecl szHelpFile[MAXFILELEN]; +extern char _cdecl szNoHelpMemory[BUFFLEN]; +extern UINT _cdecl MyHelpMessage; +extern HOOKPROC _cdecl fpMessageFilter; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* !RC_INVOKED */ + +#endif /* !_INC_SCRNSAVE */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/search.h b/private/oleauto/tools/win16/hdos/c800/include/search.h new file mode 100644 index 000000000..5418887c6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/search.h @@ -0,0 +1,59 @@ +/*** +*search.h - declarations for searcing/sorting routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations for the sorting and +* searching routines. +* [System V] +* +****/ + +#ifndef _INC_SEARCH + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + + +/* function prototypes */ + +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl _lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl _lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl lfind(const void *, const void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +void * __cdecl lsearch(const void *, void *, + unsigned int *, unsigned int, int (__cdecl *) + (const void *, const void *)); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_SEARCH +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/setjmp.h b/private/oleauto/tools/win16/hdos/c800/include/setjmp.h new file mode 100644 index 000000000..4f96d20c6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/setjmp.h @@ -0,0 +1,44 @@ +/*** +*setjmp.h - definitions/declarations for setjmp/longjmp routines +* +* Copyright (c) 1985-1993, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the machine-dependent buffer used by +* setjmp/longjmp to save and restore the program state, and +* declarations for those routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SETJMP + +#ifndef __cplusplus + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +/* define the buffer type for holding the state information */ + +#define _JBLEN 9 /* bp, di, si, sp, ret addr, ds */ + +#ifndef _JMP_BUF_DEFINED +typedef int jmp_buf[_JBLEN]; +#define _JMP_BUF_DEFINED +#endif + +/* ANSI requires setjmp be a macro */ + +#define setjmp _setjmp + +/* function prototypes */ + +int __cdecl _setjmp(jmp_buf); +void __cdecl longjmp(jmp_buf, int); + +#endif + +#define _INC_SETJMP +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/share.h b/private/oleauto/tools/win16/hdos/c800/include/share.h new file mode 100644 index 000000000..bc5398db4 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/share.h @@ -0,0 +1,29 @@ +/*** +*share.h - defines file sharing modes for sopen +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the file sharing modes for sopen(). +* +****/ + +#ifndef _INC_SHARE + +#define _SH_COMPAT 0x00 /* compatibility mode */ +#define _SH_DENYRW 0x10 /* deny read/write mode */ +#define _SH_DENYWR 0x20 /* deny write mode */ +#define _SH_DENYRD 0x30 /* deny read mode */ +#define _SH_DENYNO 0x40 /* deny none mode */ + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +#define SH_COMPAT _SH_COMPAT +#define SH_DENYRW _SH_DENYRW +#define SH_DENYWR _SH_DENYWR +#define SH_DENYRD _SH_DENYRD +#define SH_DENYNO _SH_DENYNO +#endif + +#define _INC_SHARE +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/shellapi.h b/private/oleauto/tools/win16/hdos/c800/include/shellapi.h new file mode 100644 index 000000000..af978b924 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/shellapi.h @@ -0,0 +1,88 @@ +/*****************************************************************************\ +* * +* shellapi.h - SHELL.DLL functions, types, and definitions * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +\*****************************************************************************/ + +#ifndef _INC_SHELLAPI +#define _INC_SHELLAPI + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* If included with Windows 3.0 windows.h: define 3.1-compatible types */ + +#ifndef _INC_WINDOWS + +#define HDROP HANDLE +#define WINAPI FAR PASCAL +#define LPCSTR LPSTR +#define UINT WORD + +#else + +DECLARE_HANDLE(HDROP); + +#endif + +/* return codes from Registration functions */ +#define ERROR_SUCCESS 0L +#define ERROR_BADDB 1L +#define ERROR_BADKEY 2L +#define ERROR_CANTOPEN 3L +#define ERROR_CANTREAD 4L +#define ERROR_CANTWRITE 5L +#define ERROR_OUTOFMEMORY 6L +#define ERROR_INVALID_PARAMETER 7L +#define ERROR_ACCESS_DENIED 8L + +#define REG_SZ 1 /* string type */ + +#define HKEY_CLASSES_ROOT 1 + +typedef DWORD HKEY; +typedef HKEY FAR* PHKEY; + +LONG WINAPI RegOpenKey(HKEY, LPCSTR, HKEY FAR*); +LONG WINAPI RegCreateKey(HKEY, LPCSTR, HKEY FAR*); +LONG WINAPI RegCloseKey(HKEY); +LONG WINAPI RegDeleteKey(HKEY, LPCSTR); +LONG WINAPI RegSetValue(HKEY, LPCSTR, DWORD, LPCSTR, DWORD); +LONG WINAPI RegQueryValue(HKEY, LPCSTR, LPSTR, LONG FAR*); +LONG WINAPI RegEnumKey(HKEY, DWORD, LPSTR, DWORD); + +UINT WINAPI DragQueryFile(HDROP, UINT, LPSTR, UINT); +BOOL WINAPI DragQueryPoint(HDROP, POINT FAR*); +void WINAPI DragFinish(HDROP); +void WINAPI DragAcceptFiles(HWND, BOOL); + +HICON WINAPI ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex); + +/* error values for ShellExecute() beyond the regular WinExec() codes */ +#define SE_ERR_SHARE 26 +#define SE_ERR_ASSOCINCOMPLETE 27 +#define SE_ERR_DDETIMEOUT 28 +#define SE_ERR_DDEFAIL 29 +#define SE_ERR_DDEBUSY 30 +#define SE_ERR_NOASSOC 31 + +HINSTANCE WINAPI ShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int iShowCmd); +HINSTANCE WINAPI FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_SHELLAPI */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/signal.h b/private/oleauto/tools/win16/hdos/c800/include/signal.h new file mode 100644 index 000000000..c8894ef02 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/signal.h @@ -0,0 +1,70 @@ +/*** +*signal.h - defines signal values and routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the signal values and declares the signal functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_SIGNAL + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#endif + +#ifndef _SIG_ATOMIC_T_DEFINED +typedef int sig_atomic_t; +#define _SIG_ATOMIC_T_DEFINED +#endif + +#define NSIG 23 /* maximum signal number + 1 */ + + +/* signal types */ + +#ifndef _WINDOWS +#define SIGINT 2 /* Ctrl-C sequence */ +#define SIGILL 4 /* illegal instruction - invalid function image */ +#endif +#define SIGFPE 8 /* floating point exception */ +#ifndef _WINDOWS +#define SIGSEGV 11 /* segment violation */ +#define SIGTERM 15 /* Software termination signal from kill */ +#define SIGABRT 22 /* abnormal termination triggered by abort call */ +#endif + + +/* signal action codes */ + +/* default signal action */ +#define SIG_DFL (void (__cdecl *)(int))0 + +/* ignore */ +#define SIG_IGN (void (__cdecl *)(int))1 + +/* signal error value (returned by signal call on error) */ +#define SIG_ERR (void (__cdecl *)(int))-1 + + +/* function prototypes */ + +void (__cdecl * __cdecl signal(int, + void (__cdecl *)(int)))(int); +#ifndef _MT +int __cdecl raise(int); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_SIGNAL +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdarg.h b/private/oleauto/tools/win16/hdos/c800/include/stdarg.h new file mode 100644 index 000000000..f1d6f7ef7 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdarg.h @@ -0,0 +1,52 @@ +/*** +*stdarg.h - defines ANSI-style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines ANSI-style macros for accessing arguments +* of functions which take a variable number of arguments. +* [ANSI] +* +****/ + +#ifndef _INC_STDARG + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_start(ap,v) ap = (va_list)&v + _INTSIZEOF(v) +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif + +#define _INC_STDARG +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stddef.h b/private/oleauto/tools/win16/hdos/c800/include/stddef.h new file mode 100644 index 000000000..2423b1229 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stddef.h @@ -0,0 +1,80 @@ +/*** +*stddef.h - definitions/declarations for common constants, types, variables +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains definitions and declarations for some commonly +* used constants, types, and variables. +* [ANSI] +* +****/ + +#ifndef _INC_STDDEF + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +/* define the NULL pointer value and the offsetof() macro */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* offset of field m in a struct s */ + +#define offsetof(s,m) (size_t)( (char *)&(((s *)0)->m) - (char *)0 ) + + +/* errno declaration */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +#define errno (*_errno()) +#else +extern int __near __cdecl volatile errno; +#endif + + +/* define the implementation dependent size types */ + +#ifndef _PTRDIFF_T_DEFINED +typedef int ptrdiff_t; +#define _PTRDIFF_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +#ifdef _MT +/* define pointer to thread id value */ + +extern int __far *_threadid; +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDDEF +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdio.h b/private/oleauto/tools/win16/hdos/c800/include/stdio.h new file mode 100644 index 000000000..b968e041c --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdio.h @@ -0,0 +1,352 @@ +/*** +*stdio.h - definitions/declarations for standard I/O routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the level 2 I/O ("standard I/O") routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STDIO + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _VA_LIST_DEFINED +typedef char *va_list; +#define _VA_LIST_DEFINED +#endif + +/* buffered I/O macros */ + +#define BUFSIZ 512 +#ifdef _MT +#define _NFILE 40 +#else +#define _NFILE 20 +#endif +#define EOF (-1) + +#ifndef _FILE_DEFINED +#pragma pack(2) +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + char _flag; + char _file; + }; +typedef struct _iobuf FILE; +#pragma pack() +#define _FILE_DEFINED +#endif + + +/* _P_tmpnam: Directory where temporary files may be created. + * L_tmpnam size = size of _P_tmpdir + * + 1 (in case _P_tmpdir does not end in "\\") + * + 6 (for the temp number string) + * + 1 (for the null terminator) + */ + +#define _P_tmpdir "\\" +#define L_tmpnam sizeof(_P_tmpdir)+8 + + +/* fseek constants */ + +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + + +/* minimum guaranteed filename length, open file count, and unique + * tmpnam filenames. + */ + +#define FILENAME_MAX 128 +#define FOPEN_MAX 18 +#define TMP_MAX 32767 +#define _SYS_OPEN 20 + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* declare _iob[] array */ + +#ifndef _STDIO_DEFINED +extern FILE __near __cdecl _iob[]; +#endif + + +/* define file position type */ + +#ifndef _FPOS_T_DEFINED +typedef long fpos_t; +#define _FPOS_T_DEFINED +#endif + + +/* standard file pointers */ + +#ifndef _WINDLL +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define stderr (&_iob[2]) +#endif +#ifndef _WINDOWS +#define _stdaux (&_iob[3]) +#define _stdprn (&_iob[4]) +#endif + + +#define _IOREAD 0x01 +#define _IOWRT 0x02 + +#define _IOFBF 0x0 +#define _IOLBF 0x40 +#define _IONBF 0x04 + +#define _IOMYBUF 0x08 +#define _IOEOF 0x10 +#define _IOERR 0x20 +#define _IOSTRG 0x40 +#define _IORW 0x80 + + +#ifdef _WINDOWS +#ifndef _WINDLL +#ifndef _WINFO_DEFINED +/* interface version number */ +#define _QWINVER 0 + +/* max number of windows */ +#define _WFILE 20 + +/* values for windows screen buffer size */ +#define _WINBUFINF 0 +#define _WINBUFDEF -1 + +/* size/move settings */ +#define _WINSIZEMIN 1 +#define _WINSIZEMAX 2 +#define _WINSIZERESTORE 3 +#define _WINSIZECHAR 4 + +/* size/move query types */ +#define _WINMAXREQ 100 +#define _WINCURRREQ 101 + +/* values for closing window */ +#define _WINPERSIST 1 +#define _WINNOPERSIST 0 + +/* pseudo file handle for frame window */ +#define _WINFRAMEHAND -1 + +/* menu items */ +#define _WINSTATBAR 1 +#define _WINTILE 2 +#define _WINCASCADE 3 +#define _WINARRANGE 4 + +/* quickwin exit options */ +#define _WINEXITPROMPT 1 +#define _WINEXITNOPERSIST 2 +#define _WINEXITPERSIST 3 + +/* open structure */ +#pragma pack(2) +struct _wopeninfo { + unsigned int _version; + const char __far * _title; + long _wbufsize; + }; +#pragma pack() + +/* size/move structure */ +struct _wsizeinfo { + unsigned int _version; + unsigned int _type; + unsigned int _x; + unsigned int _y; + unsigned int _h; + unsigned int _w; + }; +#define _WINFO_DEFINED +#endif +#endif +#endif + +/* function prototypes */ + +#ifndef _STDIO_DEFINED +int __cdecl _filbuf(FILE *); +int __cdecl _flsbuf(int, FILE *); +FILE * __cdecl _fsopen(const char *, + const char *, int); +void __cdecl clearerr(FILE *); +int __cdecl fclose(FILE *); +int __cdecl _fcloseall(void); +FILE * __cdecl _fdopen(int, const char *); +int __cdecl feof(FILE *); +int __cdecl ferror(FILE *); +int __cdecl fflush(FILE *); +int __cdecl fgetc(FILE *); +#ifndef _WINDLL +int __cdecl _fgetchar(void); +#endif +int __cdecl fgetpos(FILE *, fpos_t *); +char * __cdecl fgets(char *, int, FILE *); +int __cdecl _fileno(FILE *); +int __cdecl _flushall(void); +FILE * __cdecl fopen(const char *, + const char *); +int __cdecl fprintf(FILE *, const char *, ...); +int __cdecl fputc(int, FILE *); +#ifndef _WINDLL +int __cdecl _fputchar(int); +#endif +int __cdecl fputs(const char *, FILE *); +size_t __cdecl fread(void *, size_t, size_t, FILE *); +FILE * __cdecl freopen(const char *, + const char *, FILE *); +#ifndef _WINDLL +int __cdecl fscanf(FILE *, const char *, ...); +#endif +int __cdecl fsetpos(FILE *, const fpos_t *); +int __cdecl fseek(FILE *, long, int); +long __cdecl ftell(FILE *); +#ifdef _WINDOWS +#ifndef _WINDLL +FILE * __cdecl _fwopen(struct _wopeninfo *, struct _wsizeinfo *, const char *); +#endif +#endif +size_t __cdecl fwrite(const void *, size_t, size_t, + FILE *); +int __cdecl getc(FILE *); +#ifndef _WINDLL +int __cdecl getchar(void); +char * __cdecl gets(char *); +#endif +int __cdecl _getw(FILE *); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +#ifndef _WINDLL +int __cdecl printf(const char *, ...); +#endif +int __cdecl putc(int, FILE *); +#ifndef _WINDLL +int __cdecl putchar(int); +int __cdecl puts(const char *); +#endif +int __cdecl _putw(int, FILE *); +int __cdecl remove(const char *); +int __cdecl rename(const char *, const char *); +void __cdecl rewind(FILE *); +int __cdecl _rmtmp(void); +#ifndef _WINDLL +int __cdecl scanf(const char *, ...); +#endif +void __cdecl setbuf(FILE *, char *); +int __cdecl setvbuf(FILE *, char *, int, size_t); +int __cdecl _snprintf(char *, size_t, const char *, ...); +int __cdecl sprintf(char *, const char *, ...); +#ifndef _WINDLL +int __cdecl sscanf(const char *, const char *, ...); +#endif +char * __cdecl _tempnam(char *, char *); +FILE * __cdecl tmpfile(void); +char * __cdecl tmpnam(char *); +int __cdecl ungetc(int, FILE *); +int __cdecl _unlink(const char *); +int __cdecl vfprintf(FILE *, const char *, va_list); +#ifndef _WINDLL +int __cdecl vprintf(const char *, va_list); +#endif +int __cdecl _vsnprintf(char *, size_t, const char *, va_list); +int __cdecl vsprintf(char *, const char *, va_list); +#define _STDIO_DEFINED +#endif + +/* macro definitions */ + +#define feof(_stream) ((_stream)->_flag & _IOEOF) +#define ferror(_stream) ((_stream)->_flag & _IOERR) +#define _fileno(_stream) ((int)(unsigned char)(_stream)->_file) +#define getc(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ \ + : _filbuf(_stream)) +#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \ + ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) +#ifndef _WINDLL +#define getchar() getc(stdin) +#define putchar(_c) putc((_c),stdout) +#endif + +#ifdef _MT +#undef getc +#undef putc +#undef getchar +#undef putchar +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define P_tmpdir _P_tmpdir +#define SYS_OPEN _SYS_OPEN + +#ifndef _WINDOWS +#define stdaux _stdaux +#define stdprn _stdprn +#endif + +int __cdecl fcloseall(void); +FILE * __cdecl fdopen(int, const char *); +#ifndef _WINDLL +int __cdecl fgetchar(void); +#endif +int __cdecl fileno(FILE *); +int __cdecl flushall(void); +#ifndef _WINDLL +int __cdecl fputchar(int); +#endif +int __cdecl getw(FILE *); +int __cdecl putw(int, FILE *); +int __cdecl rmtmp(void); +char * __cdecl tempnam(char *, char *); +int __cdecl unlink(const char *); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDIO +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h b/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h new file mode 100644 index 000000000..ac8d3e744 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdiostr.h @@ -0,0 +1,55 @@ +/*** +*stdiostr.h - definitions/declarations for stdiobuf, stdiostream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the stdiostream and stdiobuf classes. +* [AT&T C++] +* +****/ + +#include <iostream.h> +#include <stdio.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifndef _INC_STDIOSTREAM +#define _INC_STDIOSTREAM +class stdiobuf : public streambuf { +public: + stdiobuf(FILE* f); +FILE * stdiofile() { return _str; } + +virtual int pbackfail(int c); +virtual int overflow(int c = EOF); +virtual int underflow(); +virtual streampos seekoff( streamoff, ios::seek_dir, int =ios::in|ios::out); +virtual int sync(); + ~stdiobuf(); + int setrwbuf(int _rsize, int _wsize); // CONSIDER: move to ios:: +// protected: +// virtual int doallocate(); +private: + FILE * _str; +}; + +// obsolescent +class stdiostream : public iostream { // note: spec.'d as : public IOS... +public: + stdiostream(FILE *); + ~stdiostream(); + stdiobuf* rdbuf() const { return (stdiobuf*) ostream::rdbuf(); } + +private: +}; + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stdlib.h b/private/oleauto/tools/win16/hdos/c800/include/stdlib.h new file mode 100644 index 000000000..d32171a05 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stdlib.h @@ -0,0 +1,282 @@ +/*** +*stdlib.h - declarations/definitions for commonly used library functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* commonly used library functions which either don't fit somewhere +* else, or, like toupper/tolower, can't be declared in the normal +* place for other reasons. +* [ANSI] +* +****/ + +#ifndef _INC_STDLIB + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* exit() arg values */ + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +#ifndef _ONEXIT_T_DEFINED +typedef int (__cdecl * _onexit_t)(); +typedef int (__far __cdecl * _fonexit_t)(); +#ifndef __STDC__ +/* Non-ANSI name for compatibility */ +typedef int (__cdecl * onexit_t)(); +#endif +#define _ONEXIT_T_DEFINED +#endif + + +/* data structure definitions for div and ldiv runtimes. */ + +#ifndef _DIV_T_DEFINED + +typedef struct _div_t { + int quot; + int rem; +} div_t; + +typedef struct _ldiv_t { + long quot; + long rem; +} ldiv_t; + +#define _DIV_T_DEFINED +#endif + +/* maximum value that can be returned by the rand function. */ + +#define RAND_MAX 0x7fff + +extern unsigned short __mb_cur_max; /* mb-len for curr. locale */ +#define MB_CUR_MAX __mb_cur_max + + +/* min and max macros */ + +#define __max(a,b) (((a) > (b)) ? (a) : (b)) +#define __min(a,b) (((a) < (b)) ? (a) : (b)) + + +/* sizes for buffers used by the _makepath() and _splitpath() functions. + * note that the sizes include space for 0-terminator + */ + +#define _MAX_PATH 260 /* max. length of full pathname */ +#define _MAX_DRIVE 3 /* max. length of drive component */ +#define _MAX_DIR 256 /* max. length of path component */ +#define _MAX_FNAME 256 /* max. length of file name component */ +#define _MAX_EXT 256 /* max. length of extension component */ + +/* external variable declarations */ + +#ifdef _MT +extern int __far * __cdecl __far volatile _errno(void); +extern int __far * __cdecl __far __doserrno(void); +#define errno (*_errno()) +#define _doserrno (*__doserrno()) +#else +extern int __near __cdecl volatile errno; /* error value */ +extern int __near __cdecl _doserrno; /* OS system error value */ +#endif + +extern char * __near __cdecl _sys_errlist[]; /* perror error message table */ +extern int __near __cdecl _sys_nerr; /* # of entries in sys_errlist table */ +extern char ** __near __cdecl _environ; /* pointer to environment table */ +extern int __near __cdecl _fmode; /* default file translation mode */ +#ifndef _WINDOWS +extern int __near __cdecl _fileinfo; /* open file info mode (for spawn) */ +#endif + +extern unsigned int __near __cdecl _psp; /* Program Segment Prefix */ + +extern char __far * __near __cdecl _pgmptr; /* Pointer to Program name */ + +/* DOS and Windows major/minor version numbers */ + +extern unsigned int __near __cdecl _osver; +extern unsigned char __near __cdecl _osmajor; +extern unsigned char __near __cdecl _osminor; +extern unsigned int __near __cdecl _winver; +extern unsigned char __near __cdecl _winmajor; +extern unsigned char __near __cdecl _winminor; + +/* OS mode */ + +#define _DOS_MODE 0 /* DOS */ +#define _OS2_MODE 1 /* OS/2 */ +#define _WIN_MODE 2 /* Windows */ + +extern unsigned char __near __cdecl _osmode; + +/* CPU mode */ + +#define _REAL_MODE 0 /* real mode */ +#define _PROT_MODE 1 /* protect mode */ + +extern unsigned char __near __cdecl _cpumode; + +/* function prototypes */ + +#ifdef _MT +double __pascal atof(const char *); +double __pascal strtod(const char *, char * *); +ldiv_t __pascal ldiv(long, long); +#else +double __cdecl atof(const char *); +double __cdecl strtod(const char *, char * *); +ldiv_t __cdecl ldiv(long, long); +#endif + +void __cdecl abort(void); +int __cdecl abs(int); +int __cdecl atexit(void (__cdecl *)(void)); +int __cdecl atoi(const char *); +long __cdecl atol(const char *); +long double __cdecl _atold(const char *); +void * __cdecl bsearch(const void *, const void *, + size_t, size_t, int (__cdecl *)(const void *, + const void *)); +void * __cdecl calloc(size_t, size_t); +div_t __cdecl div(int, int); +char * __cdecl _ecvt(double, int, int *, int *); +#ifndef _WINDLL +void __cdecl exit(int); +void __cdecl _exit(int); +#endif +int __far __cdecl _fatexit(void (__cdecl __far *)(void)); +char * __cdecl _fcvt(double, int, int *, int *); +_fonexit_t __far __cdecl _fonexit(_fonexit_t); +void __cdecl free(void *); +char * __cdecl _fullpath(char *, const char *, + size_t); +char * __cdecl _gcvt(double, int, char *); +char * __cdecl getenv(const char *); +char * __cdecl _itoa(int, char *, int); +long __cdecl labs(long); +unsigned long __cdecl _lrotl(unsigned long, int); +unsigned long __cdecl _lrotr(unsigned long, int); +char * __cdecl _ltoa(long, char *, int); +void __cdecl _makepath(char *, const char *, + const char *, const char *, const char *); +void * __cdecl malloc(size_t); +_onexit_t __cdecl _onexit(_onexit_t); +#ifndef _WINDLL +void __cdecl perror(const char *); +#endif +int __cdecl _putenv(const char *); +void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); +unsigned int __cdecl _rotl(unsigned int, int); +unsigned int __cdecl _rotr(unsigned int, int); +int __cdecl rand(void); +void * __cdecl realloc(void *, size_t); +void __cdecl _searchenv(const char *, const char *, + char *); +void __cdecl _splitpath(const char *, char *, + char *, char *, char *); +void __cdecl srand(unsigned int); +long __cdecl strtol(const char *, char * *, + int); +long double __cdecl _strtold(const char *, + char * *); +unsigned long __cdecl strtoul(const char *, + char * *, int); +void __cdecl _swab(char *, char *, int); +#ifndef _WINDOWS +int __cdecl system(const char *); +#endif +char * __cdecl _ultoa(unsigned long, char *, int); + +int __cdecl mblen(const char *, size_t); +int __cdecl mbtowc(wchar_t *, const char *, size_t); +int __cdecl wctomb(char *, wchar_t); +size_t __cdecl mbstowcs(wchar_t *, const char *, size_t); +size_t __cdecl wcstombs(char *, const wchar_t *, size_t); + +/* model-independent function prototypes */ + +int __far __cdecl _fmblen(const char __far *, size_t); +int __far __cdecl _fmbtowc(wchar_t __far *, const char __far *, + size_t); +int __far __cdecl _fwctomb(char __far *, wchar_t); +size_t __far __cdecl _fmbstowcs(wchar_t __far *, const char __far *, + size_t); +size_t __far __cdecl _fwcstombs(char __far *, const wchar_t __far *, + size_t); + +#ifndef tolower +int __cdecl tolower(int); +#endif + +#ifndef toupper +int __cdecl toupper(int); +#endif + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#ifndef __cplusplus +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +extern char * __near __cdecl sys_errlist[]; +extern int __near __cdecl sys_nerr; +extern char ** __near __cdecl environ; + +#define DOS_MODE _DOS_MODE +#define OS2_MODE _OS2_MODE + +char * __cdecl ecvt(double, int, int *, int *); +char * __cdecl fcvt(double, int, int *, int *); +char * __cdecl gcvt(double, int, char *); +char * __cdecl itoa(int, char *, int); +char * __cdecl ltoa(long, char *, int); +onexit_t __cdecl onexit(onexit_t); +int __cdecl putenv(const char *); +void __cdecl swab(char *, char *, int); +char * __cdecl ultoa(unsigned long, char *, int); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STDLIB +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/streamb.h b/private/oleauto/tools/win16/hdos/c800/include/streamb.h new file mode 100644 index 000000000..5ac1b51ce --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/streamb.h @@ -0,0 +1,142 @@ +/*** +*streamb.h - definitions/declarations for the streambuf class +* +* Copyright (c) 1990-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the streambuf class. +* [AT&T C++] +* +****/ + +#ifndef _INC_STREAMB +#define _INC_STREAMB + + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +#ifndef NULL +#define NULL 0 +#endif + +#ifndef EOF +#define EOF (-1) +#endif + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +typedef long streampos, streamoff; + +class streambuf { +public: + + virtual ~streambuf(); + + inline int in_avail() const; + inline int out_waiting() const; + int sgetc(); + int snextc(); + int sbumpc(); + void stossc(); + + inline int sputbackc(char); + + inline int sputc(int); + inline int sputn(const char _HFAR_ *,int); + inline int sgetn(char _HFAR_ *,int); + + virtual int sync(); + +// enum seek_dir { beg=0, cur=1, end=2 }; // CONSIDER: needed ??? + + virtual streambuf* setbuf(char _HFAR_ *, int); + virtual streampos seekoff(streamoff,ios::seek_dir,int =ios::in|ios::out); + virtual streampos seekpos(streampos,int =ios::in|ios::out); + + virtual int xsputn(const char _HFAR_ *,int); + virtual int xsgetn(char _HFAR_ *,int); + + virtual int overflow(int =EOF) = 0; // pure virtual function + virtual int underflow() = 0; // pure virtual function + + virtual int pbackfail(int); + + void dbp(); + +protected: + streambuf(); + streambuf(char _HFAR_ *,int); + + inline char _HFAR_ * base() const; + inline char _HFAR_ * ebuf() const; + inline char _HFAR_ * pbase() const; + inline char _HFAR_ * pptr() const; + inline char _HFAR_ * epptr() const; + inline char _HFAR_ * eback() const; + inline char _HFAR_ * gptr() const; + inline char _HFAR_ * egptr() const; + inline int blen() const; + inline void setp(char _HFAR_ *,char _HFAR_ *); + inline void setg(char _HFAR_ *,char _HFAR_ *,char _HFAR_ *); + inline void pbump(int); + inline void gbump(int); + + void setb(char _HFAR_ *,char _HFAR_ *,int =0); + inline int unbuffered() const; + inline void unbuffered(int); + int allocate(); + virtual int doallocate(); + +private: + int _fAlloc; + int _fUnbuf; + int x_lastc; + char _HFAR_ * _base; + char _HFAR_ * _ebuf; + char _HFAR_ * _pbase; + char _HFAR_ * _pptr; + char _HFAR_ * _epptr; + char _HFAR_ * _eback; + char _HFAR_ * _gptr; + char _HFAR_ * _egptr; +}; + +inline int streambuf::in_avail() const { return (gptr()<_egptr) ? (_egptr-gptr()) : 0; } +inline int streambuf::out_waiting() const { return (_pptr>=_pbase) ? (_pptr-_pbase) : 0; } + +inline int streambuf::sputbackc(char _c){ return (_eback<gptr()) ? *(--_gptr)=_c : pbackfail(_c); } + +inline int streambuf::sputc(int _i){ return (_pptr<_epptr) ? (unsigned char)(*(_pptr++)=(char)_i) : overflow(_i); } + +inline int streambuf::sputn(const char _HFAR_ * _str,int _n) { return xsputn(_str, _n); } +inline int streambuf::sgetn(char _HFAR_ * _str,int _n) { return xsgetn(_str, _n); } + +inline char _HFAR_ * streambuf::base() const { return _base; } +inline char _HFAR_ * streambuf::ebuf() const { return _ebuf; } +inline int streambuf::blen() const {return ((_ebuf > _base) ? (_ebuf-_base) : 0); } +inline char _HFAR_ * streambuf::pbase() const { return _pbase; } +inline char _HFAR_ * streambuf::pptr() const { return _pptr; } +inline char _HFAR_ * streambuf::epptr() const { return _epptr; } +inline char _HFAR_ * streambuf::eback() const { return _eback; } +inline char _HFAR_ * streambuf::gptr() const { return _gptr; } +inline char _HFAR_ * streambuf::egptr() const { return _egptr; } +inline void streambuf::gbump(int n) { if (_egptr) _gptr += n; } +inline void streambuf::pbump(int n) { if (_epptr) _pptr += n; } +inline void streambuf::setg(char _HFAR_ * eb, char _HFAR_ * g, char _HFAR_ * eg) {_eback=eb; _gptr=g; _egptr=eg; x_lastc=EOF; } +inline void streambuf::setp(char _HFAR_ * p, char _HFAR_ * ep) {_pptr=_pbase=p; _epptr=ep; } +inline int streambuf::unbuffered() const { return _fUnbuf; } +inline void streambuf::unbuffered(int fUnbuf) { _fUnbuf = fUnbuf; } + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/stress.h b/private/oleauto/tools/win16/hdos/c800/include/stress.h new file mode 100644 index 000000000..388683e78 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/stress.h @@ -0,0 +1,56 @@ +/*****************************************************************************\ +* * +* stress.h - Stress functions definitions * +* * +* Version 1.0 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +*******************************************************************************/ + +#ifndef _INC_STRESS +#define _INC_STRESS + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** Simple types & common helper macros *********************************/ + +#ifndef _INC_WINDOWS /* If included with 3.0 headers... */ +#define UINT WORD +#define WINAPI FAR PASCAL +#endif /* _INC_WINDOWS */ + +/* stuff for AllocDiskSpace() */ +#define EDS_WIN 1 +#define EDS_CUR 2 +#define EDS_TEMP 3 + + +/* function prototypes */ +BOOL WINAPI AllocMem(DWORD); +void WINAPI FreeAllMem(void); +int WINAPI AllocFileHandles(int); +void WINAPI UnAllocFileHandles(void); +int WINAPI GetFreeFileHandles(void); +int WINAPI AllocDiskSpace(long,UINT); +void WINAPI UnAllocDiskSpace(UINT); +BOOL WINAPI AllocUserMem(UINT); +void WINAPI FreeAllUserMem(void); +BOOL WINAPI AllocGDIMem(UINT); +void WINAPI FreeAllGDIMem(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() +#endif /* RC_INVOKED */ + +#endif /* _INC_STRESS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/string.h b/private/oleauto/tools/win16/hdos/c800/include/string.h new file mode 100644 index 000000000..961417a72 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/string.h @@ -0,0 +1,167 @@ +/*** +*string.h - declarations for string manipulation functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the string +* manipulation functions. +* [ANSI/System V] +* +****/ + +#ifndef _INC_STRING + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* function prototypes */ + +void * __cdecl _memccpy(void *, const void *, + int, unsigned int); +void * __cdecl memchr(const void *, int, size_t); +int __cdecl memcmp(const void *, const void *, + size_t); +int __cdecl _memicmp(const void *, const void *, + unsigned int); +void * __cdecl memcpy(void *, const void *, + size_t); +void * __cdecl memmove(void *, const void *, + size_t); +void * __cdecl memset(void *, int, size_t); +void __cdecl _movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +char * __cdecl strcat(char *, const char *); +char * __cdecl strchr(const char *, int); +int __cdecl strcmp(const char *, const char *); +int __cdecl _strcmpi(const char *, const char *); +int __cdecl strcoll(const char *, const char *); +int __cdecl _stricmp(const char *, const char *); +char * __cdecl strcpy(char *, const char *); +size_t __cdecl strcspn(const char *, const char *); +char * __cdecl _strdup(const char *); +char * __cdecl _strerror(const char *); +char * __cdecl strerror(int); +size_t __cdecl strlen(const char *); +char * __cdecl _strlwr(char *); +char * __cdecl strncat(char *, const char *, + size_t); +int __cdecl strncmp(const char *, const char *, + size_t); +int __cdecl _strnicmp(const char *, const char *, + size_t); +char * __cdecl strncpy(char *, const char *, + size_t); +char * __cdecl _strnset(char *, int, size_t); +char * __cdecl strpbrk(const char *, + const char *); +char * __cdecl strrchr(const char *, int); +char * __cdecl _strrev(char *); +char * __cdecl _strset(char *, int); +size_t __cdecl strspn(const char *, const char *); +char * __cdecl strstr(const char *, + const char *); +char * __cdecl strtok(char *, const char *); +char * __cdecl _strupr(char *); +size_t __cdecl strxfrm (char *, const char *, + size_t); + + +/* model independent function prototypes */ + +void __far * __far __cdecl _fmemccpy(void __far *, const void __far *, + int, unsigned int); +void __far * __far __cdecl _fmemchr(const void __far *, int, size_t); +int __far __cdecl _fmemcmp(const void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemcpy(void __far *, const void __far *, + size_t); +int __far __cdecl _fmemicmp(const void __far *, const void __far *, + unsigned int); +void __far * __far __cdecl _fmemmove(void __far *, const void __far *, + size_t); +void __far * __far __cdecl _fmemset(void __far *, int, size_t); +char __far * __far __cdecl _fstrcat(char __far *, const char __far *); +char __far * __far __cdecl _fstrchr(const char __far *, int); +int __far __cdecl _fstrcmp(const char __far *, const char __far *); +int __far __cdecl _fstricmp(const char __far *, const char __far *); +char __far * __far __cdecl _fstrcpy(char __far *, const char __far *); +size_t __far __cdecl _fstrcspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrdup(const char __far *); +char __near * __far __cdecl _nstrdup(const char __far *); +size_t __far __cdecl _fstrlen(const char __far *); +char __far * __far __cdecl _fstrlwr(char __far *); +char __far * __far __cdecl _fstrncat(char __far *, const char __far *, + size_t); +int __far __cdecl _fstrncmp(const char __far *, const char __far *, + size_t); +int __far __cdecl _fstrnicmp(const char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrncpy(char __far *, const char __far *, + size_t); +char __far * __far __cdecl _fstrnset(char __far *, int, size_t); +char __far * __far __cdecl _fstrpbrk(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrrchr(const char __far *, int); +char __far * __far __cdecl _fstrrev(char __far *); +char __far * __far __cdecl _fstrset(char __far *, int); +size_t __far __cdecl _fstrspn(const char __far *, const char __far *); +char __far * __far __cdecl _fstrstr(const char __far *, + const char __far *); +char __far * __far __cdecl _fstrtok(char __far *, const char __far *); +char __far * __far __cdecl _fstrupr(char __far *); + + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ +void * __cdecl memccpy(void *, const void *, + int, unsigned int); +int __cdecl memicmp(const void *, const void *, + unsigned int); +void __cdecl movedata(unsigned int, unsigned int, unsigned int, + unsigned int, unsigned int); +int __cdecl strcmpi(const char *, const char *); +int __cdecl stricmp(const char *, const char *); +char * __cdecl strdup(const char *); +char * __cdecl strlwr(char *); +int __cdecl strnicmp(const char *, const char *, + size_t); +char * __cdecl strnset(char *, int, size_t); +char * __cdecl strrev(char *); +char * __cdecl strset(char *, int); +char * __cdecl strupr(char *); +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_STRING +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/strstrea.h b/private/oleauto/tools/win16/hdos/c800/include/strstrea.h new file mode 100644 index 000000000..640fc06eb --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/strstrea.h @@ -0,0 +1,95 @@ +/*** +*strstream.h - definitions/declarations for strstreambuf, strstream +* +* Copyright (c) 1991-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the classes, values, macros, and functions +* used by the strstream and strstreambuf classes. +* [AT&T C++] +* +****/ + +#ifndef _INC_STRSTREAM +#define _INC_STRSTREAM + +#include <iostream.h> + +// Force word packing to avoid possible -Zp override +#pragma pack(2) + +#pragma warning(disable:4505) // disable unwanted /W4 warning +// #pragma warning(default:4505) // use this to reenable, if necessary + +#ifdef M_I86HM +#define _HFAR_ __far +#else +#define _HFAR_ +#endif + +class strstreambuf : public streambuf { +public: + strstreambuf(); + strstreambuf(int); + strstreambuf(char _HFAR_ *, int, char _HFAR_ * = 0); + strstreambuf(unsigned char _HFAR_ *, int, unsigned char _HFAR_ * = 0); + strstreambuf(signed char _HFAR_ _HFAR_ *, int, signed char _HFAR_ * = 0); + strstreambuf(void _HFAR_ * (*a)(long), void (*f) (void _HFAR_ *)); + ~strstreambuf(); + + void freeze(int =1); + char _HFAR_ * str(); + +virtual int overflow(int); +virtual int underflow(); +virtual streambuf* setbuf(char _HFAR_ *, int); +virtual streampos seekoff(streamoff, ios::seek_dir, int); +virtual int sync(); // not in spec. + +protected: +virtual int doallocate(); +private: + int x_dynamic; + int x_bufmin; + int _fAlloc; + int x_static; + void _HFAR_ * (* x_alloc)(long); + void (* x_free)(void _HFAR_ *); +}; + +class istrstream : public istream { +public: + istrstream(char _HFAR_ *); + istrstream(char _HFAR_ *, int); + ~istrstream(); + +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +class ostrstream : public ostream { +public: + ostrstream(); + ostrstream(char _HFAR_ *, int, int = ios::out); + ~ostrstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } +inline strstreambuf* rdbuf() const { return (strstreambuf*) ios::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +class strstream : public iostream { // strstreambase ??? +public: + strstream(); + strstream(char _HFAR_ *, int, int); + ~strstream(); + +inline int pcount() const { return rdbuf()->out_waiting(); } // not in spec. +inline strstreambuf* rdbuf() const { return (strstreambuf*) ostream::rdbuf(); } +inline char _HFAR_ * str() { return rdbuf()->str(); } +}; + +// Restore default packing +#pragma pack() + +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/time.h b/private/oleauto/tools/win16/hdos/c800/include/time.h new file mode 100644 index 000000000..edbb46b06 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/time.h @@ -0,0 +1,129 @@ +/*** +*time.h - definitions/declarations for time routines +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the various declarations and definitions +* for the time routines. +* [ANSI/System V] +* +****/ + +#ifndef _INC_TIME + +#ifdef __cplusplus +extern "C" { +#endif + +#if (_MSC_VER <= 600) +#define __cdecl _cdecl +#define __far _far +#define __near _near +#define __pascal _pascal +#endif + +/* implementation defined time types */ + +#ifndef _TIME_T_DEFINED +typedef long time_t; +#define _TIME_T_DEFINED +#endif + +#ifndef _CLOCK_T_DEFINED +typedef long clock_t; +#define _CLOCK_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +/* structure for use with localtime(), gmtime(), etc. */ + +#ifndef _TM_DEFINED +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; +#define _TM_DEFINED +#endif + + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* clock ticks macro - ANSI version */ + +#define CLOCKS_PER_SEC 1000 + + +/* extern declarations for the global variables used by the ctime family of + * routines. + */ + +extern int __near __cdecl _daylight; /* non-zero if daylight savings time is used */ +extern long __near __cdecl _timezone; /* difference in seconds between GMT and local time */ +extern char * __near __cdecl _tzname[2];/* standard/daylight savings time zone names */ + + +/* function prototypes */ + +#ifdef _MT +double __pascal difftime(time_t, time_t); +#else +double __cdecl difftime(time_t, time_t); +#endif + +char * __cdecl asctime(const struct tm *); +char * __cdecl ctime(const time_t *); +#ifndef _WINDLL +clock_t __cdecl clock(void); +#endif +struct tm * __cdecl gmtime(const time_t *); +struct tm * __cdecl localtime(const time_t *); +time_t __cdecl mktime(struct tm *); +#ifndef _WINDLL +size_t __cdecl strftime(char *, size_t, const char *, + const struct tm *); +#endif +char * __cdecl _strdate(char *); +char * __cdecl _strtime(char *); +time_t __cdecl time(time_t *); +void __cdecl _tzset(void); + +#ifndef __STDC__ +/* Non-ANSI names for compatibility */ + +#define CLK_TCK CLOCKS_PER_SEC + +extern int __near __cdecl daylight; +extern long __near __cdecl timezone; +extern char * __near __cdecl tzname[2]; + +void __cdecl tzset(void); + +#endif + +#ifdef __cplusplus +} +#endif + +#define _INC_TIME +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h new file mode 100644 index 000000000..25b918f80 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.h @@ -0,0 +1,469 @@ +/*****************************************************************************\ +* * +* toolhelp.h - toolhelp.dll functions, types, and definitions * +* * +* Version 1.0 * +* * +* NOTE: windows.h must be #included first * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_TOOLHELP +#define _INC_TOOLHELP + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#ifndef _INC_WINDOWS /* If included with 3.0 headers... */ +#define LPCSTR LPSTR +#define WINAPI FAR PASCAL +#define CALLBACK FAR PASCAL +#define UINT WORD +#define HMODULE HANDLE +#define HINSTANCE HANDLE +#define HLOCAL HANDLE +#define HGLOBAL HANDLE +#define HTASK HANDLE +#endif /* _INC_WINDOWS */ + +/****** General symbols ******************************************************/ +#define MAX_DATA 11 +#define MAX_PATH 255 +#define MAX_MODULE_NAME 8 + 1 +#define MAX_CLASSNAME 255 + +/****** Global heap walking ***************************************************/ +typedef struct tagGLOBALINFO +{ + DWORD dwSize; + WORD wcItems; + WORD wcItemsFree; + WORD wcItemsLRU; +} GLOBALINFO; + +typedef struct tagGLOBALENTRY +{ + DWORD dwSize; + DWORD dwAddress; + DWORD dwBlockSize; + HGLOBAL hBlock; + WORD wcLock; + WORD wcPageLock; + WORD wFlags; + BOOL wHeapPresent; + HGLOBAL hOwner; + WORD wType; + WORD wData; + DWORD dwNext; + DWORD dwNextAlt; +} GLOBALENTRY; + +/* GlobalFirst()/GlobalNext() flags */ +#define GLOBAL_ALL 0 +#define GLOBAL_LRU 1 +#define GLOBAL_FREE 2 + +/* GLOBALENTRY.wType entries */ +#define GT_UNKNOWN 0 +#define GT_DGROUP 1 +#define GT_DATA 2 +#define GT_CODE 3 +#define GT_TASK 4 +#define GT_RESOURCE 5 +#define GT_MODULE 6 +#define GT_FREE 7 +#define GT_INTERNAL 8 +#define GT_SENTINEL 9 +#define GT_BURGERMASTER 10 + +/* If GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: */ +#define GD_USERDEFINED 0 +#define GD_CURSORCOMPONENT 1 +#define GD_BITMAP 2 +#define GD_ICONCOMPONENT 3 +#define GD_MENU 4 +#define GD_DIALOG 5 +#define GD_STRING 6 +#define GD_FONTDIR 7 +#define GD_FONT 8 +#define GD_ACCELERATORS 9 +#define GD_RCDATA 10 +#define GD_ERRTABLE 11 +#define GD_CURSOR 12 +#define GD_ICON 14 +#define GD_NAMETABLE 15 +#define GD_MAX_RESOURCE 15 + +/* GLOBALENTRY.wFlags */ +#define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */ + +BOOL WINAPI GlobalInfo(GLOBALINFO FAR* lpGlobalInfo); +BOOL WINAPI GlobalFirst(GLOBALENTRY FAR* lpGlobal, WORD wFlags); +BOOL WINAPI GlobalNext(GLOBALENTRY FAR* lpGlobal, WORD wFlags); +BOOL WINAPI GlobalEntryHandle(GLOBALENTRY FAR* lpGlobal, HGLOBAL hItem); +BOOL WINAPI GlobalEntryModule(GLOBALENTRY FAR* lpGlobal, HMODULE hModule, WORD wSeg); +WORD WINAPI GlobalHandleToSel(HGLOBAL hMem); + +/****** Local heap walking ***************************************************/ + +typedef struct tagLOCALINFO +{ + DWORD dwSize; + WORD wcItems; +} LOCALINFO; + +typedef struct tagLOCALENTRY +{ + DWORD dwSize; + HLOCAL hHandle; + WORD wAddress; + WORD wSize; + WORD wFlags; + WORD wcLock; + WORD wType; + WORD hHeap; + WORD wHeapType; + WORD wNext; +} LOCALENTRY; + +/* LOCALENTRY.wHeapType flags */ +#define NORMAL_HEAP 0 +#define USER_HEAP 1 +#define GDI_HEAP 2 + +/* LOCALENTRY.wFlags */ +#define LF_FIXED 1 +#define LF_FREE 2 +#define LF_MOVEABLE 4 + +/* LOCALENTRY.wType */ +#define LT_NORMAL 0 +#define LT_FREE 0xff +#define LT_GDI_PEN 1 /* LT_GDI_* is for GDI's heap */ +#define LT_GDI_BRUSH 2 +#define LT_GDI_FONT 3 +#define LT_GDI_PALETTE 4 +#define LT_GDI_BITMAP 5 +#define LT_GDI_RGN 6 +#define LT_GDI_DC 7 +#define LT_GDI_DISABLED_DC 8 +#define LT_GDI_METADC 9 +#define LT_GDI_METAFILE 10 +#define LT_GDI_MAX LT_GDI_METAFILE +#define LT_USER_CLASS 1 /* LT_USER_* is for USER's heap */ +#define LT_USER_WND 2 +#define LT_USER_STRING 3 +#define LT_USER_MENU 4 +#define LT_USER_CLIP 5 +#define LT_USER_CBOX 6 +#define LT_USER_PALETTE 7 +#define LT_USER_ED 8 +#define LT_USER_BWL 9 +#define LT_USER_OWNERDRAW 10 +#define LT_USER_SPB 11 +#define LT_USER_CHECKPOINT 12 +#define LT_USER_DCE 13 +#define LT_USER_MWP 14 +#define LT_USER_PROP 15 +#define LT_USER_LBIV 16 +#define LT_USER_MISC 17 +#define LT_USER_ATOMS 18 +#define LT_USER_LOCKINPUTSTATE 19 +#define LT_USER_HOOKLIST 20 +#define LT_USER_USERSEEUSERDOALLOC 21 +#define LT_USER_HOTKEYLIST 22 +#define LT_USER_POPUPMENU 23 +#define LT_USER_HANDLETABLE 32 +#define LT_USER_MAX LT_USER_HANDLETABLE + +BOOL WINAPI LocalInfo(LOCALINFO FAR* lpLocal, HGLOBAL hHeap); +BOOL WINAPI LocalFirst(LOCALENTRY FAR* lpLocal, HGLOBAL hHeap); +BOOL WINAPI LocalNext(LOCALENTRY FAR* lpLocal); + +/****** Stack Tracing ********************************************************/ + +typedef struct tagSTACKTRACEENTRY +{ + DWORD dwSize; + HTASK hTask; + WORD wSS; + WORD wBP; + WORD wCS; + WORD wIP; + HMODULE hModule; + WORD wSegment; + WORD wFlags; +} STACKTRACEENTRY; + +/* STACKTRACEENTRY.wFlags values */ +#define FRAME_FAR 0 +#define FRAME_NEAR 1 + +BOOL WINAPI StackTraceFirst(STACKTRACEENTRY FAR* lpStackTrace, HTASK hTask); +BOOL WINAPI StackTraceCSIPFirst(STACKTRACEENTRY FAR* lpStackTrace, + WORD wSS, WORD wCS, WORD wIP, WORD wBP); +BOOL WINAPI StackTraceNext(STACKTRACEENTRY FAR* lpStackTrace); + +/****** Module list walking **************************************************/ + +typedef struct tagMODULEENTRY +{ + DWORD dwSize; + char szModule[MAX_MODULE_NAME + 1]; + HMODULE hModule; + WORD wcUsage; + char szExePath[MAX_PATH + 1]; + WORD wNext; +} MODULEENTRY; + +BOOL WINAPI ModuleFirst(MODULEENTRY FAR* lpModule); +BOOL WINAPI ModuleNext(MODULEENTRY FAR* lpModule); +HMODULE WINAPI ModuleFindName(MODULEENTRY FAR* lpModule, LPCSTR lpstrName); +HMODULE WINAPI ModuleFindHandle(MODULEENTRY FAR* lpModule, HMODULE hModule); + +/****** Task list walking *****************************************************/ + +typedef struct tagTASKENTRY +{ + DWORD dwSize; + HTASK hTask; + HTASK hTaskParent; + HINSTANCE hInst; + HMODULE hModule; + WORD wSS; + WORD wSP; + WORD wStackTop; + WORD wStackMinimum; + WORD wStackBottom; + WORD wcEvents; + HGLOBAL hQueue; + char szModule[MAX_MODULE_NAME + 1]; + WORD wPSPOffset; + HANDLE hNext; +} TASKENTRY; + +BOOL WINAPI TaskFirst(TASKENTRY FAR* lpTask); +BOOL WINAPI TaskNext(TASKENTRY FAR* lpTask); +BOOL WINAPI TaskFindHandle(TASKENTRY FAR* lpTask, HTASK hTask); +DWORD WINAPI TaskSetCSIP(HTASK hTask, WORD wCS, WORD wIP); +DWORD WINAPI TaskGetCSIP(HTASK hTask); +BOOL WINAPI TaskSwitch(HTASK hTask, DWORD dwNewCSIP); + +/****** Window Class enumeration **********************************************/ + +typedef struct tagCLASSENTRY +{ + DWORD dwSize; + HMODULE hInst; /* This is really an hModule */ + char szClassName[MAX_CLASSNAME + 1]; + WORD wNext; +} CLASSENTRY; + +BOOL WINAPI ClassFirst(CLASSENTRY FAR* lpClass); +BOOL WINAPI ClassNext(CLASSENTRY FAR* lpClass); + +/****** Information functions *************************************************/ + +typedef struct tagMEMMANINFO +{ + DWORD dwSize; + DWORD dwLargestFreeBlock; + DWORD dwMaxPagesAvailable; + DWORD dwMaxPagesLockable; + DWORD dwTotalLinearSpace; + DWORD dwTotalUnlockedPages; + DWORD dwFreePages; + DWORD dwTotalPages; + DWORD dwFreeLinearSpace; + DWORD dwSwapFilePages; + WORD wPageSize; +} MEMMANINFO; + +BOOL WINAPI MemManInfo(MEMMANINFO FAR* lpEnhMode); + +typedef struct tagSYSHEAPINFO +{ + DWORD dwSize; + WORD wUserFreePercent; + WORD wGDIFreePercent; + HGLOBAL hUserSegment; + HGLOBAL hGDISegment; +} SYSHEAPINFO; + +BOOL WINAPI SystemHeapInfo(SYSHEAPINFO FAR* lpSysHeap); + +/****** Interrupt Handling ****************************************************/ + +/* Hooked interrupts */ +#define INT_DIV0 0 +#define INT_1 1 +#define INT_3 3 +#define INT_UDINSTR 6 +#define INT_STKFAULT 12 +#define INT_GPFAULT 13 +#define INT_BADPAGEFAULT 14 +#define INT_CTLALTSYSRQ 256 + +/* TOOLHELP Interrupt callbacks registered with InterruptRegister should + * always be written in assembly language. The stack frame is not + * compatible with high level language conventions. + * + * This stack frame looks as follows to the callback. All registers + * should be preserved across this callback to allow restarting fault. + * ------------ + * | Flags | [SP + 0Eh] + * | CS | [SP + 0Ch] + * | IP | [SP + 0Ah] + * | Handle | [SP + 08h] + * |Exception#| [SP + 06h] + * | AX | [SP + 04h] AX Saved to allow MakeProcInstance + * | Ret CS | [SP + 02h] + * SP---> | Ret IP | [SP + 00h] + * ------------ + */ +BOOL WINAPI InterruptRegister(HTASK hTask, FARPROC lpfnIntCallback); +BOOL WINAPI InterruptUnRegister(HTASK hTask); + +/* Notifications: + * When a notification callback is called, two parameters are passed + * in: a WORD, wID, and another DWORD, dwData. wID is one of + * the values NFY_* below. Callback routines should ignore unrecog- + * nized values to preserve future compatibility. Callback routines + * are also passed a dwData value. This may contain data or may be + * a FAR pointer to a structure, or may not be used depending on + * which notification is being received. + * + * In all cases, if the return value of the callback is TRUE, the + * notification will NOT be passed on to other callbacks. It has + * been handled. This should be used sparingly and only with certain + * notifications. Callbacks almost always return FALSE. + */ + +/* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps + * should ignore these. + */ +#define NFY_UNKNOWN 0 + +/* NFY_LOADSEG: dwData points to a NFYLOADSEG structure */ +#define NFY_LOADSEG 1 +typedef struct tagNFYLOADSEG +{ + DWORD dwSize; + WORD wSelector; + WORD wSegNum; + WORD wType; /* Low bit set if data seg, clear if code seg */ + WORD wcInstance; /* Instance count ONLY VALID FOR DATA SEG */ + LPCSTR lpstrModuleName; +} NFYLOADSEG; + +/* NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed */ +#define NFY_FREESEG 2 + +/* NFY_STARTDLL: dwData points to a NFYLOADSEG structure */ +#define NFY_STARTDLL 3 +typedef struct tagNFYSTARTDLL +{ + DWORD dwSize; + HMODULE hModule; + WORD wCS; + WORD wIP; +} NFYSTARTDLL; + +/* NFY_STARTTASK: dwData is the CS:IP of the start address of the task */ +#define NFY_STARTTASK 4 + +/* NFY_EXITTASK: The low byte of dwData contains the program exit code */ +#define NFY_EXITTASK 5 + +/* NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed */ +#define NFY_DELMODULE 6 + +/* NFY_RIP: dwData points to a NFYRIP structure */ +#define NFY_RIP 7 +typedef struct tagNFYRIP +{ + DWORD dwSize; + WORD wIP; + WORD wCS; + WORD wSS; + WORD wBP; + WORD wExitCode; +} NFYRIP; + +/* NFY_TASKIN: No data. Callback should do GetCurrentTask() */ +#define NFY_TASKIN 8 + +/* NFY_TASKOUT: No data. Callback should do GetCurrentTask() */ +#define NFY_TASKOUT 9 + +/* NFY_INCHAR: Return value from callback is used. If NULL, mapped to 'i' */ +#define NFY_INCHAR 10 + +/* NFY_OUTSTR: dwData points to the string to be displayed */ +#define NFY_OUTSTR 11 + +/* NFY_LOGERROR: dwData points to a NFYLOGERROR struct */ +#define NFY_LOGERROR 12 +typedef struct tagNFYLOGERROR +{ + DWORD dwSize; + UINT wErrCode; + void FAR* lpInfo; /* Error code-dependent */ +} NFYLOGERROR; + +/* NFY_LOGPARAMERROR: dwData points to a NFYLOGPARAMERROR struct */ +#define NFY_LOGPARAMERROR 13 +typedef struct tagNFYLOGPARAMERROR +{ + DWORD dwSize; + UINT wErrCode; + FARPROC lpfnErrorAddr; + void FAR* FAR* lpBadParam; +} NFYLOGPARAMERROR; + +/* NotifyRegister() flags */ +#define NF_NORMAL 0 +#define NF_TASKSWITCH 1 +#define NF_RIP 2 + +typedef BOOL (CALLBACK* LPFNNOTIFYCALLBACK)(WORD wID, DWORD dwData); + +BOOL WINAPI NotifyRegister(HTASK hTask, LPFNNOTIFYCALLBACK lpfn, WORD wFlags); +BOOL WINAPI NotifyUnRegister(HTASK hTask); + +/****** Miscellaneous *********************************************************/ + +void WINAPI TerminateApp(HTASK hTask, WORD wFlags); + +/* TerminateApp() flag values */ +#define UAE_BOX 0 +#define NO_UAE_BOX 1 + +DWORD WINAPI MemoryRead(WORD wSel, DWORD dwOffset, void FAR* lpBuffer, DWORD dwcb); +DWORD WINAPI MemoryWrite(WORD wSel, DWORD dwOffset, void FAR* lpBuffer, DWORD dwcb); + +typedef struct tagTIMERINFO +{ + DWORD dwSize; + DWORD dwmsSinceStart; + DWORD dwmsThisVM; +} TIMERINFO; + +BOOL WINAPI TimerCount(TIMERINFO FAR* lpTimer); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif + +#endif /* !_INC_TOOLHELP */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc new file mode 100644 index 000000000..37537623b --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/toolhelp.inc @@ -0,0 +1,292 @@ +;************************************************************************** +;* TOOLHELP.INC +;* +;* Assembly-language public include file for TOOLHELP.DLL +;* +;************************************************************************** + +;** General symbol values +MAX_DATA EQU 11 +MAX_PATH EQU 255 +MAX_MODULE_NAME EQU 8 + 1 ;Leave room for the zero and padding +MAX_CLASSNAME EQU 255 + +; ----- Global heap walking ----- + +GLOBALENTRY STRUC +ge_dwSize DD ? ;Structure version +ge_dwAddress DD ? ;This block's address +ge_dwBlockSize DD ? ;This block's size +ge_hBlock DW ? ;This block's handle +ge_wcLock DW ? ;Lock count +ge_wcPageLock DW ? ;Page lock count +ge_wFlags DW ? ;Block flags +ge_wHeapPresent DW ? ;Size of available local heap +ge_hOwner DW ? ;Owner handle +ge_wType DW ? ;Block type +ge_wData DW ? ;Type-specific data +ge_dwNext DD ? ;Pointer to next block +ge_dwNextAlt DD ? ;Next free/LRU block in chain +GLOBALENTRY ENDS + +; ** GlobalFirst()/GlobalNext() flags +GLOBAL_ALL EQU 0 +GLOBAL_LRU EQU 1 +GLOBAL_FREE EQU 2 + +; ** GLOBALENTRY.ge_wType entries +GT_UNKNOWN EQU 0 +GT_DGROUP EQU 1 +GT_DATA EQU 2 +GT_CODE EQU 3 +GT_TASK EQU 4 +GT_RESOURCE EQU 5 +GT_MODULE EQU 6 +GT_FREE EQU 7 +GT_INTERNAL EQU 8 +GT_SENTINEL EQU 9 +GT_BURGERMASTER EQU 10 + +; ** if GLOBALENTRY.wType==GT_RESOURCE, the following is GLOBALENTRY.wData: +GD_USERDEFINED EQU 0 +GD_CURSORCOMPONENT EQU 1 +GD_BITMAP EQU 2 +GD_ICONCOMPONENT EQU 3 +GD_MENU EQU 4 +GD_DIALOG EQU 5 +GD_STRING EQU 6 +GD_FONTDIR EQU 7 +GD_FONT EQU 8 +GD_ACCELERATORS EQU 9 +GD_RCDATA EQU 10 +GD_ERRTABLE EQU 11 +GD_CURSOR EQU 12 +GD_ICON EQU 14 +GD_NAMETABLE EQU 15 +GD_MAX_RESOURCE EQU 15 + +;** GLOBALENTRY.wFlags +GF_PDB_OWNER EQU 100h ;Low byte is KERNEL flags + +; ----- Local heap walking ----- + +LOCALENTRY STRUC +le_dwSize DD ? +le_hHandle DW ? +le_wAddress DW ? +le_wSize DW ? +le_wFlags DW ? +le_wcLock DW ? +le_wType DW ? +le_hHeap DW ? +le_wHeapType DW ? +le_wNext DW ? +LOCALENTRY ENDS + +; ** LOCALENTRY.wHeapType flags +NORMAL_HEAP EQU 0 +USER_HEAP EQU 1 +GDI_HEAP EQU 2 + +;** LOCALENTRY.wFlags +LF_FIXED EQU 1 +LF_FREE EQU 2 +LF_MOVEABLE EQU 4 + +;** LOCALENTRY.wType +LT_NORMAL EQU 0 +LT_GDI_PEN EQU 1 +LT_GDI_BRUSH EQU 2 +LT_GDI_FONT EQU 3 +LT_GDI_PALETTE EQU 4 +LT_GDI_BITMAP EQU 5 +LT_GDI_RGN EQU 6 +LT_GDI_DC EQU 7 +LT_GDI_DISABLED_DC EQU 8 +LT_GDI_METADC EQU 9 +LT_GDI_METAFILE EQU 10 +LT_GDI_MAX EQU LT_GDI_METAFILE +LT_FREE EQU 0ffh + +; ----- Stack tracing ----- + +STACKTRACEENTRY STRUC +st_dwSize DD ? +st_hTask DW ? +st_wSS DW ? +st_wBP DW ? +st_wCS DW ? +st_wIP DW ? +st_hModule DW ? +st_wSegment DW ? +st_wFlags DW ? +STACKTRACEENTRY ENDS + +;** STACKTRACEENTRY.wFlags values +FRAME_FAR EQU 0 +FRAME_NEAR EQU 1 + +; ----- Module list walking ----- + +MODULEENTRY STRUC +me_dwSize DD ? +me_szModule DB MAX_MODULE_NAME + 1 DUP(?) +me_hModule DW ? +me_wcUsage DW ? +me_szExePath DB MAX_PATH + 1 + 1 DUP(?) +me_wNext DW ? +MODULEENTRY ENDS + +; ----- Task list walking ----- + +TASKENTRY STRUC +te_dwSize DD ? +te_hTask DW ? +te_hTaskParent DW ? +te_hInst DW ? +te_hModule DW ? +te_wSS DW ? +te_wSP DW ? +te_wStackTop DW ? +te_wStackMinimum DW ? +te_wStackBottom DW ? +te_wcEvents DW ? +te_hQueue DW ? +te_szModule DB MAX_MODULE_NAME + 1 DUP(?) +te_wPSPOffset DW ? +te_hNext DW ? +TASKENTRY ENDS + +;** TaskSwitch() return values +TS_ERROR EQU 0 +TS_NEW EQU 1 +TS_OLD EQU 2 + +; ----- Window Class enumeration ----- + +CLASSENTRY STRUC +ce_dwSize DD ? +ce_hInst DW ? +ce_szClassName DB MAX_CLASSNAME + 1 DUP(?) +ce_wNext DW ? +CLASSENTRY ENDS + +; ----- Information functions ----- + +VMEMMANINFO STRUC +vmm_dwSize DD ? +vmm_dwLargestFreeBlock DD ? +vmm_dwMaxPagesAvailable DD ? +vmm_dwMaxPagesLockable DD ? +vmm_dwTotalLinearSpace DD ? +vmm_dwTotalUnlockedPages DD ? +vmm_dwFreePages DD ? +vmm_dwTotalPages DD ? +vmm_dwFreeLinearSpace DD ? +vmm_dwSwapFilePages DD ? +vmm_wPageSize DW ? +VMEMMANINFO ENDS + +SYSHEAPINFO STRUC +si_dwSize DD ? +si_wUserFreePercent DW ? +si_wGDIFreePercent DW ? +si_hUserSegment DW ? +si_hGDISegment DW ? +SYSHEAPINFO ENDS + +; ----- Notifications ----- + +;* NFY_UNKNOWN: An unknown notification has been returned from KERNEL. Apps +;* should ignore these. +;* +NFY_UNKNOWN EQU 0 + +;** NFY_LOADSEG: dwData points to a NFYLOADSEG structure +NFY_LOADSEG EQU 1 +NFYLOADSEG STRUC +nls_dwSize DD ? +nls_wSelector DW ? +nls_wSegNum DW ? +nls_wType DW ? ;Low bit set for DATA, clear for CODE +nls_wcInstance DW ? ;Instance count ONLY VALID FOR DATA! +nls_lpstrModuleName DD ? +NFYLOADSEG ENDS + +;** NFY_FREESEG: LOWORD(dwData) is the selector of the segment being freed +NFY_FREESEG EQU 2 + +;** NFY_STARTDLL: dwData points to a NFYSTARTDLL structure +NFY_STARTDLL EQU 3 +NFYSTARTDLL STRUC +nsd_dwSize DD ? +nsd_hModule DW ? +nsd_wCS DW ? +nsd_wIP DW ? +NFYSTARTDLL ENDS + +;** NFY_STARTTASK: dwData is the CS:IP of the task start address +NFY_STARTTASK EQU 4 + +;** NFY_EXITTASK: The low byte of dwData contains the program exit code +NFY_EXITTASK EQU 5 + +;** NFY_DELMODULE: LOWORD(dwData) is the handle of the module to be freed +NFY_DELMODULE EQU 6 + +;** NFY_RIP: LOWORD(dwData) is the fatal exit code +;** NFY_RIP: dwData points to a NFYRIP structure +NFY_RIP EQU 7 +NFYRIP STRUC +nrp_dwSize DD ? +nrp_wIP DW ? +nrp_wCS DW ? +nrp_wSS DW ? +nrp_wBP DW ? +nrp_wExitCode DW ? +NFYRIP ENDS + +;** NFY_TASKIN: No data. Callback should do GetCurrentTask() +NFY_TASKIN EQU 8 + +;** NFY_TASKOUT: No data. Callback should do GetCurrentTask() +NFY_TASKOUT EQU 9 + +;** NFY_INCHAR: Return value of callback is used. If FALSE, mapped to 'i' +NFY_INCHAR EQU 10 + +;** NFY_OUTSTR: dwData points to the string to be displayed +NFY_OUTSTR EQU 11 + +;** NFY_LOGERROR: dwData points to a NFYLOGERROR struct +NFY_LOGERROR EQU 12 +NFYLOGERROR STRUC +nle_dwSize DD ? +nle_wErrCode DW ? +nle_lpInfo DD ? ;Error-code dependent +NFYLOGERROR ENDS + +;** NFY_LOGPARAMERROR: dwData points to a NFYLOGPARAMERROR struct +NFY_LOGPARAMERROR EQU 13 +NFYLOGPARAMERROR STRUC +nlp_dwSize DD ? +nlp_wErrCode DW ? +nlp_lpfnErrorAddr DD ? +nlp_lpBadParam DD ? +NFYLOGPARAMERROR ENDS + +;** NotifyRegister() flags +NF_NORMAL EQU 0 +NF_TASKSWITCH EQU 1 +NF_RIP EQU 2 + +;** TerminateApp() flag values +UAE_BOX EQU 0 +NO_UAE_BOX EQU 1 + +TIMERINFO STRUC +ti_dwSize DD ? +ti_dwmsSinceStart DD ? +ti_dwmsThisVM DD ? +TIMERINFO ENDS + diff --git a/private/oleauto/tools/win16/hdos/c800/include/varargs.h b/private/oleauto/tools/win16/hdos/c800/include/varargs.h new file mode 100644 index 000000000..0692f60f6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/varargs.h @@ -0,0 +1,52 @@ +/*** +*varargs.h - XENIX style macros for variable argument functions +* +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines XENIX style macros for accessing arguments of a +* function which takes a variable number of arguments. +* [System V] +* +****/ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef _WINDLL +#define _FARARG_ __far +#else +#define _FARARG_ +#endif + +#if (_MSC_VER <= 600) +#define __far _far +#endif + +#ifdef __STDC__ +#error varargs.h incompatible with ANSI (use stdarg.h) +#endif + +#ifndef _VA_LIST_DEFINED +typedef char _FARARG_ *va_list; +#define _VA_LIST_DEFINED +#endif + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t _FARARG_ *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#ifdef __cplusplus +} +#endif diff --git a/private/oleauto/tools/win16/hdos/c800/include/ver.h b/private/oleauto/tools/win16/hdos/c800/include/ver.h new file mode 100644 index 000000000..cc8f0501e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/ver.h @@ -0,0 +1,255 @@ +/*****************************************************************************\ +* * +* ver.h - Version management functions, types, and definitions * +* * +* Include file for VER.DLL and VER.LIB. These libraries are * +* designed to allow version stamping of Windows executable files* +* and of special .VER files for DOS executable files. * +* * +* The API is unchanged for LIB and DLL versions. * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved * +* * +******************************************************************************* +* +* #define LIB - To be used with VER.LIB (default is for VER.DLL) +* +\*****************************************************************************/ + +#ifndef _INC_VER +#define _INC_VER + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* + * If .lib version is being used, declare types used in this file. + */ +#ifdef LIB + +#ifndef WINAPI /* don't declare if they're already declared */ +#define WINAPI _far _pascal +#define NEAR _near +#define FAR _far +#define PASCAL _pascal +typedef int BOOL; +#define TRUE 1 +#define FALSE 0 +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned int UINT; +typedef signed long LONG; +typedef unsigned long DWORD; +typedef char far* LPSTR; +typedef const char far* LPCSTR; +typedef int HFILE; +#define OFSTRUCT void /* Not used by the .lib version */ +#define LOWORD(l) ((WORD)(l)) +#define HIWORD(l) ((WORD)(((DWORD)(l) >> 16) & 0xFFFF)) +#define MAKEINTRESOURCE(i) (LPSTR)((DWORD)((WORD)(i))) +#endif /* WINAPI */ + +#else /* LIB */ + +/* If .dll version is being used and we're being included with + * the 3.0 windows.h, #define compatible type aliases. + * If included with the 3.0 windows.h, #define compatible aliases + */ +#ifndef _INC_WINDOWS +#define UINT WORD +#define LPCSTR LPSTR +#define HFILE int +#endif /* !_INC_WINDOWS */ + +#endif /* !LIB */ + +/* ----- RC defines ----- */ +#ifdef RC_INVOKED +#define ID(id) id +#else +#define ID(id) MAKEINTRESOURCE(id) +#endif + +/* ----- Symbols ----- */ +#define VS_FILE_INFO ID(16) /* Version stamp res type */ +#define VS_VERSION_INFO ID(1) /* Version stamp res ID */ +#define VS_USER_DEFINED ID(100) /* User-defined res IDs */ + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FFI_SIGNATURE 0xFEEF04BDL +#define VS_FFI_STRUCVERSION 0x00010000L +#define VS_FFI_FILEFLAGSMASK 0x0000003FL + +/* ----- VS_VERSION.dwFileFlags ----- */ +#define VS_FF_DEBUG 0x00000001L +#define VS_FF_PRERELEASE 0x00000002L +#define VS_FF_PATCHED 0x00000004L +#define VS_FF_PRIVATEBUILD 0x00000008L +#define VS_FF_INFOINFERRED 0x00000010L +#define VS_FF_SPECIALBUILD 0x00000020L + +/* ----- VS_VERSION.dwFileOS ----- */ +#define VOS_UNKNOWN 0x00000000L +#define VOS_DOS 0x00010000L +#define VOS_OS216 0x00020000L +#define VOS_OS232 0x00030000L +#define VOS_NT 0x00040000L + +#define VOS__BASE 0x00000000L +#define VOS__WINDOWS16 0x00000001L +#define VOS__PM16 0x00000002L +#define VOS__PM32 0x00000003L +#define VOS__WINDOWS32 0x00000004L + +#define VOS_DOS_WINDOWS16 0x00010001L +#define VOS_DOS_WINDOWS32 0x00010004L +#define VOS_OS216_PM16 0x00020002L +#define VOS_OS232_PM32 0x00030003L +#define VOS_NT_WINDOWS32 0x00040004L + +/* ----- VS_VERSION.dwFileType ----- */ +#define VFT_UNKNOWN 0x00000000L +#define VFT_APP 0x00000001L +#define VFT_DLL 0x00000002L +#define VFT_DRV 0x00000003L +#define VFT_FONT 0x00000004L +#define VFT_VXD 0x00000005L +#define VFT_STATIC_LIB 0x00000007L + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_DRV ----- */ +#define VFT2_UNKNOWN 0x00000000L +#define VFT2_DRV_PRINTER 0x00000001L +#define VFT2_DRV_KEYBOARD 0x00000002L +#define VFT2_DRV_LANGUAGE 0x00000003L +#define VFT2_DRV_DISPLAY 0x00000004L +#define VFT2_DRV_MOUSE 0x00000005L +#define VFT2_DRV_NETWORK 0x00000006L +#define VFT2_DRV_SYSTEM 0x00000007L +#define VFT2_DRV_INSTALLABLE 0x00000008L +#define VFT2_DRV_SOUND 0x00000009L +#define VFT2_DRV_COMM 0x0000000AL + +/* ----- VS_VERSION.dwFileSubtype for VFT_WINDOWS_FONT ----- */ +#define VFT2_FONT_RASTER 0x00000001L +#define VFT2_FONT_VECTOR 0x00000002L +#define VFT2_FONT_TRUETYPE 0x00000003L + +/* ----- VerFindFile() flags ----- */ +#define VFFF_ISSHAREDFILE 0x0001 + +#define VFF_CURNEDEST 0x0001 +#define VFF_FILEINUSE 0x0002 +#define VFF_BUFFTOOSMALL 0x0004 + +/* ----- VerInstallFile() flags ----- */ +#define VIFF_FORCEINSTALL 0x0001 +#define VIFF_DONTDELETEOLD 0x0002 + +#define VIF_TEMPFILE 0x00000001L +#define VIF_MISMATCH 0x00000002L +#define VIF_SRCOLD 0x00000004L + +#define VIF_DIFFLANG 0x00000008L +#define VIF_DIFFCODEPG 0x00000010L +#define VIF_DIFFTYPE 0x00000020L + +#define VIF_WRITEPROT 0x00000040L +#define VIF_FILEINUSE 0x00000080L +#define VIF_OUTOFSPACE 0x00000100L +#define VIF_ACCESSVIOLATION 0x00000200L +#define VIF_SHARINGVIOLATION 0x00000400L +#define VIF_CANNOTCREATE 0x00000800L +#define VIF_CANNOTDELETE 0x00001000L +#define VIF_CANNOTRENAME 0x00002000L +#define VIF_CANNOTDELETECUR 0x00004000L +#define VIF_OUTOFMEMORY 0x00008000L + +#define VIF_CANNOTREADSRC 0x00010000L +#define VIF_CANNOTREADDST 0x00020000L + +#define VIF_BUFFTOOSMALL 0x00040000L + +#ifndef RC_INVOKED /* RC doesn't need to see the rest of this */ + +/* ----- Types and structures ----- */ + +typedef signed short int SHORT; + +typedef struct tagVS_FIXEDFILEINFO +{ + DWORD dwSignature; /* e.g. 0xfeef04bd */ + DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */ + DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */ + DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */ + DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */ + DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */ + DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */ + DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */ + DWORD dwFileType; /* e.g. VFT_DRIVER */ + DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */ + DWORD dwFileDateMS; /* e.g. 0 */ + DWORD dwFileDateLS; /* e.g. 0 */ +} VS_FIXEDFILEINFO; + +/* ----- Function prototypes ----- */ + +UINT WINAPI VerFindFile(UINT uFlags, LPCSTR szFileName, + LPCSTR szWinDir, LPCSTR szAppDir, + LPSTR szCurDir, UINT FAR* lpuCurDirLen, + LPSTR szDestDir, UINT FAR* lpuDestDirLen); + +DWORD WINAPI VerInstallFile(UINT uFlags, + LPCSTR szSrcFileName, LPCSTR szDestFileName, LPCSTR szSrcDir, + LPCSTR szDestDir, LPCSTR szCurDir, LPSTR szTmpFile, UINT FAR* lpuTmpFileLen); + +/* Returns size of version info in bytes */ +DWORD WINAPI GetFileVersionInfoSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD FAR *lpdwHandle); /* Information for use by GetFileVersionInfo */ + +/* Read version info into buffer */ +BOOL WINAPI GetFileVersionInfo( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + DWORD dwHandle, /* Information from GetFileVersionSize */ + DWORD dwLen, /* Length of buffer for info */ + void FAR* lpData); /* Buffer to place the data structure */ + +/* Returns size of resource in bytes */ +DWORD WINAPI GetFileResourceSize( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD FAR *lpdwFileOffset); /* Returns file offset of resource */ + +/* Reads file resource into buffer */ +BOOL WINAPI GetFileResource( + LPCSTR lpstrFilename, /* Filename of version stamped file */ + LPCSTR lpstrResType, /* Type: normally VS_FILE_INFO */ + LPCSTR lpstrResID, /* ID: normally VS_VERSION_INFO */ + DWORD dwFileOffset, /* File offset or NULL */ + DWORD dwResLen, /* Length of resource to read or NULL */ + void FAR* lpData); /* Pointer to data buffer */ + +UINT WINAPI VerLanguageName(UINT wLang, LPSTR szLang, UINT nSize); + +UINT WINAPI GetWindowsDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +UINT WINAPI GetSystemDir(LPCSTR szAppDir, LPSTR lpBuffer, int nSize); + +BOOL WINAPI VerQueryValue(const void FAR* pBlock, LPCSTR lpSubBlock, + void FAR* FAR* lplpBuffer, UINT FAR* lpuLen); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#pragma pack() + +#endif /* !RC_INVOKED */ +#endif /* !_INC_VER */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/vmemory.h b/private/oleauto/tools/win16/hdos/c800/include/vmemory.h new file mode 100644 index 000000000..4a57e93ec --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/vmemory.h @@ -0,0 +1,60 @@ +/*** +* vmemory.h - Virtual Memory (VM) Management Routines +* +* Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file provides prototypes and definitions for +* the virtual memory management routines. +* +*******************************************************************************/ + +#ifndef _INC_VMEMORY + +#if (_MSC_VER <= 600) +#define __far _far +#define __pascal _pascal +#endif + +/* virtual memory handle type */ +typedef unsigned long _vmhnd_t; + +/* null handle value */ +#define _VM_NULL ((_vmhnd_t) 0) + +/* use all available DOS memory for virtual heap */ +#define _VM_ALLDOS 0 + +/* swap areas */ +#define _VM_EMS 1 +#define _VM_XMS 2 +#define _VM_DISK 4 +#define _VM_ALLSWAP (_VM_EMS | _VM_XMS | _VM_DISK) + +/* clean/dirty flags */ +#define _VM_CLEAN 0 +#define _VM_DIRTY 1 + +/* function prototypes */ + +#ifdef __cplusplus +extern "C" { +#endif + +void __far __pascal _vfree(_vmhnd_t); +int __far __pascal _vheapinit(unsigned int, unsigned int, unsigned int); +void __far __pascal _vheapterm(void); +void __far * __far __pascal _vload(_vmhnd_t, int); +void __far * __far __pascal _vlock(_vmhnd_t); +unsigned int __far __pascal _vlockcnt(_vmhnd_t); +_vmhnd_t __far __pascal _vmalloc(unsigned long); +unsigned long __far __pascal _vmsize(_vmhnd_t); +_vmhnd_t __far __pascal _vrealloc(_vmhnd_t , unsigned long); +void __far __pascal _vunlock(_vmhnd_t, int); + +#ifdef __cplusplus +} +#endif + +#define _INC_VMEMORY +#endif /* _INC_VMEMORY */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/wfext.h b/private/oleauto/tools/win16/hdos/c800/include/wfext.h new file mode 100644 index 000000000..0cadd0499 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/wfext.h @@ -0,0 +1,85 @@ +/*****************************************************************************\ +* * +* wfext.h - Windows File Manager Extensions definitions * +* * +* Version 3.10 * * +* * +* Copyright (c) 1991-1992, Microsoft Corp. All rights reserved. * +* * +*******************************************************************************/ + +#ifndef _INC_WFEXT +#define _INC_WFEXT /* #defined if wfext.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +#define MENU_TEXT_LEN 40 + +#define FMMENU_FIRST 1 +#define FMMENU_LAST 99 + +#define FMEVENT_LOAD 100 +#define FMEVENT_UNLOAD 101 +#define FMEVENT_INITMENU 102 +#define FMEVENT_USER_REFRESH 103 +#define FMEVENT_SELCHANGE 104 + +#define FMFOCUS_DIR 1 +#define FMFOCUS_TREE 2 +#define FMFOCUS_DRIVES 3 +#define FMFOCUS_SEARCH 4 + +#define FM_GETFOCUS (WM_USER + 0x0200) +#define FM_GETDRIVEINFO (WM_USER + 0x0201) +#define FM_GETSELCOUNT (WM_USER + 0x0202) +#define FM_GETSELCOUNTLFN (WM_USER + 0x0203) /* LFN versions are odd */ +#define FM_GETFILESEL (WM_USER + 0x0204) +#define FM_GETFILESELLFN (WM_USER + 0x0205) /* LFN versions are odd */ +#define FM_REFRESH_WINDOWS (WM_USER + 0x0206) +#define FM_RELOAD_EXTENSIONS (WM_USER + 0x0207) + +typedef struct tagFMS_GETFILESEL +{ + UINT wTime; + UINT wDate; + DWORD dwSize; + BYTE bAttr; + char szName[260]; /* always fully qualified */ +} FMS_GETFILESEL, FAR *LPFMS_GETFILESEL; + +typedef struct tagFMS_GETDRIVEINFO /* for drive */ +{ + DWORD dwTotalSpace; + DWORD dwFreeSpace; + char szPath[260]; /* current directory */ + char szVolume[14]; /* volume label */ + char szShare[128]; /* if this is a net drive */ +} FMS_GETDRIVEINFO, FAR *LPFMS_GETDRIVEINFO; + +typedef struct tagFMS_LOAD +{ + DWORD dwSize; /* for version checks */ + char szMenuName[MENU_TEXT_LEN]; /* output */ + HMENU hMenu; /* output */ + UINT wMenuDelta; /* input */ +} FMS_LOAD, FAR *LPFMS_LOAD; + +typedef DWORD (CALLBACK *FM_EXT_PROC)(HWND, UINT, LONG); +typedef DWORD (CALLBACK *FM_UNDELETE_PROC)(HWND, LPSTR); + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* _INC_WFEXT */ + diff --git a/private/oleauto/tools/win16/hdos/c800/include/windows.h b/private/oleauto/tools/win16/hdos/c800/include/windows.h new file mode 100644 index 000000000..ab1c8ba04 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windows.h @@ -0,0 +1,5373 @@ +/*****************************************************************************\ +* * +* windows.h - Windows functions, types, and definitions * +* * +* Version 3.10 * +* * +* Copyright (c) 1985-1992, Microsoft Corp. All rights reserved. * +* * +******************************************************************************* +* +* The following symbols control inclusion of various parts of this file: +* +* WINVER Windows version number (0x030a). To exclude +* definitions introduced in version 3.1 (or above) +* #define WINVER 0x0300 before #including <windows.h> +* +* #define: To prevent inclusion of: +* +* NOKERNEL KERNEL APIs and definitions +* NOGDI GDI APIs and definitions +* NOUSER USER APIs and definitions +* NOSOUND Sound APIs and definitions +* NOCOMM Comm driver APIs and definitions +* NODRIVERS Installable driver APIs and definitions +* +* NOMINMAX min() and max() macros +* NOLOGERROR LogError() and related definitions +* NOPROFILER Profiler APIs +* NOMEMMGR Local and global memory management +* NOLFILEIO _l* file I/O routines +* NOOPENFILE OpenFile and related definitions +* NORESOURCE Resource management +* NOATOM Atom management +* NOLANGUAGE Character test routines +* NOLSTRING lstr* string management routines +* NODBCS Double-byte character set routines +* NOKEYBOARDINFO Keyboard driver routines +* NOGDICAPMASKS GDI device capability constants +* NOCOLOR COLOR_* color values +* NOGDIOBJ GDI pens, brushes, fonts +* NODRAWTEXT DrawText() and related definitions +* NOTEXTMETRIC TEXTMETRIC and related APIs +* NOSCALABLEFONT Truetype scalable font support +* NOBITMAP Bitmap support +* NORASTEROPS GDI Raster operation definitions +* NOMETAFILE Metafile support +* NOSYSMETRICS GetSystemMetrics() and related SM_* definitions +* NOSYSTEMPARAMSINFO SystemParametersInfo() and SPI_* definitions +* NOMSG APIs and definitions that use MSG structure +* NOWINSTYLES Window style definitions +* NOWINOFFSETS Get/SetWindowWord/Long offset definitions +* NOSHOWWINDOW ShowWindow and related definitions +* NODEFERWINDOWPOS DeferWindowPos and related definitions +* NOVIRTUALKEYCODES VK_* virtual key codes +* NOKEYSTATES MK_* message key state flags +* NOWH SetWindowsHook and related WH_* definitions +* NOMENUS Menu APIs +* NOSCROLL Scrolling APIs and scroll bar control +* NOCLIPBOARD Clipboard APIs and definitions +* NOICONS IDI_* icon IDs +* NOMB MessageBox and related definitions +* NOSYSCOMMANDS WM_SYSCOMMAND SC_* definitions +* NOMDI MDI support +* NOCTLMGR Control management and controls +* NOWINMESSAGES WM_* window messages +* NOHELP Help support +* +\****************************************************************************/ + +#ifndef _INC_WINDOWS +#define _INC_WINDOWS /* #defined if windows.h has been included */ + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/* If WINVER is not defined, assume version 3.1 */ +#ifndef WINVER +#define WINVER 0x030a +#endif + +#ifdef RC_INVOKED +/* Don't include definitions that RC.EXE can't parse */ +#define NOATOM +#define NOGDI +#define NOGDICAPMASKS +#define NOMETAFILE +#define NOMINMAX +#define NOMSG +#define NOOPENFILE +#define NORASTEROPS +#define NOSCROLL +#define NOSOUND +#define NOSYSMETRICS +#define NOTEXTMETRIC +#define NOWH +#define NODBCS +#define NOSYSTEMPARAMSINFO +#define NOCOMM +#define NOOEMRESOURCE +#endif /* RC_INVOKED */ + +/* Handle OEMRESOURCE for 3.0 compatibility */ +#if (WINVER < 0x030a) +#define NOOEMRESOURCE +#ifdef OEMRESOURCE +#undef NOOEMRESOURCE +#endif +#endif + +/******* Common definitions and typedefs ***********************************/ + +#define VOID void + +#define FAR _far +#define NEAR _near +#define PASCAL _pascal +#define CDECL _cdecl + +#define WINAPI _far _pascal +#define CALLBACK _far _pascal + +/****** Simple types & common helper macros *********************************/ + +typedef int BOOL; +#define FALSE 0 +#define TRUE 1 + +typedef unsigned char BYTE; +typedef unsigned short WORD; +typedef unsigned long DWORD; + +typedef unsigned int UINT; + +#ifdef STRICT +typedef signed long LONG; +#else +#define LONG long +#endif + +#define LOBYTE(w) ((BYTE)(w)) +#define HIBYTE(w) ((BYTE)(((UINT)(w) >> 8) & 0xFF)) + +#define LOWORD(l) ((WORD)(DWORD)(l)) +#define HIWORD(l) ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF)) + +#define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16))) + +#ifndef NOMINMAX +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif +#endif /* NOMINMAX */ + +/* Types use for passing & returning polymorphic values */ +typedef UINT WPARAM; +typedef LONG LPARAM; +typedef LONG LRESULT; + +#define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high)) +#define MAKELRESULT(low, high) ((LRESULT)MAKELONG(low, high)) + +/****** Common pointer types ************************************************/ + +#ifndef NULL +#define NULL 0 +#endif + +typedef char NEAR* PSTR; +typedef char NEAR* NPSTR; + + +typedef char FAR* LPSTR; +typedef const char FAR* LPCSTR; + +typedef BYTE NEAR* PBYTE; +typedef BYTE FAR* LPBYTE; + +typedef int NEAR* PINT; +typedef int FAR* LPINT; + +typedef WORD NEAR* PWORD; +typedef WORD FAR* LPWORD; + +typedef long NEAR* PLONG; +typedef long FAR* LPLONG; + +typedef DWORD NEAR* PDWORD; +typedef DWORD FAR* LPDWORD; + +typedef void FAR* LPVOID; + +#define MAKELP(sel, off) ((void FAR*)MAKELONG((off), (sel))) +#define SELECTOROF(lp) HIWORD(lp) +#define OFFSETOF(lp) LOWORD(lp) + +#define FIELDOFFSET(type, field) ((int)(&((type NEAR*)1)->field)-1) + +/****** Common handle types *************************************************/ + +#ifdef STRICT +typedef const void NEAR* HANDLE; +#define DECLARE_HANDLE(name) struct name##__ { int unused; }; \ + typedef const struct name##__ NEAR* name +#define DECLARE_HANDLE32(name) struct name##__ { int unused; }; \ + typedef const struct name##__ FAR* name +#else /* STRICT */ +typedef UINT HANDLE; +#define DECLARE_HANDLE(name) typedef UINT name +#define DECLARE_HANDLE32(name) typedef DWORD name +#endif /* !STRICT */ + +typedef HANDLE* PHANDLE; +typedef HANDLE NEAR* SPHANDLE; +typedef HANDLE FAR* LPHANDLE; + +typedef HANDLE HGLOBAL; +typedef HANDLE HLOCAL; + +typedef HANDLE GLOBALHANDLE; +typedef HANDLE LOCALHANDLE; + +typedef UINT ATOM; + +#ifdef STRICT +typedef void (CALLBACK* FARPROC)(void); +typedef void (NEAR PASCAL* NEARPROC)(void); +#else +typedef int (CALLBACK* FARPROC)(); +typedef int (NEAR PASCAL* NEARPROC)(); +#endif + +DECLARE_HANDLE(HSTR); + +/****** KERNEL typedefs, structures, and functions **************************/ + +DECLARE_HANDLE(HINSTANCE); +typedef HINSTANCE HMODULE; /* HMODULEs can be used in place of HINSTANCEs */ + +#ifndef NOKERNEL + +/****** Application entry point function ************************************/ + +#ifdef STRICT +int PASCAL WinMain(HINSTANCE, HINSTANCE, LPSTR, int); +#endif + +/****** System Information **************************************************/ + +DWORD WINAPI GetVersion(void); + +DWORD WINAPI GetFreeSpace(UINT); +UINT WINAPI GetCurrentPDB(void); + +UINT WINAPI GetWindowsDirectory(LPSTR, UINT); +UINT WINAPI GetSystemDirectory(LPSTR, UINT); + +#if (WINVER >= 0x030a) +UINT WINAPI GetFreeSystemResources(UINT); +#define GFSR_SYSTEMRESOURCES 0x0000 +#define GFSR_GDIRESOURCES 0x0001 +#define GFSR_USERRESOURCES 0x0002 +#endif /* WINVER >= 0x030a */ + +DWORD WINAPI GetWinFlags(void); + +#define WF_PMODE 0x0001 +#define WF_CPU286 0x0002 +#define WF_CPU386 0x0004 +#define WF_CPU486 0x0008 +#define WF_STANDARD 0x0010 +#define WF_WIN286 0x0010 +#define WF_ENHANCED 0x0020 +#define WF_WIN386 0x0020 +#define WF_CPU086 0x0040 +#define WF_CPU186 0x0080 +#define WF_LARGEFRAME 0x0100 +#define WF_SMALLFRAME 0x0200 +#define WF_80x87 0x0400 +#define WF_PAGING 0x0800 +#define WF_WLO 0x8000 + +LPSTR WINAPI GetDOSEnvironment(void); + +DWORD WINAPI GetCurrentTime(void); +DWORD WINAPI GetTickCount(void); +DWORD WINAPI GetTimerResolution(void); + +/****** Error handling ******************************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOLOGERROR + +void WINAPI LogError(UINT err, void FAR* lpInfo); +void WINAPI LogParamError(UINT err, FARPROC lpfn, void FAR* param); + +/****** LogParamError/LogError values */ + +/* Error modifier bits */ + +#define ERR_WARNING 0x8000 +#define ERR_PARAM 0x4000 + +#define ERR_SIZE_MASK 0x3000 +#define ERR_BYTE 0x1000 +#define ERR_WORD 0x2000 +#define ERR_DWORD 0x3000 + +/****** LogParamError() values */ + +/* Generic parameter values */ +#define ERR_BAD_VALUE 0x6001 +#define ERR_BAD_FLAGS 0x6002 +#define ERR_BAD_INDEX 0x6003 +#define ERR_BAD_DVALUE 0x7004 +#define ERR_BAD_DFLAGS 0x7005 +#define ERR_BAD_DINDEX 0x7006 +#define ERR_BAD_PTR 0x7007 +#define ERR_BAD_FUNC_PTR 0x7008 +#define ERR_BAD_SELECTOR 0x6009 +#define ERR_BAD_STRING_PTR 0x700a +#define ERR_BAD_HANDLE 0x600b + +/* KERNEL parameter errors */ +#define ERR_BAD_HINSTANCE 0x6020 +#define ERR_BAD_HMODULE 0x6021 +#define ERR_BAD_GLOBAL_HANDLE 0x6022 +#define ERR_BAD_LOCAL_HANDLE 0x6023 +#define ERR_BAD_ATOM 0x6024 +#define ERR_BAD_HFILE 0x6025 + +/* USER parameter errors */ +#define ERR_BAD_HWND 0x6040 +#define ERR_BAD_HMENU 0x6041 +#define ERR_BAD_HCURSOR 0x6042 +#define ERR_BAD_HICON 0x6043 +#define ERR_BAD_HDWP 0x6044 +#define ERR_BAD_CID 0x6045 +#define ERR_BAD_HDRVR 0x6046 + +/* GDI parameter errors */ +#define ERR_BAD_COORDS 0x7060 +#define ERR_BAD_GDI_OBJECT 0x6061 +#define ERR_BAD_HDC 0x6062 +#define ERR_BAD_HPEN 0x6063 +#define ERR_BAD_HFONT 0x6064 +#define ERR_BAD_HBRUSH 0x6065 +#define ERR_BAD_HBITMAP 0x6066 +#define ERR_BAD_HRGN 0x6067 +#define ERR_BAD_HPALETTE 0x6068 +#define ERR_BAD_HMETAFILE 0x6069 + + +/**** LogError() values */ + +/* KERNEL errors */ +#define ERR_GALLOC 0x0001 +#define ERR_GREALLOC 0x0002 +#define ERR_GLOCK 0x0003 +#define ERR_LALLOC 0x0004 +#define ERR_LREALLOC 0x0005 +#define ERR_LLOCK 0x0006 +#define ERR_ALLOCRES 0x0007 +#define ERR_LOCKRES 0x0008 +#define ERR_LOADMODULE 0x0009 + +/* USER errors */ +#define ERR_CREATEDLG 0x0040 +#define ERR_CREATEDLG2 0x0041 +#define ERR_REGISTERCLASS 0x0042 +#define ERR_DCBUSY 0x0043 +#define ERR_CREATEWND 0x0044 +#define ERR_STRUCEXTRA 0x0045 +#define ERR_LOADSTR 0x0046 +#define ERR_LOADMENU 0x0047 +#define ERR_NESTEDBEGINPAINT 0x0048 +#define ERR_BADINDEX 0x0049 +#define ERR_CREATEMENU 0x004a + +/* GDI errors */ +#define ERR_CREATEDC 0x0080 +#define ERR_CREATEMETA 0x0081 +#define ERR_DELOBJSELECTED 0x0082 +#define ERR_SELBITMAP 0x0083 + +/* Debugging support (DEBUG SYSTEM ONLY) */ +typedef struct tagWINDEBUGINFO +{ + UINT flags; + DWORD dwOptions; + DWORD dwFilter; + char achAllocModule[8]; + DWORD dwAllocBreak; + DWORD dwAllocCount; +} WINDEBUGINFO; + +BOOL WINAPI GetWinDebugInfo(WINDEBUGINFO FAR* lpwdi, UINT flags); +BOOL WINAPI SetWinDebugInfo(const WINDEBUGINFO FAR* lpwdi); + +void FAR _cdecl DebugOutput(UINT flags, LPCSTR lpsz, ...); + +/* WINDEBUGINFO flags values */ +#define WDI_OPTIONS 0x0001 +#define WDI_FILTER 0x0002 +#define WDI_ALLOCBREAK 0x0004 + +/* dwOptions values */ +#define DBO_CHECKHEAP 0x0001 +#define DBO_BUFFERFILL 0x0004 +#define DBO_DISABLEGPTRAPPING 0x0010 +#define DBO_CHECKFREE 0x0020 + +#define DBO_SILENT 0x8000 + +#define DBO_TRACEBREAK 0x2000 +#define DBO_WARNINGBREAK 0x1000 +#define DBO_NOERRORBREAK 0x0800 +#define DBO_NOFATALBREAK 0x0400 +#define DBO_INT3BREAK 0x0100 + +/* DebugOutput flags values */ +#define DBF_TRACE 0x0000 +#define DBF_WARNING 0x4000 +#define DBF_ERROR 0x8000 +#define DBF_FATAL 0xc000 + +/* dwFilter values */ +#define DBF_KERNEL 0x1000 +#define DBF_KRN_MEMMAN 0x0001 +#define DBF_KRN_LOADMODULE 0x0002 +#define DBF_KRN_SEGMENTLOAD 0x0004 +#define DBF_USER 0x0800 +#define DBF_GDI 0x0400 +#define DBF_MMSYSTEM 0x0040 +#define DBF_PENWIN 0x0020 +#define DBF_APPLICATION 0x0008 +#define DBF_DRIVER 0x0010 + +#endif /* NOLOGERROR */ +#endif /* WINVER >= 0x030a */ + +void WINAPI FatalExit(int); +void WINAPI FatalAppExit(UINT, LPCSTR); + +BOOL WINAPI ExitWindows(DWORD dwReturnCode, UINT wReserved); + +#define EW_RESTARTWINDOWS 0x42 +#if (WINVER >= 0x030a) +#define EW_REBOOTSYSTEM 0x43 + +BOOL WINAPI ExitWindowsExec(LPCSTR, LPCSTR); +#endif /* WINVER >= 0x030a */ + +void WINAPI DebugBreak(void); +void WINAPI OutputDebugString(LPCSTR); + +/* SetErrorMode() constants */ +#define SEM_FAILCRITICALERRORS 0x0001 +#define SEM_NOGPFAULTERRORBOX 0x0002 +#define SEM_NOOPENFILEERRORBOX 0x8000 + +UINT WINAPI SetErrorMode(UINT); + +/****** Pointer validation **************************************************/ + +#if (WINVER >= 0x030a) + +BOOL WINAPI IsBadReadPtr(const void FAR* lp, UINT cb); +BOOL WINAPI IsBadWritePtr(void FAR* lp, UINT cb); +BOOL WINAPI IsBadHugeReadPtr(const void _huge* lp, DWORD cb); +BOOL WINAPI IsBadHugeWritePtr(void _huge* lp, DWORD cb); +BOOL WINAPI IsBadCodePtr(FARPROC lpfn); +BOOL WINAPI IsBadStringPtr(const void FAR* lpsz, UINT cchMax); +#endif /* WINVER >= 0x030a */ + +/****** Profiling support ***************************************************/ + +#ifndef NOPROFILER + +int WINAPI ProfInsChk(void); +void WINAPI ProfSetup(int,int); +void WINAPI ProfSampRate(int,int); +void WINAPI ProfStart(void); +void WINAPI ProfStop(void); +void WINAPI ProfClear(void); +void WINAPI ProfFlush(void); +void WINAPI ProfFinish(void); +#endif /* NOPROFILER */ + +/****** Catch/Throw and stack management ************************************/ + +typedef int CATCHBUF[9]; +typedef int FAR* LPCATCHBUF; + +int WINAPI Catch(int FAR*); +void WINAPI Throw(const int FAR*, int); + +void WINAPI SwitchStackBack(void); +void WINAPI SwitchStackTo(UINT, UINT, UINT); + +/****** Module Management ***************************************************/ + +#define HINSTANCE_ERROR ((HINSTANCE)32) + + +HINSTANCE WINAPI LoadModule(LPCSTR, LPVOID); +BOOL WINAPI FreeModule(HINSTANCE); + +HINSTANCE WINAPI LoadLibrary(LPCSTR); +void WINAPI FreeLibrary(HINSTANCE); + +UINT WINAPI WinExec(LPCSTR, UINT); + +HMODULE WINAPI GetModuleHandle(LPCSTR); + +int WINAPI GetModuleUsage(HINSTANCE); +int WINAPI GetModuleFileName(HINSTANCE, LPSTR, int); + +FARPROC WINAPI GetProcAddress(HINSTANCE, LPCSTR); + +int WINAPI GetInstanceData(HINSTANCE, BYTE*, int); + +HGLOBAL WINAPI GetCodeHandle(FARPROC); + +typedef struct tagSEGINFO +{ + UINT offSegment; + UINT cbSegment; + UINT flags; + UINT cbAlloc; + HGLOBAL h; + UINT alignShift; + UINT reserved[2]; +} SEGINFO; +typedef SEGINFO FAR* LPSEGINFO; + +void WINAPI GetCodeInfo(FARPROC lpProc, SEGINFO FAR* lpSegInfo); + +FARPROC WINAPI MakeProcInstance(FARPROC, HINSTANCE); +void WINAPI FreeProcInstance(FARPROC); + +LONG WINAPI SetSwapAreaSize(UINT); +void WINAPI SwapRecording(UINT); +void WINAPI ValidateCodeSegments(void); + +/* Windows Exit Procedure flag values */ +#define WEP_SYSTEM_EXIT 1 +#define WEP_FREE_DLL 0 + +/****** Task Management *****************************************************/ + +#endif /* NOKERNEL */ + +DECLARE_HANDLE(HTASK); + +#ifndef NOKERNEL + +UINT WINAPI GetNumTasks(void); + +#if (WINVER >= 0x030a) +BOOL WINAPI IsTask(HTASK); +#endif /* WINVER >= 0x030a */ + +HTASK WINAPI GetCurrentTask(void); + +void WINAPI Yield(void); +void WINAPI DirectedYield(HTASK); + + +/****** Global memory management ********************************************/ + +#ifndef NOMEMMGR + +/* Global Memory Flags */ + +#define GMEM_FIXED 0x0000 +#define GMEM_MOVEABLE 0x0002 +#define GMEM_NOCOMPACT 0x0010 +#define GMEM_NODISCARD 0x0020 +#define GMEM_ZEROINIT 0x0040 +#define GMEM_MODIFY 0x0080 +#define GMEM_DISCARDABLE 0x0100 +#define GMEM_NOT_BANKED 0x1000 +#define GMEM_SHARE 0x2000 +#define GMEM_DDESHARE 0x2000 +#define GMEM_NOTIFY 0x4000 +#define GMEM_LOWER GMEM_NOT_BANKED + +#define GHND (GMEM_MOVEABLE | GMEM_ZEROINIT) +#define GPTR (GMEM_FIXED | GMEM_ZEROINIT) + +#define GlobalDiscard(h) GlobalReAlloc(h, 0L, GMEM_MOVEABLE) + +HGLOBAL WINAPI GlobalAlloc(UINT, DWORD); +HGLOBAL WINAPI GlobalReAlloc(HGLOBAL, DWORD, UINT); +HGLOBAL WINAPI GlobalFree(HGLOBAL); + +DWORD WINAPI GlobalDosAlloc(DWORD); +UINT WINAPI GlobalDosFree(UINT); + +#ifdef STRICT +void FAR* WINAPI GlobalLock(HGLOBAL); +#else +char FAR* WINAPI GlobalLock(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnlock(HGLOBAL); + +DWORD WINAPI GlobalSize(HGLOBAL); +DWORD WINAPI GlobalHandle(UINT); + +/* GlobalFlags return flags (in addition to GMEM_DISCARDABLE) */ +#define GMEM_DISCARDED 0x4000 +#define GMEM_LOCKCOUNT 0x00FF +UINT WINAPI GlobalFlags(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI GlobalWire(HGLOBAL); +#else +char FAR* WINAPI GlobalWire(HGLOBAL); +#endif + +BOOL WINAPI GlobalUnWire(HGLOBAL); + +UINT WINAPI GlobalPageLock(HGLOBAL); +UINT WINAPI GlobalPageUnlock(HGLOBAL); + +void WINAPI GlobalFix(HGLOBAL); +void WINAPI GlobalUnfix(HGLOBAL); + +HGLOBAL WINAPI GlobalLRUNewest(HGLOBAL); +HGLOBAL WINAPI GlobalLRUOldest(HGLOBAL); + +DWORD WINAPI GlobalCompact(DWORD); + +#ifdef STRICT +typedef BOOL (CALLBACK* GNOTIFYPROC)(HGLOBAL); +#else +typedef FARPROC GNOTIFYPROC; +#endif + +void WINAPI GlobalNotify(GNOTIFYPROC); + +HGLOBAL WINAPI LockSegment(UINT); +void WINAPI UnlockSegment(UINT); + +#define LockData(dummy) LockSegment((UINT)-1) +#define UnlockData(dummy) UnlockSegment((UINT)-1) + +UINT WINAPI AllocSelector(UINT); +UINT WINAPI FreeSelector(UINT); +UINT WINAPI AllocDStoCSAlias(UINT); +UINT WINAPI PrestoChangoSelector(UINT sourceSel, UINT destSel); +DWORD WINAPI GetSelectorBase(UINT); +UINT WINAPI SetSelectorBase(UINT, DWORD); +DWORD WINAPI GetSelectorLimit(UINT); +UINT WINAPI SetSelectorLimit(UINT, DWORD); + +void WINAPI LimitEmsPages(DWORD); + +void WINAPI ValidateFreeSpaces(void); + +/* Low system memory notification message */ +#define WM_COMPACTING 0x0041 + +/***** Local Memory Management */ + +/* Local Memory Flags */ +#define LMEM_FIXED 0x0000 +#define LMEM_MOVEABLE 0x0002 +#define LMEM_NOCOMPACT 0x0010 +#define LMEM_NODISCARD 0x0020 +#define LMEM_ZEROINIT 0x0040 +#define LMEM_MODIFY 0x0080 +#define LMEM_DISCARDABLE 0x0F00 + +#define LHND (LMEM_MOVEABLE | LMEM_ZEROINIT) +#define LPTR (LMEM_FIXED | LMEM_ZEROINIT) + +#define NONZEROLHND (LMEM_MOVEABLE) +#define NONZEROLPTR (LMEM_FIXED) + + +#define LocalDiscard(h) LocalReAlloc(h, 0, LMEM_MOVEABLE) + + +HLOCAL WINAPI LocalAlloc(UINT, UINT); +HLOCAL WINAPI LocalReAlloc(HLOCAL, UINT, UINT); +HLOCAL WINAPI LocalFree(HLOCAL); + +#ifdef STRICT +void NEAR* WINAPI LocalLock(HLOCAL); +#else +char NEAR* WINAPI LocalLock(HLOCAL); +#endif + +BOOL WINAPI LocalUnlock(HLOCAL); + +UINT WINAPI LocalSize(HLOCAL); +#ifdef STRICT +HLOCAL WINAPI LocalHandle(void NEAR*); +#else +HLOCAL WINAPI LocalHandle(UINT); +#endif + +/* LocalFlags return flags (in addition to LMEM_DISCARDABLE) */ +#define LMEM_DISCARDED 0x4000 +#define LMEM_LOCKCOUNT 0x00FF + +UINT WINAPI LocalFlags(HLOCAL); + +BOOL WINAPI LocalInit(UINT, UINT, UINT); +UINT WINAPI LocalCompact(UINT); +UINT WINAPI LocalShrink(HLOCAL, UINT); + +#endif /* NOMEMMGR */ + +/****** File I/O ************************************************************/ + +#ifndef NOLFILEIO + +typedef int HFILE; /* Polymorphic with C runtime file handle type */ + +#define HFILE_ERROR ((HFILE)-1) + +#ifndef NOOPENFILE + +/* OpenFile() Structure */ +typedef struct tagOFSTRUCT +{ + BYTE cBytes; + BYTE fFixedDisk; + UINT nErrCode; + BYTE reserved[4]; + char szPathName[128]; +} OFSTRUCT; +typedef OFSTRUCT* POFSTRUCT; +typedef OFSTRUCT NEAR* NPOFSTRUCT; +typedef OFSTRUCT FAR* LPOFSTRUCT; + +/* OpenFile() Flags */ +#define OF_READ 0x0000 +#define OF_WRITE 0x0001 +#define OF_READWRITE 0x0002 +#define OF_SHARE_COMPAT 0x0000 +#define OF_SHARE_EXCLUSIVE 0x0010 +#define OF_SHARE_DENY_WRITE 0x0020 +#define OF_SHARE_DENY_READ 0x0030 +#define OF_SHARE_DENY_NONE 0x0040 +#define OF_PARSE 0x0100 +#define OF_DELETE 0x0200 +#define OF_VERIFY 0x0400 /* Used with OF_REOPEN */ +#define OF_SEARCH 0x0400 /* Used without OF_REOPEN */ +#define OF_CANCEL 0x0800 +#define OF_CREATE 0x1000 +#define OF_PROMPT 0x2000 +#define OF_EXIST 0x4000 +#define OF_REOPEN 0x8000 + +HFILE WINAPI OpenFile(LPCSTR, OFSTRUCT FAR*, UINT); + +#endif /* NOOPENFILE */ + +/* _lopen() flags */ +#define READ 0 +#define WRITE 1 +#define READ_WRITE 2 + +HFILE WINAPI _lopen(LPCSTR, int); +HFILE WINAPI _lcreat(LPCSTR, int); + +HFILE WINAPI _lclose(HFILE); + +LONG WINAPI _llseek(HFILE, LONG, int); + +/* _llseek origin values */ +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +UINT WINAPI _lread(HFILE, void _huge*, UINT); +UINT WINAPI _lwrite(HFILE, const void _huge*, UINT); + +#if (WINVER >= 0x030a) +long WINAPI _hread(HFILE, void _huge*, long); +long WINAPI _hwrite(HFILE, const void _huge*, long); +#endif /* WINVER >= 0x030a */ + + +#endif /* NOLFILEIO */ + +/* GetTempFileName() Flags */ +#define TF_FORCEDRIVE (BYTE)0x80 + +int WINAPI GetTempFileName(BYTE, LPCSTR, UINT, LPSTR); +BYTE WINAPI GetTempDrive(char); + +/* GetDriveType return values */ +#define DRIVE_REMOVABLE 2 +#define DRIVE_FIXED 3 +#define DRIVE_REMOTE 4 +UINT WINAPI GetDriveType(int); + +UINT WINAPI SetHandleCount(UINT); + +/****** Network support *****************************************************/ +UINT WINAPI WNetAddConnection(LPSTR, LPSTR, LPSTR); +UINT WINAPI WNetGetConnection(LPSTR, LPSTR, UINT FAR*); +UINT WINAPI WNetCancelConnection(LPSTR, BOOL); +/* Errors */ +#define WN_SUCCESS 0x0000 +#define WN_NOT_SUPPORTED 0x0001 +#define WN_NET_ERROR 0x0002 +#define WN_MORE_DATA 0x0003 +#define WN_BAD_POINTER 0x0004 +#define WN_BAD_VALUE 0x0005 +#define WN_BAD_PASSWORD 0x0006 +#define WN_ACCESS_DENIED 0x0007 +#define WN_FUNCTION_BUSY 0x0008 +#define WN_WINDOWS_ERROR 0x0009 +#define WN_BAD_USER 0x000A +#define WN_OUT_OF_MEMORY 0x000B +#define WN_CANCEL 0x000C +#define WN_CONTINUE 0x000D + +/* Connection errors */ +#define WN_NOT_CONNECTED 0x0030 +#define WN_OPEN_FILES 0x0031 +#define WN_BAD_NETNAME 0x0032 +#define WN_BAD_LOCALNAME 0x0033 +#define WN_ALREADY_CONNECTED 0x0034 +#define WN_DEVICE_ERROR 0x0035 +#define WN_CONNECTION_CLOSED 0x0036 + +/****** Resource Management *************************************************/ + +DECLARE_HANDLE(HRSRC); + +HRSRC WINAPI FindResource(HINSTANCE, LPCSTR, LPCSTR); +HGLOBAL WINAPI LoadResource(HINSTANCE, HRSRC); +BOOL WINAPI FreeResource(HGLOBAL); + +#ifdef STRICT +void FAR* WINAPI LockResource(HGLOBAL); +#else +char FAR* WINAPI LockResource(HGLOBAL); +#endif + +#define UnlockResource(h) GlobalUnlock(h) + +DWORD WINAPI SizeofResource(HINSTANCE, HRSRC); + +int WINAPI AccessResource(HINSTANCE, HRSRC); + +HGLOBAL WINAPI AllocResource(HINSTANCE, HRSRC, DWORD); + +#ifdef STRICT +typedef HGLOBAL (CALLBACK* RSRCHDLRPROC)(HGLOBAL, HINSTANCE, HRSRC); +#else +typedef FARPROC RSRCHDLRPROC; +#endif + +RSRCHDLRPROC WINAPI SetResourceHandler(HINSTANCE, LPCSTR, RSRCHDLRPROC); + +#define MAKEINTRESOURCE(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NORESOURCE + +/* Predefined Resource Types */ +#define RT_CURSOR MAKEINTRESOURCE(1) +#define RT_BITMAP MAKEINTRESOURCE(2) +#define RT_ICON MAKEINTRESOURCE(3) +#define RT_MENU MAKEINTRESOURCE(4) +#define RT_DIALOG MAKEINTRESOURCE(5) +#define RT_STRING MAKEINTRESOURCE(6) +#define RT_FONTDIR MAKEINTRESOURCE(7) +#define RT_FONT MAKEINTRESOURCE(8) +#define RT_ACCELERATOR MAKEINTRESOURCE(9) +#define RT_RCDATA MAKEINTRESOURCE(10) + +#define RT_GROUP_CURSOR MAKEINTRESOURCE(12) +#define RT_GROUP_ICON MAKEINTRESOURCE(14) + +#endif /* NORESOURCE */ + +#ifdef OEMRESOURCE + +/* OEM Resource Ordinal Numbers */ +#define OBM_CLOSE 32754 +#define OBM_UPARROW 32753 +#define OBM_DNARROW 32752 +#define OBM_RGARROW 32751 +#define OBM_LFARROW 32750 +#define OBM_REDUCE 32749 +#define OBM_ZOOM 32748 +#define OBM_RESTORE 32747 +#define OBM_REDUCED 32746 +#define OBM_ZOOMD 32745 +#define OBM_RESTORED 32744 +#define OBM_UPARROWD 32743 +#define OBM_DNARROWD 32742 +#define OBM_RGARROWD 32741 +#define OBM_LFARROWD 32740 +#define OBM_MNARROW 32739 +#define OBM_COMBO 32738 +#if (WINVER >= 0x030a) +#define OBM_UPARROWI 32737 +#define OBM_DNARROWI 32736 +#define OBM_RGARROWI 32735 +#define OBM_LFARROWI 32734 +#endif /* WINVER >= 0x030a */ + +#define OBM_OLD_CLOSE 32767 +#define OBM_SIZE 32766 +#define OBM_OLD_UPARROW 32765 +#define OBM_OLD_DNARROW 32764 +#define OBM_OLD_RGARROW 32763 +#define OBM_OLD_LFARROW 32762 +#define OBM_BTSIZE 32761 +#define OBM_CHECK 32760 +#define OBM_CHECKBOXES 32759 +#define OBM_BTNCORNERS 32758 +#define OBM_OLD_REDUCE 32757 +#define OBM_OLD_ZOOM 32756 +#define OBM_OLD_RESTORE 32755 + +#define OCR_NORMAL 32512 +#define OCR_IBEAM 32513 +#define OCR_WAIT 32514 +#define OCR_CROSS 32515 +#define OCR_UP 32516 +#define OCR_SIZE 32640 +#define OCR_ICON 32641 +#define OCR_SIZENWSE 32642 +#define OCR_SIZENESW 32643 +#define OCR_SIZEWE 32644 +#define OCR_SIZENS 32645 +#define OCR_SIZEALL 32646 +#define OCR_ICOCUR 32647 + +#define OIC_SAMPLE 32512 +#define OIC_HAND 32513 +#define OIC_QUES 32514 +#define OIC_BANG 32515 +#define OIC_NOTE 32516 + +#endif /* OEMRESOURCE */ + +/****** Atom Management *****************************************************/ + +#define MAKEINTATOM(i) ((LPCSTR)MAKELP(0, (i))) + +#ifndef NOATOM + +BOOL WINAPI InitAtomTable(int); +ATOM WINAPI AddAtom(LPCSTR); +ATOM WINAPI DeleteAtom(ATOM); +ATOM WINAPI FindAtom(LPCSTR); +UINT WINAPI GetAtomName(ATOM, LPSTR, int); +ATOM WINAPI GlobalAddAtom(LPCSTR); +ATOM WINAPI GlobalDeleteAtom(ATOM); +ATOM WINAPI GlobalFindAtom(LPCSTR); +UINT WINAPI GlobalGetAtomName(ATOM, LPSTR, int); +HLOCAL WINAPI GetAtomHandle(ATOM); + +#endif /* NOATOM */ + +/****** WIN.INI Support *****************************************************/ + +/* User Profile Routines */ +UINT WINAPI GetProfileInt(LPCSTR, LPCSTR, int); +int WINAPI GetProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int); +BOOL WINAPI WriteProfileString(LPCSTR, LPCSTR, LPCSTR); + +UINT WINAPI GetPrivateProfileInt(LPCSTR, LPCSTR, int, LPCSTR); +int WINAPI GetPrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPSTR, int, LPCSTR); +BOOL WINAPI WritePrivateProfileString(LPCSTR, LPCSTR, LPCSTR, LPCSTR); + +#define WM_WININICHANGE 0x001A + +/****** International & Char Translation Support ****************************/ + +void WINAPI AnsiToOem(const char _huge*, char _huge*); +void WINAPI OemToAnsi(const char _huge*, char _huge*); + +void WINAPI AnsiToOemBuff(LPCSTR, LPSTR, UINT); +void WINAPI OemToAnsiBuff(LPCSTR, LPSTR, UINT); + +LPSTR WINAPI AnsiNext(LPCSTR); +LPSTR WINAPI AnsiPrev(LPCSTR, LPCSTR); + +LPSTR WINAPI AnsiUpper(LPSTR); +LPSTR WINAPI AnsiLower(LPSTR); + +UINT WINAPI AnsiUpperBuff(LPSTR, UINT); +UINT WINAPI AnsiLowerBuff(LPSTR, UINT); + + +#ifndef NOLANGUAGE +BOOL WINAPI IsCharAlpha(char); +BOOL WINAPI IsCharAlphaNumeric(char); +BOOL WINAPI IsCharUpper(char); +BOOL WINAPI IsCharLower(char); +#endif + +#ifndef NOLSTRING +int WINAPI lstrcmp(LPCSTR, LPCSTR); +int WINAPI lstrcmpi(LPCSTR, LPCSTR); +LPSTR WINAPI lstrcpy(LPSTR, LPCSTR); +LPSTR WINAPI lstrcat(LPSTR, LPCSTR); +int WINAPI lstrlen(LPCSTR); +#if (WINVER >= 0x030a) +LPSTR WINAPI lstrcpyn(LPSTR, LPCSTR, int); +void WINAPI hmemcpy(void _huge*, const void _huge*, long); +#endif /* WINVER >= 0x030a */ +#endif /* NOLSTRING */ + +#if (WINVER >= 0x030a) +#ifndef NODBCS +BOOL WINAPI IsDBCSLeadByte(BYTE); +#endif /* NODBCS */ +#endif /* WINVER >= 0x030a */ + +int WINAPI LoadString(HINSTANCE, UINT, LPSTR, int); + +/****** Keyboard Driver Functions *******************************************/ + +#ifndef NOKEYBOARDINFO + +DWORD WINAPI OemKeyScan(UINT); +UINT WINAPI VkKeyScan(UINT); +int WINAPI GetKeyboardType(int); +UINT WINAPI MapVirtualKey(UINT, UINT); +int WINAPI GetKBCodePage(void); +int WINAPI GetKeyNameText(LONG, LPSTR, int); +int WINAPI ToAscii(UINT wVirtKey, UINT wScanCode, BYTE FAR* lpKeyState, DWORD FAR* lpChar, UINT wFlags); + +#endif + +#endif /* NOKERNEL */ + +/****** GDI typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HDC); + +#ifndef NOGDI + +#ifdef STRICT +typedef const void NEAR* HGDIOBJ; +#else +DECLARE_HANDLE(HGDIOBJ); +#endif + +#endif /* NOGDI */ + +DECLARE_HANDLE(HBITMAP); +DECLARE_HANDLE(HPEN); +DECLARE_HANDLE(HBRUSH); +DECLARE_HANDLE(HRGN); +DECLARE_HANDLE(HPALETTE); +DECLARE_HANDLE(HFONT); + +typedef struct tagRECT +{ + int left; + int top; + int right; + int bottom; +} RECT; +typedef RECT* PRECT; +typedef RECT NEAR* NPRECT; +typedef RECT FAR* LPRECT; + +typedef struct tagPOINT +{ + int x; + int y; +} POINT; +typedef POINT* PPOINT; +typedef POINT NEAR* NPPOINT; +typedef POINT FAR* LPPOINT; + +#if (WINVER >= 0x030a) +typedef struct tagSIZE +{ + int cx; + int cy; +} SIZE; +typedef SIZE* PSIZE; +typedef SIZE NEAR* NPSIZE; +typedef SIZE FAR* LPSIZE; +#endif /* WINVER >= 0x030a */ + +#define MAKEPOINT(l) (*((POINT FAR*)&(l))) + +#ifndef NOGDI + +/****** DC Management *******************************************************/ + +HDC WINAPI CreateDC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateIC(LPCSTR, LPCSTR, LPCSTR, const void FAR*); +HDC WINAPI CreateCompatibleDC(HDC); + +BOOL WINAPI DeleteDC(HDC); + +DWORD WINAPI GetDCOrg(HDC); + +int WINAPI SaveDC(HDC); +BOOL WINAPI RestoreDC(HDC, int); + +int WINAPI SetEnvironment(LPCSTR, const void FAR*, UINT); +int WINAPI GetEnvironment(LPCSTR, void FAR*, UINT); + +int WINAPI MulDiv(int, int, int); + +#if (WINVER >= 0x030a) +/* Drawing bounds accumulation APIs */ +UINT WINAPI SetBoundsRect(HDC hDC, const RECT FAR* lprcBounds, UINT flags); +UINT WINAPI GetBoundsRect(HDC hDC, RECT FAR* lprcBounds, UINT flags); + +#define DCB_RESET 0x0001 +#define DCB_ACCUMULATE 0x0002 +#define DCB_DIRTY DCB_ACCUMULATE +#define DCB_SET (DCB_RESET | DCB_ACCUMULATE) +#define DCB_ENABLE 0x0004 +#define DCB_DISABLE 0x0008 +#endif /* WINVER >= 0x030a */ + +/****** Device Capabilities *************************************************/ + +int WINAPI GetDeviceCaps(HDC, int); + +/* Device Parameters for GetDeviceCaps() */ +#define DRIVERVERSION 0 +#define TECHNOLOGY 2 +#define HORZSIZE 4 +#define VERTSIZE 6 +#define HORZRES 8 +#define VERTRES 10 +#define BITSPIXEL 12 +#define PLANES 14 +#define NUMBRUSHES 16 +#define NUMPENS 18 +#define NUMMARKERS 20 +#define NUMFONTS 22 +#define NUMCOLORS 24 +#define PDEVICESIZE 26 +#define CURVECAPS 28 +#define LINECAPS 30 +#define POLYGONALCAPS 32 +#define TEXTCAPS 34 +#define CLIPCAPS 36 +#define RASTERCAPS 38 +#define ASPECTX 40 +#define ASPECTY 42 +#define ASPECTXY 44 + +#define LOGPIXELSX 88 +#define LOGPIXELSY 90 + +#define SIZEPALETTE 104 +#define NUMRESERVED 106 +#define COLORRES 108 + +#ifndef NOGDICAPMASKS + +/* GetDeviceCaps() return value masks */ + +/* TECHNOLOGY */ +#define DT_PLOTTER 0 +#define DT_RASDISPLAY 1 +#define DT_RASPRINTER 2 +#define DT_RASCAMERA 3 +#define DT_CHARSTREAM 4 +#define DT_METAFILE 5 +#define DT_DISPFILE 6 + +/* CURVECAPS */ +#define CC_NONE 0x0000 +#define CC_CIRCLES 0x0001 +#define CC_PIE 0x0002 +#define CC_CHORD 0x0004 +#define CC_ELLIPSES 0x0008 +#define CC_WIDE 0x0010 +#define CC_STYLED 0x0020 +#define CC_WIDESTYLED 0x0040 +#define CC_INTERIORS 0x0080 +#define CC_ROUNDRECT 0x0100 + +/* LINECAPS */ +#define LC_NONE 0x0000 +#define LC_POLYLINE 0x0002 +#define LC_MARKER 0x0004 +#define LC_POLYMARKER 0x0008 +#define LC_WIDE 0x0010 +#define LC_STYLED 0x0020 +#define LC_WIDESTYLED 0x0040 +#define LC_INTERIORS 0x0080 + +/* POLYGONALCAPS */ +#define PC_NONE 0x0000 +#define PC_POLYGON 0x0001 +#define PC_RECTANGLE 0x0002 +#define PC_WINDPOLYGON 0x0004 +#define PC_SCANLINE 0x0008 +#define PC_WIDE 0x0010 +#define PC_STYLED 0x0020 +#define PC_WIDESTYLED 0x0040 +#define PC_INTERIORS 0x0080 + +/* TEXTCAPS */ +#define TC_OP_CHARACTER 0x0001 +#define TC_OP_STROKE 0x0002 +#define TC_CP_STROKE 0x0004 +#define TC_CR_90 0x0008 +#define TC_CR_ANY 0x0010 +#define TC_SF_X_YINDEP 0x0020 +#define TC_SA_DOUBLE 0x0040 +#define TC_SA_INTEGER 0x0080 +#define TC_SA_CONTIN 0x0100 +#define TC_EA_DOUBLE 0x0200 +#define TC_IA_ABLE 0x0400 +#define TC_UA_ABLE 0x0800 +#define TC_SO_ABLE 0x1000 +#define TC_RA_ABLE 0x2000 +#define TC_VA_ABLE 0x4000 +#define TC_RESERVED 0x8000 + +/* CLIPCAPS */ +#define CP_NONE 0x0000 +#define CP_RECTANGLE 0x0001 +#define CP_REGION 0x0002 + +/* RASTERCAPS */ +#define RC_NONE +#define RC_BITBLT 0x0001 +#define RC_BANDING 0x0002 +#define RC_SCALING 0x0004 +#define RC_BITMAP64 0x0008 +#define RC_GDI20_OUTPUT 0x0010 +#define RC_GDI20_STATE 0x0020 +#define RC_SAVEBITMAP 0x0040 +#define RC_DI_BITMAP 0x0080 +#define RC_PALETTE 0x0100 +#define RC_DIBTODEV 0x0200 +#define RC_BIGFONT 0x0400 +#define RC_STRETCHBLT 0x0800 +#define RC_FLOODFILL 0x1000 +#define RC_STRETCHDIB 0x2000 +#define RC_OP_DX_OUTPUT 0x4000 +#define RC_DEVBITS 0x8000 + +#endif /* NOGDICAPMASKS */ + +/****** Coordinate transformation support ***********************************/ + +int WINAPI SetMapMode(HDC, int); +int WINAPI GetMapMode(HDC); + +/* Map modes */ +#define MM_TEXT 1 +#define MM_LOMETRIC 2 +#define MM_HIMETRIC 3 +#define MM_LOENGLISH 4 +#define MM_HIENGLISH 5 +#define MM_TWIPS 6 +#define MM_ISOTROPIC 7 +#define MM_ANISOTROPIC 8 + +DWORD WINAPI SetWindowOrg(HDC, int, int); +DWORD WINAPI GetWindowOrg(HDC); + +DWORD WINAPI SetWindowExt(HDC, int, int); +DWORD WINAPI GetWindowExt(HDC); + +DWORD WINAPI OffsetWindowOrg(HDC, int, int); +DWORD WINAPI ScaleWindowExt(HDC, int, int, int, int); + +DWORD WINAPI SetViewportOrg(HDC, int, int); +DWORD WINAPI GetViewportOrg(HDC); + +DWORD WINAPI SetViewportExt(HDC, int, int); +DWORD WINAPI GetViewportExt(HDC); + +DWORD WINAPI OffsetViewportOrg(HDC, int, int); +DWORD WINAPI ScaleViewportExt(HDC, int, int, int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI SetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetWindowOrgEx(HDC, POINT FAR*); + +BOOL WINAPI SetWindowExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetWindowExtEx(HDC, SIZE FAR*); + +BOOL WINAPI OffsetWindowOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleWindowExtEx(HDC, int, int, int, int, SIZE FAR*); + +BOOL WINAPI SetViewportExtEx(HDC, int, int, SIZE FAR*); +BOOL WINAPI GetViewportExtEx(HDC, SIZE FAR*); + +BOOL WINAPI SetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetViewportOrgEx(HDC, POINT FAR*); + +BOOL WINAPI OffsetViewportOrgEx(HDC, int, int, POINT FAR*); +BOOL WINAPI ScaleViewportExtEx(HDC, int, int, int, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DPtoLP(HDC, POINT FAR*, int); +BOOL WINAPI LPtoDP(HDC, POINT FAR*, int); + + +/* Coordinate Modes */ +#define ABSOLUTE 1 +#define RELATIVE 2 + +/****** Color support *******************************************************/ + +typedef DWORD COLORREF; + +#define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)(g)<<8))|(((DWORD)(BYTE)(b))<<16))) + +#define GetRValue(rgb) ((BYTE)(rgb)) +#define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8)) +#define GetBValue(rgb) ((BYTE)((rgb)>>16)) + +COLORREF WINAPI GetNearestColor(HDC, COLORREF); + +#ifndef NOCOLOR + +COLORREF WINAPI GetSysColor(int); +void WINAPI SetSysColors(int, const int FAR*, const COLORREF FAR*); + +#define COLOR_SCROLLBAR 0 +#define COLOR_BACKGROUND 1 +#define COLOR_ACTIVECAPTION 2 +#define COLOR_INACTIVECAPTION 3 +#define COLOR_MENU 4 +#define COLOR_WINDOW 5 +#define COLOR_WINDOWFRAME 6 +#define COLOR_MENUTEXT 7 +#define COLOR_WINDOWTEXT 8 +#define COLOR_CAPTIONTEXT 9 +#define COLOR_ACTIVEBORDER 10 +#define COLOR_INACTIVEBORDER 11 +#define COLOR_APPWORKSPACE 12 +#define COLOR_HIGHLIGHT 13 +#define COLOR_HIGHLIGHTTEXT 14 +#define COLOR_BTNFACE 15 +#define COLOR_BTNSHADOW 16 +#define COLOR_GRAYTEXT 17 +#define COLOR_BTNTEXT 18 +#if (WINVER >= 0x030a) +#define COLOR_INACTIVECAPTIONTEXT 19 +#define COLOR_BTNHIGHLIGHT 20 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOLOR */ + +#define WM_SYSCOLORCHANGE 0x0015 + +/****** GDI Object Support **************************************************/ + +#ifndef NOGDIOBJ + +HGDIOBJ WINAPI GetStockObject(int); + +BOOL WINAPI IsGDIObject(HGDIOBJ); + +BOOL WINAPI DeleteObject(HGDIOBJ); +HGDIOBJ WINAPI SelectObject(HDC, HGDIOBJ); +int WINAPI GetObject(HGDIOBJ, int, void FAR*); +BOOL WINAPI UnrealizeObject(HGDIOBJ); + +#ifdef STRICT +typedef (CALLBACK* GOBJENUMPROC)(void FAR*, LPARAM); +#else +typedef FARPROC GOBJENUMPROC; +#endif + +#ifdef STRICT +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPARAM); +#else +int WINAPI EnumObjects(HDC, int, GOBJENUMPROC, LPSTR); +#endif + +/* Object types for EnumObjects() */ +#define OBJ_PEN 1 +#define OBJ_BRUSH 2 + +/****** Pen support *********************************************************/ + +/* Logical Pen */ +typedef struct tagLOGPEN +{ + UINT lopnStyle; + POINT lopnWidth; + COLORREF lopnColor; +} LOGPEN; +typedef LOGPEN* PLOGPEN; +typedef LOGPEN NEAR* NPLOGPEN; +typedef LOGPEN FAR* LPLOGPEN; + +/* Pen Styles */ +#define PS_SOLID 0 +#define PS_DASH 1 +#define PS_DOT 2 +#define PS_DASHDOT 3 +#define PS_DASHDOTDOT 4 +#define PS_NULL 5 +#define PS_INSIDEFRAME 6 + +HPEN WINAPI CreatePen(int, int, COLORREF); +HPEN WINAPI CreatePenIndirect(LOGPEN FAR*); + +/* Stock pens for use with GetStockObject(); */ +#define WHITE_PEN 6 +#define BLACK_PEN 7 +#define NULL_PEN 8 + +/****** Brush support *******************************************************/ + +/* Brush Styles */ +#define BS_SOLID 0 +#define BS_NULL 1 +#define BS_HOLLOW BS_NULL +#define BS_HATCHED 2 +#define BS_PATTERN 3 +#define BS_INDEXED 4 +#define BS_DIBPATTERN 5 + +/* Hatch Styles */ +#define HS_HORIZONTAL 0 +#define HS_VERTICAL 1 +#define HS_FDIAGONAL 2 +#define HS_BDIAGONAL 3 +#define HS_CROSS 4 +#define HS_DIAGCROSS 5 + +/* Logical Brush (or Pattern) */ +typedef struct tagLOGBRUSH +{ + UINT lbStyle; + COLORREF lbColor; + int lbHatch; +} LOGBRUSH; +typedef LOGBRUSH* PLOGBRUSH; +typedef LOGBRUSH NEAR* NPLOGBRUSH; +typedef LOGBRUSH FAR* LPLOGBRUSH; + +typedef LOGBRUSH PATTERN; +typedef PATTERN* PPATTERN; +typedef PATTERN NEAR* NPPATTERN; +typedef PATTERN FAR* LPPATTERN; + +HBRUSH WINAPI CreateSolidBrush(COLORREF); +HBRUSH WINAPI CreateHatchBrush(int, COLORREF); +HBRUSH WINAPI CreatePatternBrush(HBITMAP); +HBRUSH WINAPI CreateDIBPatternBrush(HGLOBAL, UINT); +HBRUSH WINAPI CreateBrushIndirect(LOGBRUSH FAR*); + +/* Stock brushes for use with GetStockObject() */ +#define WHITE_BRUSH 0 +#define LTGRAY_BRUSH 1 +#define GRAY_BRUSH 2 +#define DKGRAY_BRUSH 3 +#define BLACK_BRUSH 4 +#define NULL_BRUSH 5 +#define HOLLOW_BRUSH NULL_BRUSH + +DWORD WINAPI SetBrushOrg(HDC, int, int); +DWORD WINAPI GetBrushOrg(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetBrushOrgEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +/****** Region support ******************************************************/ + +HRGN WINAPI CreateRectRgn(int, int, int, int); +HRGN WINAPI CreateRectRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgnIndirect(const RECT FAR*); +HRGN WINAPI CreateEllipticRgn(int, int, int, int); +HRGN WINAPI CreatePolygonRgn(const POINT FAR*, int, int); +HRGN WINAPI CreatePolyPolygonRgn(const POINT FAR*, const int FAR*, int, int); +HRGN WINAPI CreateRoundRectRgn(int, int, int, int, int, int); + +/* Region type flags */ +#define ERROR 0 +#define NULLREGION 1 +#define SIMPLEREGION 2 +#define COMPLEXREGION 3 + +void WINAPI SetRectRgn(HRGN, int, int, int, int); + +int WINAPI CombineRgn(HRGN, HRGN, HRGN, int); + +/* CombineRgn() command values */ +#define RGN_AND 1 +#define RGN_OR 2 +#define RGN_XOR 3 +#define RGN_DIFF 4 +#define RGN_COPY 5 + +BOOL WINAPI EqualRgn(HRGN, HRGN); +int WINAPI OffsetRgn(HRGN, int, int); + +int WINAPI GetRgnBox(HRGN, RECT FAR*); + +BOOL WINAPI RectInRegion(HRGN, const RECT FAR*); +BOOL WINAPI PtInRegion(HRGN, int, int); + +/****** Color palette Support ************************************************/ + +#define PALETTERGB(r,g,b) (0x02000000L | RGB(r,g,b)) +#define PALETTEINDEX(i) ((COLORREF)(0x01000000L | (DWORD)(WORD)(i))) + +typedef struct tagPALETTEENTRY +{ + BYTE peRed; + BYTE peGreen; + BYTE peBlue; + BYTE peFlags; +} PALETTEENTRY; +typedef PALETTEENTRY FAR* LPPALETTEENTRY; + +/* Palette entry flags */ +#define PC_RESERVED 0x01 /* palette index used for animation */ +#define PC_EXPLICIT 0x02 /* palette index is explicit to device */ +#define PC_NOCOLLAPSE 0x04 /* do not match color to system palette */ + +/* Logical Palette */ +typedef struct tagLOGPALETTE +{ + WORD palVersion; + WORD palNumEntries; + PALETTEENTRY palPalEntry[1]; +} LOGPALETTE; +typedef LOGPALETTE* PLOGPALETTE; +typedef LOGPALETTE NEAR* NPLOGPALETTE; +typedef LOGPALETTE FAR* LPLOGPALETTE; + +HPALETTE WINAPI CreatePalette(const LOGPALETTE FAR*); + +HPALETTE WINAPI SelectPalette(HDC, HPALETTE, BOOL); + +UINT WINAPI RealizePalette(HDC); + +int WINAPI UpdateColors(HDC); +void WINAPI AnimatePalette(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); + +UINT WINAPI SetPaletteEntries(HPALETTE, UINT, UINT, const PALETTEENTRY FAR*); +UINT WINAPI GetPaletteEntries(HPALETTE, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetNearestPaletteIndex(HPALETTE, COLORREF); + +BOOL WINAPI ResizePalette(HPALETTE, UINT); + +UINT WINAPI GetSystemPaletteEntries(HDC, UINT, UINT, PALETTEENTRY FAR*); + +UINT WINAPI GetSystemPaletteUse(HDC); +UINT WINAPI SetSystemPaletteUse(HDC, UINT); + +/* Get/SetSystemPaletteUse() values */ +#define SYSPAL_STATIC 1 +#define SYSPAL_NOSTATIC 2 + +/* Palette window messages */ +#define WM_QUERYNEWPALETTE 0x030F +#define WM_PALETTEISCHANGING 0x0310 +#define WM_PALETTECHANGED 0x0311 + +/****** Clipping support *****************************************************/ + +int WINAPI SelectClipRgn(HDC, HRGN); +int WINAPI GetClipBox(HDC, RECT FAR*); + +int WINAPI IntersectClipRect(HDC, int, int, int, int); +int WINAPI OffsetClipRgn(HDC, int, int); +int WINAPI ExcludeClipRect(HDC, int, int, int, int); + +BOOL WINAPI PtVisible(HDC, int, int); +BOOL WINAPI RectVisible(HDC, const RECT FAR*); + + +/****** General drawing support ********************************************/ + +DWORD WINAPI MoveTo(HDC, int, int); +DWORD WINAPI GetCurrentPosition(HDC); + +#if (WINVER >= 0x030a) +BOOL WINAPI MoveToEx(HDC, int, int, POINT FAR*); +BOOL WINAPI GetCurrentPositionEx(HDC, POINT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI LineTo(HDC, int, int); +BOOL WINAPI Polyline(HDC, const POINT FAR*, int); + +#ifdef STRICT +typedef void (CALLBACK* LINEDDAPROC)(int, int, LPARAM); +#else +typedef FARPROC LINEDDAPROC; +#endif + +void WINAPI LineDDA(int, int, int, int, LINEDDAPROC, LPARAM); + +BOOL WINAPI Rectangle(HDC, int, int, int, int); +BOOL WINAPI RoundRect(HDC, int, int, int, int, int, int); + +BOOL WINAPI Ellipse(HDC, int, int, int, int); +BOOL WINAPI Arc(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Chord(HDC, int, int, int, int, int, int, int, int); +BOOL WINAPI Pie(HDC, int, int, int, int, int, int, int, int); + +BOOL WINAPI Polygon(HDC, const POINT FAR*, int); +BOOL WINAPI PolyPolygon(HDC, const POINT FAR*, int FAR*, int); + +/* PolyFill Modes */ +#define ALTERNATE 1 +#define WINDING 2 + +int WINAPI SetPolyFillMode(HDC, int); +int WINAPI GetPolyFillMode(HDC); + +BOOL WINAPI FloodFill(HDC, int, int, COLORREF); +BOOL WINAPI ExtFloodFill(HDC, int, int, COLORREF, UINT); + +/* ExtFloodFill style flags */ +#define FLOODFILLBORDER 0 +#define FLOODFILLSURFACE 1 + +BOOL WINAPI FillRgn(HDC, HRGN, HBRUSH); +BOOL WINAPI FrameRgn(HDC, HRGN, HBRUSH, int, int); +BOOL WINAPI InvertRgn(HDC, HRGN); +BOOL WINAPI PaintRgn(HDC, HRGN); + +/* Rectangle output routines */ +int WINAPI FillRect(HDC, const RECT FAR*, HBRUSH); +int WINAPI FrameRect(HDC, const RECT FAR*, HBRUSH); +void WINAPI InvertRect(HDC, const RECT FAR*); + +void WINAPI DrawFocusRect(HDC, const RECT FAR*); + + +/****** Text support ********************************************************/ + +BOOL WINAPI TextOut(HDC, int, int, LPCSTR, int); +LONG WINAPI TabbedTextOut(HDC, int, int, LPCSTR, int, int, int FAR*, int); +BOOL WINAPI ExtTextOut(HDC, int, int, UINT, const RECT FAR*, LPCSTR, UINT, int FAR*); + +#define ETO_GRAYED 0x0001 +#define ETO_OPAQUE 0x0002 +#define ETO_CLIPPED 0x0004 + +DWORD WINAPI GetTextExtent(HDC, LPCSTR, int); +DWORD WINAPI GetTabbedTextExtent(HDC, LPCSTR, int, int, int FAR*); + +#if (WINVER >= 0x030a) +BOOL WINAPI GetTextExtentPoint(HDC, LPCSTR, int, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +/* DrawText() Format Flags */ +#ifndef NODRAWTEXT +#define DT_TOP 0x0000 +#define DT_LEFT 0x0000 +#define DT_CENTER 0x0001 +#define DT_RIGHT 0x0002 +#define DT_VCENTER 0x0004 +#define DT_BOTTOM 0x0008 +#define DT_WORDBREAK 0x0010 +#define DT_SINGLELINE 0x0020 +#define DT_EXPANDTABS 0x0040 +#define DT_TABSTOP 0x0080 +#define DT_NOCLIP 0x0100 +#define DT_EXTERNALLEADING 0x0200 +#define DT_CALCRECT 0x0400 +#define DT_NOPREFIX 0x0800 +#define DT_INTERNAL 0x1000 + +int WINAPI DrawText(HDC, LPCSTR, int, RECT FAR*, UINT); +#endif /* NODRAWTEXT */ + +#ifdef STRICT +typedef BOOL (CALLBACK* GRAYSTRINGPROC)(HDC, LPARAM, int); +#else +typedef FARPROC GRAYSTRINGPROC; +#endif + +BOOL WINAPI GrayString(HDC, HBRUSH, GRAYSTRINGPROC, LPARAM, int, int, int, int, int); + +BOOL WINAPI GetCharWidth(HDC, UINT, UINT, int FAR*); + +COLORREF WINAPI SetTextColor(HDC, COLORREF); +COLORREF WINAPI GetTextColor(HDC); + +COLORREF WINAPI SetBkColor(HDC, COLORREF); +COLORREF WINAPI GetBkColor(HDC); + +int WINAPI SetBkMode(HDC, int); +int WINAPI GetBkMode(HDC); + +/* Background Modes */ +#define TRANSPARENT 1 +#define OPAQUE 2 + +UINT WINAPI SetTextAlign(HDC, UINT); +UINT WINAPI GetTextAlign(HDC); + +/* Text Alignment Options */ +#define TA_NOUPDATECP 0x0000 +#define TA_UPDATECP 0x0001 +#define TA_LEFT 0x0000 +#define TA_RIGHT 0x0002 +#define TA_CENTER 0x0006 +#define TA_TOP 0x0000 +#define TA_BOTTOM 0x0008 +#define TA_BASELINE 0x0018 + +int WINAPI SetTextCharacterExtra(HDC, int); +int WINAPI GetTextCharacterExtra(HDC); + +int WINAPI SetTextJustification(HDC, int, int); + +/****** Font support ********************************************************/ + +#ifndef NOGDIOBJ +/* Logical Font */ +#define LF_FACESIZE 32 +typedef struct tagLOGFONT +{ + int lfHeight; + int lfWidth; + int lfEscapement; + int lfOrientation; + int lfWeight; + BYTE lfItalic; + BYTE lfUnderline; + BYTE lfStrikeOut; + BYTE lfCharSet; + BYTE lfOutPrecision; + BYTE lfClipPrecision; + BYTE lfQuality; + BYTE lfPitchAndFamily; + char lfFaceName[LF_FACESIZE]; +} LOGFONT; +typedef LOGFONT* PLOGFONT; +typedef LOGFONT NEAR* NPLOGFONT; +typedef LOGFONT FAR* LPLOGFONT; + +/* weight values */ +#define FW_DONTCARE 0 +#define FW_THIN 100 +#define FW_EXTRALIGHT 200 +#define FW_LIGHT 300 +#define FW_NORMAL 400 +#define FW_MEDIUM 500 +#define FW_SEMIBOLD 600 +#define FW_BOLD 700 +#define FW_EXTRABOLD 800 +#define FW_HEAVY 900 + +#define FW_ULTRALIGHT FW_EXTRALIGHT +#define FW_REGULAR FW_NORMAL +#define FW_DEMIBOLD FW_SEMIBOLD +#define FW_ULTRABOLD FW_EXTRABOLD +#define FW_BLACK FW_HEAVY + +/* CharSet values */ +#define ANSI_CHARSET 0 +#define DEFAULT_CHARSET 1 +#define SYMBOL_CHARSET 2 +#define SHIFTJIS_CHARSET 128 +#define HANGEUL_CHARSET 129 +#define CHINESEBIG5_CHARSET 136 +#define OEM_CHARSET 255 + +/* OutPrecision values */ +#define OUT_DEFAULT_PRECIS 0 +#define OUT_STRING_PRECIS 1 +#define OUT_CHARACTER_PRECIS 2 +#define OUT_STROKE_PRECIS 3 +#if (WINVER >= 0x030a) +#define OUT_TT_PRECIS 4 +#define OUT_DEVICE_PRECIS 5 +#define OUT_RASTER_PRECIS 6 +#define OUT_TT_ONLY_PRECIS 7 +#endif /* WINVER >= 0x030a */ + +/* ClipPrecision values */ +#define CLIP_DEFAULT_PRECIS 0x00 +#define CLIP_CHARACTER_PRECIS 0x01 +#define CLIP_STROKE_PRECIS 0x02 +#define CLIP_MASK 0x0F +#if (WINVER >= 0x030a) +#define CLIP_LH_ANGLES 0x10 +#define CLIP_TT_ALWAYS 0x20 +#define CLIP_EMBEDDED 0x80 +#endif /* WINVER >= 0x030a */ + +/* Quality values */ +#define DEFAULT_QUALITY 0 +#define DRAFT_QUALITY 1 +#define PROOF_QUALITY 2 + +/* PitchAndFamily pitch values (low 4 bits) */ +#define DEFAULT_PITCH 0x00 +#define FIXED_PITCH 0x01 +#define VARIABLE_PITCH 0x02 + +/* PitchAndFamily family values (high 4 bits) */ +#define FF_DONTCARE 0x00 +#define FF_ROMAN 0x10 +#define FF_SWISS 0x20 +#define FF_MODERN 0x30 +#define FF_SCRIPT 0x40 +#define FF_DECORATIVE 0x50 + +HFONT WINAPI CreateFont(int, int, int, int, int, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, BYTE, LPCSTR); +HFONT WINAPI CreateFontIndirect(const LOGFONT FAR*); + +/* Stock fonts for use with GetStockObject() */ +#define OEM_FIXED_FONT 10 +#define ANSI_FIXED_FONT 11 +#define ANSI_VAR_FONT 12 +#define SYSTEM_FONT 13 +#define DEVICE_DEFAULT_FONT 14 +#define DEFAULT_PALETTE 15 +#define SYSTEM_FIXED_FONT 16 + + +DWORD WINAPI SetMapperFlags(HDC, DWORD); +#define ASPECT_FILTERING 0x00000001L + +int WINAPI AddFontResource(LPCSTR); +BOOL WINAPI RemoveFontResource(LPCSTR); + +#define WM_FONTCHANGE 0x001D + +int WINAPI GetTextFace(HDC, int, LPSTR); + +DWORD WINAPI GetAspectRatioFilter(HDC); +#if (WINVER >= 0x030a) +BOOL WINAPI GetAspectRatioFilterEx(HDC, SIZE FAR*); +#endif /* WINVER >= 0x030a */ + +#endif /* NOGDIOBJ */ + +#ifndef NOTEXTMETRIC + +typedef struct tagTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; +} TEXTMETRIC; +typedef TEXTMETRIC* PTEXTMETRIC; +typedef TEXTMETRIC NEAR* NPTEXTMETRIC; +typedef TEXTMETRIC FAR* LPTEXTMETRIC; + +/* tmPitchAndFamily values */ +#define TMPF_FIXED_PITCH 0x01 +#define TMPF_VECTOR 0x02 +#define TMPF_DEVICE 0x08 +#if (WINVER >= 0x030a) +#define TMPF_TRUETYPE 0x04 +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetTextMetrics(HDC, TEXTMETRIC FAR*); + +#if (WINVER >= 0x030a) +#ifndef NOSCALABLEFONT + +typedef struct tagPANOSE +{ + BYTE bFamilyType; + BYTE bSerifStyle; + BYTE bWeight; + BYTE bProportion; + BYTE bContrast; + BYTE bStrokeVariation; + BYTE bArmStyle; + BYTE bLetterform; + BYTE bMidline; + BYTE bXHeight; +} PANOSE, FAR* LPPANOSE; + +typedef struct tagOUTLINETEXTMETRIC +{ + UINT otmSize; + TEXTMETRIC otmTextMetrics; + BYTE otmFiller; + PANOSE otmPanoseNumber; + UINT otmfsSelection; + UINT otmfsType; + int otmsCharSlopeRise; + int otmsCharSlopeRun; + int otmItalicAngle; + UINT otmEMSquare; + int otmAscent; + int otmDescent; + UINT otmLineGap; + UINT otmsCapEmHeight; + UINT otmsXHeight; + RECT otmrcFontBox; + int otmMacAscent; + int otmMacDescent; + UINT otmMacLineGap; + UINT otmusMinimumPPEM; + POINT otmptSubscriptSize; + POINT otmptSubscriptOffset; + POINT otmptSuperscriptSize; + POINT otmptSuperscriptOffset; + UINT otmsStrikeoutSize; + int otmsStrikeoutPosition; + int otmsUnderscorePosition; + int otmsUnderscoreSize; + PSTR otmpFamilyName; + PSTR otmpFaceName; + PSTR otmpStyleName; + PSTR otmpFullName; +} OUTLINETEXTMETRIC, FAR* LPOUTLINETEXTMETRIC; + +WORD WINAPI GetOutlineTextMetrics(HDC, UINT, OUTLINETEXTMETRIC FAR*); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +#ifndef NOGDIOBJ +#if (WINVER >= 0x030a) + +/* Structure passed to FONTENUMPROC */ +/* NOTE: NEWTEXTMETRIC is the same as TEXTMETRIC plus 4 new fields */ +typedef struct tagNEWTEXTMETRIC +{ + int tmHeight; + int tmAscent; + int tmDescent; + int tmInternalLeading; + int tmExternalLeading; + int tmAveCharWidth; + int tmMaxCharWidth; + int tmWeight; + BYTE tmItalic; + BYTE tmUnderlined; + BYTE tmStruckOut; + BYTE tmFirstChar; + BYTE tmLastChar; + BYTE tmDefaultChar; + BYTE tmBreakChar; + BYTE tmPitchAndFamily; + BYTE tmCharSet; + int tmOverhang; + int tmDigitizedAspectX; + int tmDigitizedAspectY; + DWORD ntmFlags; + UINT ntmSizeEM; + UINT ntmCellHeight; + UINT ntmAvgWidth; +} NEWTEXTMETRIC; +typedef NEWTEXTMETRIC* PNEWTEXTMETRIC; +typedef NEWTEXTMETRIC NEAR* NPNEWTEXTMETRIC; +typedef NEWTEXTMETRIC FAR* LPNEWTEXTMETRIC; + +/* ntmFlags field flags */ +#define NTM_REGULAR 0x00000040L +#define NTM_BOLD 0x00000020L +#define NTM_ITALIC 0x00000001L + +#define LF_FULLFACESIZE 64 + +/* Structure passed to FONTENUMPROC */ +typedef struct tagENUMLOGFONT +{ + LOGFONT elfLogFont; + char elfFullName[LF_FULLFACESIZE]; + char elfStyle[LF_FACESIZE]; +} ENUMLOGFONT, FAR* LPENUMLOGFONT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOGDIOBJ */ + +#ifdef STRICT +#ifndef NOGDIOBJ + +typedef int (CALLBACK* OLDFONTENUMPROC)(const LOGFONT FAR*, const TEXTMETRIC FAR*, int, LPARAM); + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* FONTENUMPROC)(const ENUMLOGFONT FAR*, const NEWTEXTMETRIC FAR*, int, LPARAM); + +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPARAM); + +#else /* WINVER >= 0x030a */ +typedef OLDFONTENUMPROC FONTENUMPROC; +#endif /* WINVER >= 0x030a) */ + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPARAM); +#endif /* NOGDIOBJ */ + +#else /* STRICT */ + +typedef FARPROC OLDFONTENUMPROC; +typedef FARPROC FONTENUMPROC; + +int WINAPI EnumFonts(HDC, LPCSTR, OLDFONTENUMPROC, LPSTR); + +#if (WINVER >= 0x030a) +int WINAPI EnumFontFamilies(HDC, LPCSTR, FONTENUMPROC, LPSTR); +#endif /* WINVER >= 0x030a */ + +#endif /* !STRICT */ + +/* EnumFonts font type values */ +#define RASTER_FONTTYPE 0x0001 +#define DEVICE_FONTTYPE 0X0002 +#if (WINVER >= 0x030a) +#define TRUETYPE_FONTTYPE 0x0004 +#endif /* WINVER >= 0x030a */ + +#endif /* NOTEXTMETRIC */ + +#ifndef NOSCALABLEFONT +#if (WINVER >= 0x030a) + +DWORD WINAPI GetFontData(HDC, DWORD, DWORD, void FAR*, DWORD); +BOOL WINAPI CreateScalableFontResource(UINT, LPCSTR, LPCSTR, LPCSTR); + +typedef struct tagGLYPHMETRICS +{ + UINT gmBlackBoxX; + UINT gmBlackBoxY; + POINT gmptGlyphOrigin; + int gmCellIncX; + int gmCellIncY; +} GLYPHMETRICS, FAR* LPGLYPHMETRICS; + +typedef struct tagFIXED +{ + UINT fract; + int value; +} FIXED, FAR* LPFIXED; + +typedef struct tagMAT2 +{ + FIXED eM11; + FIXED eM12; + FIXED eM21; + FIXED eM22; +} MAT2, FAR* LPMAT2; + +DWORD WINAPI GetGlyphOutline(HDC, UINT, UINT, GLYPHMETRICS FAR*, DWORD, void FAR*, const MAT2 FAR*); + +/* GetGlyphOutline constants */ +#define GGO_METRICS 0 +#define GGO_BITMAP 1 +#define GGO_NATIVE 2 + +#define TT_POLYGON_TYPE 24 + +#define TT_PRIM_LINE 1 +#define TT_PRIM_QSPLINE 2 + +typedef struct tagPOINTFX +{ + FIXED x; + FIXED y; +} POINTFX, FAR* LPPOINTFX; + +typedef struct tagTTPOLYCURVE +{ + UINT wType; + UINT cpfx; + POINTFX apfx[1]; +} TTPOLYCURVE, FAR* LPTTPOLYCURVE; + +typedef struct tagTTPOLYGONHEADER +{ + DWORD cb; + DWORD dwType; + POINTFX pfxStart; +} TTPOLYGONHEADER, FAR* LPTTPOLYGONHEADER; + +typedef struct tagABC +{ + int abcA; + UINT abcB; + int abcC; +} ABC; +typedef ABC FAR* LPABC; + +BOOL WINAPI GetCharABCWidths(HDC, UINT, UINT, ABC FAR*); + +typedef struct tagKERNINGPAIR +{ + WORD wFirst; + WORD wSecond; + int iKernAmount; +} KERNINGPAIR, FAR* LPKERNINGPAIR; + +int WINAPI GetKerningPairs(HDC, int, KERNINGPAIR FAR*); + +typedef struct tagRASTERIZER_STATUS +{ + int nSize; + int wFlags; + int nLanguageID; +} RASTERIZER_STATUS; +typedef RASTERIZER_STATUS FAR* LPRASTERIZER_STATUS; + +/* bits defined in wFlags of RASTERIZER_STATUS */ +#define TT_AVAILABLE 0x0001 +#define TT_ENABLED 0x0002 + +BOOL WINAPI GetRasterizerCaps(RASTERIZER_STATUS FAR*, int); + +#endif /* WINVER >= 0x030a */ +#endif /* NOSCALABLEFONT */ + +/****** Bitmap support ******************************************************/ + +#ifndef NOBITMAP +typedef struct tagBITMAP +{ + int bmType; + int bmWidth; + int bmHeight; + int bmWidthBytes; + BYTE bmPlanes; + BYTE bmBitsPixel; + void FAR* bmBits; +} BITMAP; +typedef BITMAP* PBITMAP; +typedef BITMAP NEAR* NPBITMAP; +typedef BITMAP FAR* LPBITMAP; + +/* Bitmap Header structures */ +typedef struct tagRGBTRIPLE +{ + BYTE rgbtBlue; + BYTE rgbtGreen; + BYTE rgbtRed; +} RGBTRIPLE; +typedef RGBTRIPLE FAR* LPRGBTRIPLE; + +typedef struct tagRGBQUAD +{ + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} RGBQUAD; +typedef RGBQUAD FAR* LPRGBQUAD; + +/* structures for defining DIBs */ +typedef struct tagBITMAPCOREHEADER +{ + DWORD bcSize; + short bcWidth; + short bcHeight; + WORD bcPlanes; + WORD bcBitCount; +} BITMAPCOREHEADER; +typedef BITMAPCOREHEADER* PBITMAPCOREHEADER; +typedef BITMAPCOREHEADER FAR* LPBITMAPCOREHEADER; + +typedef struct tagBITMAPINFOHEADER +{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} BITMAPINFOHEADER; +typedef BITMAPINFOHEADER* PBITMAPINFOHEADER; +typedef BITMAPINFOHEADER FAR* LPBITMAPINFOHEADER; + +/* constants for the biCompression field */ +#define BI_RGB 0L +#define BI_RLE8 1L +#define BI_RLE4 2L + +typedef struct tagBITMAPINFO +{ + BITMAPINFOHEADER bmiHeader; + RGBQUAD bmiColors[1]; +} BITMAPINFO; +typedef BITMAPINFO* PBITMAPINFO; +typedef BITMAPINFO FAR* LPBITMAPINFO; + +typedef struct tagBITMAPCOREINFO +{ + BITMAPCOREHEADER bmciHeader; + RGBTRIPLE bmciColors[1]; +} BITMAPCOREINFO; +typedef BITMAPCOREINFO* PBITMAPCOREINFO; +typedef BITMAPCOREINFO FAR* LPBITMAPCOREINFO; + +typedef struct tagBITMAPFILEHEADER +{ + UINT bfType; + DWORD bfSize; + UINT bfReserved1; + UINT bfReserved2; + DWORD bfOffBits; +} BITMAPFILEHEADER; +typedef BITMAPFILEHEADER* PBITMAPFILEHEADER; +typedef BITMAPFILEHEADER FAR* LPBITMAPFILEHEADER; + + +HBITMAP WINAPI CreateBitmap(int, int, UINT, UINT, const void FAR*); +HBITMAP WINAPI CreateBitmapIndirect(BITMAP FAR* ); +HBITMAP WINAPI CreateCompatibleBitmap(HDC, int, int); +HBITMAP WINAPI CreateDiscardableBitmap(HDC, int, int); +HBITMAP WINAPI CreateDIBitmap(HDC, BITMAPINFOHEADER FAR*, DWORD, const void FAR*, BITMAPINFO FAR*, UINT); + +HBITMAP WINAPI LoadBitmap(HINSTANCE, LPCSTR); + +/* DIB color table identifiers */ +#define DIB_RGB_COLORS 0 +#define DIB_PAL_COLORS 1 + +/* constants for CreateDIBitmap */ +#define CBM_INIT 0x00000004L +#endif /* NOBITMAP */ + +#ifndef NORASTEROPS + +/* Binary raster ops */ +#define R2_BLACK 1 +#define R2_NOTMERGEPEN 2 +#define R2_MASKNOTPEN 3 +#define R2_NOTCOPYPEN 4 +#define R2_MASKPENNOT 5 +#define R2_NOT 6 +#define R2_XORPEN 7 +#define R2_NOTMASKPEN 8 +#define R2_MASKPEN 9 +#define R2_NOTXORPEN 10 +#define R2_NOP 11 +#define R2_MERGENOTPEN 12 +#define R2_COPYPEN 13 +#define R2_MERGEPENNOT 14 +#define R2_MERGEPEN 15 +#define R2_WHITE 16 + +/* Ternary raster operations */ +#define SRCCOPY 0x00CC0020L +#define SRCPAINT 0x00EE0086L +#define SRCAND 0x008800C6L +#define SRCINVERT 0x00660046L +#define SRCERASE 0x00440328L +#define NOTSRCCOPY 0x00330008L +#define NOTSRCERASE 0x001100A6L +#define MERGECOPY 0x00C000CAL +#define MERGEPAINT 0x00BB0226L +#define PATCOPY 0x00F00021L +#define PATPAINT 0x00FB0A09L +#define PATINVERT 0x005A0049L +#define DSTINVERT 0x00550009L +#define BLACKNESS 0x00000042L +#define WHITENESS 0x00FF0062L + +#endif /* NORASTEROPS */ + +#ifndef NOBITMAP +BOOL WINAPI BitBlt(HDC, int, int, int, int, HDC, int, int, DWORD); + +BOOL WINAPI PatBlt(HDC, int, int, int, int, DWORD); + +BOOL WINAPI StretchBlt(HDC, int, int, int, int, HDC, int, int, int, int, DWORD); +int WINAPI StretchDIBits(HDC, int, int, int, int, int, + int, int, int, const void FAR*, LPBITMAPINFO, UINT, DWORD); + +COLORREF WINAPI SetPixel(HDC, int, int, COLORREF); +COLORREF WINAPI GetPixel(HDC, int, int); + +/* StretchBlt() Modes */ +#define BLACKONWHITE 1 +#define WHITEONBLACK 2 +#define COLORONCOLOR 3 + +/* new StretchBlt() Modes (simpler names) */ +#define STRETCH_ANDSCANS 1 +#define STRETCH_ORSCANS 2 +#define STRETCH_DELETESCANS 3 + +int WINAPI SetStretchBltMode(HDC, int); +int WINAPI GetStretchBltMode(HDC); + +DWORD WINAPI SetBitmapDimension(HBITMAP, int, int); +DWORD WINAPI GetBitmapDimension(HBITMAP); +#if (WINVER >= 0x030a) +BOOL WINAPI SetBitmapDimensionEx(HBITMAP, int, int, SIZE FAR*); +BOOL WINAPI GetBitmapDimensionEx(HBITMAP, SIZE FAR*); +#endif /* WINVER >= 0x030a */ +int WINAPI SetROP2(HDC, int); +int WINAPI GetROP2(HDC); + +LONG WINAPI SetBitmapBits(HBITMAP, DWORD, const void FAR*); +LONG WINAPI GetBitmapBits(HBITMAP, LONG, void FAR*); + +int WINAPI SetDIBits(HDC, HBITMAP, UINT, UINT, const void FAR*, BITMAPINFO FAR*, UINT); +int WINAPI GetDIBits(HDC, HBITMAP, UINT, UINT, void FAR*, BITMAPINFO FAR*, UINT); + +int WINAPI SetDIBitsToDevice(HDC, int, int, int, int, int, int, UINT, UINT, + void FAR*, BITMAPINFO FAR*, UINT); +#endif /* NOBITMAP */ + +/****** Metafile support ****************************************************/ + +#ifndef NOMETAFILE + +DECLARE_HANDLE(HMETAFILE); + +HDC WINAPI CreateMetaFile(LPCSTR); +HMETAFILE WINAPI CloseMetaFile(HDC); + +HMETAFILE WINAPI GetMetaFile(LPCSTR); +BOOL WINAPI DeleteMetaFile(HMETAFILE); +HMETAFILE WINAPI CopyMetaFile(HMETAFILE, LPCSTR); + +BOOL WINAPI PlayMetaFile(HDC, HMETAFILE); + +HGLOBAL WINAPI GetMetaFileBits(HMETAFILE); +HMETAFILE WINAPI SetMetaFileBits(HGLOBAL); +#if (WINVER >= 0x030a) +HMETAFILE WINAPI SetMetaFileBitsBetter(HGLOBAL); +#endif /* WINVER >= 0x030a */ + +/* Clipboard Metafile Picture Structure */ +typedef struct tagMETAFILEPICT +{ + int mm; + int xExt; + int yExt; + HMETAFILE hMF; +} METAFILEPICT; +typedef METAFILEPICT FAR* LPMETAFILEPICT; + +typedef struct tagMETAHEADER +{ + UINT mtType; + UINT mtHeaderSize; + UINT mtVersion; + DWORD mtSize; + UINT mtNoObjects; + DWORD mtMaxRecord; + UINT mtNoParameters; +} METAHEADER; + +typedef struct tagHANDLETABLE +{ + HGDIOBJ objectHandle[1]; +} HANDLETABLE; +typedef HANDLETABLE* PHANDLETABLE; +typedef HANDLETABLE FAR* LPHANDLETABLE; + +typedef struct tagMETARECORD +{ + DWORD rdSize; + UINT rdFunction; + UINT rdParm[1]; +} METARECORD; +typedef METARECORD* PMETARECORD; +typedef METARECORD FAR* LPMETARECORD; + +/* Metafile Functions */ +#define META_SETBKCOLOR 0x0201 +#define META_SETBKMODE 0x0102 +#define META_SETMAPMODE 0x0103 +#define META_SETROP2 0x0104 +#define META_SETRELABS 0x0105 +#define META_SETPOLYFILLMODE 0x0106 +#define META_SETSTRETCHBLTMODE 0x0107 +#define META_SETTEXTCHAREXTRA 0x0108 +#define META_SETTEXTCOLOR 0x0209 +#define META_SETTEXTJUSTIFICATION 0x020A +#define META_SETWINDOWORG 0x020B +#define META_SETWINDOWEXT 0x020C +#define META_SETVIEWPORTORG 0x020D +#define META_SETVIEWPORTEXT 0x020E +#define META_OFFSETWINDOWORG 0x020F +#define META_SCALEWINDOWEXT 0x0410 +#define META_OFFSETVIEWPORTORG 0x0211 +#define META_SCALEVIEWPORTEXT 0x0412 +#define META_LINETO 0x0213 +#define META_MOVETO 0x0214 +#define META_EXCLUDECLIPRECT 0x0415 +#define META_INTERSECTCLIPRECT 0x0416 +#define META_ARC 0x0817 +#define META_ELLIPSE 0x0418 +#define META_FLOODFILL 0x0419 +#define META_PIE 0x081A +#define META_RECTANGLE 0x041B +#define META_ROUNDRECT 0x061C +#define META_PATBLT 0x061D +#define META_SAVEDC 0x001E +#define META_SETPIXEL 0x041F +#define META_OFFSETCLIPRGN 0x0220 +#define META_TEXTOUT 0x0521 +#define META_BITBLT 0x0922 +#define META_STRETCHBLT 0x0B23 +#define META_POLYGON 0x0324 +#define META_POLYLINE 0x0325 +#define META_ESCAPE 0x0626 +#define META_RESTOREDC 0x0127 +#define META_FILLREGION 0x0228 +#define META_FRAMEREGION 0x0429 +#define META_INVERTREGION 0x012A +#define META_PAINTREGION 0x012B +#define META_SELECTCLIPREGION 0x012C +#define META_SELECTOBJECT 0x012D +#define META_SETTEXTALIGN 0x012E +#define META_DRAWTEXT 0x062F + +#define META_CHORD 0x0830 +#define META_SETMAPPERFLAGS 0x0231 +#define META_EXTTEXTOUT 0x0a32 +#define META_SETDIBTODEV 0x0d33 +#define META_SELECTPALETTE 0x0234 +#define META_REALIZEPALETTE 0x0035 +#define META_ANIMATEPALETTE 0x0436 +#define META_SETPALENTRIES 0x0037 +#define META_POLYPOLYGON 0x0538 +#define META_RESIZEPALETTE 0x0139 + +#define META_DIBBITBLT 0x0940 +#define META_DIBSTRETCHBLT 0x0b41 +#define META_DIBCREATEPATTERNBRUSH 0x0142 +#define META_STRETCHDIB 0x0f43 + +#define META_EXTFLOODFILL 0x0548 + +#define META_RESETDC 0x014C +#define META_STARTDOC 0x014D +#define META_STARTPAGE 0x004F +#define META_ENDPAGE 0x0050 +#define META_ABORTDOC 0x0052 +#define META_ENDDOC 0x005E + +#define META_DELETEOBJECT 0x01f0 + +#define META_CREATEPALETTE 0x00f7 +#define META_CREATEBRUSH 0x00F8 +#define META_CREATEPATTERNBRUSH 0x01F9 +#define META_CREATEPENINDIRECT 0x02FA +#define META_CREATEFONTINDIRECT 0x02FB +#define META_CREATEBRUSHINDIRECT 0x02FC +#define META_CREATEBITMAPINDIRECT 0x02FD +#define META_CREATEBITMAP 0x06FE +#define META_CREATEREGION 0x06FF + +void WINAPI PlayMetaFileRecord(HDC, HANDLETABLE FAR*, METARECORD FAR*, UINT); + +#ifdef STRICT +typedef int (CALLBACK* MFENUMPROC)(HDC, HANDLETABLE FAR*, METARECORD FAR*, int, LPARAM); +#else +typedef FARPROC MFENUMPROC; +#endif + +BOOL WINAPI EnumMetaFile(HDC, HMETAFILE, MFENUMPROC, LPARAM); + +#endif /* NOMETAFILE */ + +/****** Printing support ****************************************************/ + +#ifdef STRICT +typedef BOOL (CALLBACK* ABORTPROC)(HDC, int); +#else +typedef FARPROC ABORTPROC; +#endif + +#if (WINVER >= 0x030a) + +typedef struct +{ + int cbSize; + LPCSTR lpszDocName; + LPCSTR lpszOutput; +} DOCINFO; +typedef DOCINFO FAR* LPDOCINFO; + +int WINAPI StartDoc(HDC, DOCINFO FAR*); +int WINAPI StartPage(HDC); +int WINAPI EndPage(HDC); +int WINAPI EndDoc(HDC); +int WINAPI AbortDoc(HDC); + +int WINAPI SetAbortProc(HDC, ABORTPROC); +HANDLE WINAPI SpoolFile(LPSTR, LPSTR, LPSTR, LPSTR); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI QueryAbort(HDC, int); + +/* Spooler Error Codes */ +#define SP_NOTREPORTED 0x4000 +#define SP_ERROR (-1) +#define SP_APPABORT (-2) +#define SP_USERABORT (-3) +#define SP_OUTOFDISK (-4) +#define SP_OUTOFMEMORY (-5) + +#define PR_JOBSTATUS 0x0000 + +#endif /* NOGDI */ + +/* Spooler status notification message */ +#define WM_SPOOLERSTATUS 0x002A + +#ifndef NOGDI + +/******* GDI Escape support *************************************************/ + +int WINAPI Escape(HDC, int, int, LPCSTR, void FAR*); + +/* GDI Escapes */ +#define NEWFRAME 1 +#define ABORTDOC 2 +#define NEXTBAND 3 +#define SETCOLORTABLE 4 +#define GETCOLORTABLE 5 +#define FLUSHOUTPUT 6 +#define DRAFTMODE 7 +#define QUERYESCSUPPORT 8 +#define SETABORTPROC 9 +#define STARTDOC 10 +#define ENDDOC 11 +#define GETPHYSPAGESIZE 12 +#define GETPRINTINGOFFSET 13 +#define GETSCALINGFACTOR 14 +#define MFCOMMENT 15 +#define GETPENWIDTH 16 +#define SETCOPYCOUNT 17 +#define SELECTPAPERSOURCE 18 +#define DEVICEDATA 19 +#define PASSTHROUGH 19 +#define GETTECHNOLGY 20 +#define GETTECHNOLOGY 20 +#define SETLINECAP 21 +#define SETLINEJOIN 22 +#define SETMITERLIMIT 23 +#define BANDINFO 24 +#define DRAWPATTERNRECT 25 +#define GETVECTORPENSIZE 26 +#define GETVECTORBRUSHSIZE 27 +#define ENABLEDUPLEX 28 +#define GETSETPAPERBINS 29 +#define GETSETPRINTORIENT 30 +#define ENUMPAPERBINS 31 +#define SETDIBSCALING 32 +#define EPSPRINTING 33 +#define ENUMPAPERMETRICS 34 +#define GETSETPAPERMETRICS 35 +#define POSTSCRIPT_DATA 37 +#define POSTSCRIPT_IGNORE 38 +#define MOUSETRAILS 39 + +#define GETEXTENDEDTEXTMETRICS 256 +#define GETEXTENTTABLE 257 +#define GETPAIRKERNTABLE 258 +#define GETTRACKKERNTABLE 259 +#define EXTTEXTOUT 512 +#define GETFACENAME 513 +#define ENABLERELATIVEWIDTHS 768 +#define ENABLEPAIRKERNING 769 +#define SETKERNTRACK 770 +#define SETALLJUSTVALUES 771 +#define SETCHARSET 772 + +#define STRETCHBLT 2048 + +#define GETSETSCREENPARAMS 3072 + +#define BEGIN_PATH 4096 +#define CLIP_TO_PATH 4097 +#define END_PATH 4098 +#define EXT_DEVICE_CAPS 4099 +#define RESTORE_CTM 4100 +#define SAVE_CTM 4101 +#define SET_ARC_DIRECTION 4102 +#define SET_BACKGROUND_COLOR 4103 +#define SET_POLY_MODE 4104 +#define SET_SCREEN_ANGLE 4105 +#define SET_SPREAD 4106 +#define TRANSFORM_CTM 4107 +#define SET_CLIP_BOX 4108 +#define SET_BOUNDS 4109 + +#endif /* NOGDI */ + +/****** USER typedefs, structures, and functions *****************************/ + +DECLARE_HANDLE(HWND); + +#ifndef NOUSER + +DECLARE_HANDLE(HMENU); + +DECLARE_HANDLE(HICON); +typedef HICON HCURSOR; /* HICONs & HCURSORs are polymorphic */ + +/****** System Metrics *******************************************************/ + +#ifndef NOSYSMETRICS + +int WINAPI GetSystemMetrics(int); + +/* GetSystemMetrics() codes */ +#define SM_CXSCREEN 0 +#define SM_CYSCREEN 1 +#define SM_CXVSCROLL 2 +#define SM_CYHSCROLL 3 +#define SM_CYCAPTION 4 +#define SM_CXBORDER 5 +#define SM_CYBORDER 6 +#define SM_CXDLGFRAME 7 +#define SM_CYDLGFRAME 8 +#define SM_CYVTHUMB 9 +#define SM_CXHTHUMB 10 +#define SM_CXICON 11 +#define SM_CYICON 12 +#define SM_CXCURSOR 13 +#define SM_CYCURSOR 14 +#define SM_CYMENU 15 +#define SM_CXFULLSCREEN 16 +#define SM_CYFULLSCREEN 17 +#define SM_CYKANJIWINDOW 18 +#define SM_MOUSEPRESENT 19 +#define SM_CYVSCROLL 20 +#define SM_CXHSCROLL 21 +#define SM_DEBUG 22 +#define SM_SWAPBUTTON 23 +#define SM_RESERVED1 24 +#define SM_RESERVED2 25 +#define SM_RESERVED3 26 +#define SM_RESERVED4 27 +#define SM_CXMIN 28 +#define SM_CYMIN 29 +#define SM_CXSIZE 30 +#define SM_CYSIZE 31 +#define SM_CXFRAME 32 +#define SM_CYFRAME 33 +#define SM_CXMINTRACK 34 +#define SM_CYMINTRACK 35 + +#if (WINVER >= 0x030a) +#define SM_CXDOUBLECLK 36 +#define SM_CYDOUBLECLK 37 +#define SM_CXICONSPACING 38 +#define SM_CYICONSPACING 39 +#define SM_MENUDROPALIGNMENT 40 +#define SM_PENWINDOWS 41 +#define SM_DBCSENABLED 42 +#endif /* WINVER >= 0x030a */ + +#define SM_CMETRICS 43 + +#endif /* NOSYSMETRICS */ + +UINT WINAPI GetDoubleClickTime(void); +void WINAPI SetDoubleClickTime(UINT); + +#define WM_DEVMODECHANGE 0x001B +#define WM_TIMECHANGE 0x001E + +/****** System Parameters support ********************************************/ + +#if (WINVER >= 0x030a) +#ifndef NOSYSTEMPARAMSINFO + +BOOL WINAPI SystemParametersInfo(UINT, UINT, VOID FAR*, UINT); + +#define SPI_GETBEEP 1 +#define SPI_SETBEEP 2 +#define SPI_GETMOUSE 3 +#define SPI_SETMOUSE 4 +#define SPI_GETBORDER 5 +#define SPI_SETBORDER 6 +#define SPI_GETKEYBOARDSPEED 10 +#define SPI_SETKEYBOARDSPEED 11 +#define SPI_LANGDRIVER 12 +#define SPI_ICONHORIZONTALSPACING 13 +#define SPI_GETSCREENSAVETIMEOUT 14 +#define SPI_SETSCREENSAVETIMEOUT 15 +#define SPI_GETSCREENSAVEACTIVE 16 +#define SPI_SETSCREENSAVEACTIVE 17 +#define SPI_GETGRIDGRANULARITY 18 +#define SPI_SETGRIDGRANULARITY 19 +#define SPI_SETDESKWALLPAPER 20 +#define SPI_SETDESKPATTERN 21 +#define SPI_GETKEYBOARDDELAY 22 +#define SPI_SETKEYBOARDDELAY 23 +#define SPI_ICONVERTICALSPACING 24 +#define SPI_GETICONTITLEWRAP 25 +#define SPI_SETICONTITLEWRAP 26 +#define SPI_GETMENUDROPALIGNMENT 27 +#define SPI_SETMENUDROPALIGNMENT 28 +#define SPI_SETDOUBLECLKWIDTH 29 +#define SPI_SETDOUBLECLKHEIGHT 30 +#define SPI_GETICONTITLELOGFONT 31 +#define SPI_SETDOUBLECLICKTIME 32 +#define SPI_SETMOUSEBUTTONSWAP 33 +#define SPI_SETICONTITLELOGFONT 34 +#define SPI_GETFASTTASKSWITCH 35 +#define SPI_SETFASTTASKSWITCH 36 + +/* SystemParametersInfo flags */ +#define SPIF_UPDATEINIFILE 0x0001 +#define SPIF_SENDWININICHANGE 0x0002 + +#endif /* NOSYSTEMPARAMSINFO */ +#endif /* WINVER >= 0x030a */ + +/****** Rectangle support ****************************************************/ + +void WINAPI SetRect(RECT FAR*, int, int, int, int); +void WINAPI SetRectEmpty(RECT FAR*); + +void WINAPI CopyRect(RECT FAR*, const RECT FAR*); + +BOOL WINAPI IsRectEmpty(const RECT FAR*); + +BOOL WINAPI EqualRect(const RECT FAR*, const RECT FAR*); + +BOOL WINAPI IntersectRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI UnionRect(RECT FAR*, const RECT FAR*, const RECT FAR*); +BOOL WINAPI SubtractRect(RECT FAR*, const RECT FAR*, const RECT FAR*); + +void WINAPI OffsetRect(RECT FAR*, int, int); +void WINAPI InflateRect(RECT FAR*, int, int); + +BOOL WINAPI PtInRect(const RECT FAR*, POINT); + +/****** Window message support ***********************************************/ + +UINT WINAPI RegisterWindowMessage(LPCSTR); + +#define WM_NULL 0x0000 + +/* NOTE: All messages below 0x0400 are RESERVED by Windows */ +#define WM_USER 0x0400 + +#ifndef NOMSG + +/* Queued message structure */ +typedef struct tagMSG +{ + HWND hwnd; + UINT message; + WPARAM wParam; + LPARAM lParam; + DWORD time; + POINT pt; +} MSG; +typedef MSG* PMSG; +typedef MSG NEAR* NPMSG; +typedef MSG FAR* LPMSG; + +BOOL WINAPI GetMessage(MSG FAR*, HWND, UINT, UINT); +BOOL WINAPI PeekMessage(MSG FAR*, HWND, UINT, UINT, UINT); + +/* PeekMessage() options */ +#define PM_NOREMOVE 0x0000 +#define PM_REMOVE 0x0001 +#define PM_NOYIELD 0x0002 + +void WINAPI WaitMessage(void); + +DWORD WINAPI GetMessagePos(void); +LONG WINAPI GetMessageTime(void); +#if (WINVER >= 0x030a) +LPARAM WINAPI GetMessageExtraInfo(void); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI TranslateMessage(const MSG FAR*); +LONG WINAPI DispatchMessage(const MSG FAR*); + +BOOL WINAPI SetMessageQueue(int); + +BOOL WINAPI GetInputState(void); + +#if (WINVER >= 0x030a) +DWORD WINAPI GetQueueStatus(UINT flags); + +/* GetQueueStatus flags */ +#define QS_KEY 0x0001 +#define QS_MOUSEMOVE 0x0002 +#define QS_MOUSEBUTTON 0x0004 +#define QS_MOUSE (QS_MOUSEMOVE | QS_MOUSEBUTTON) +#define QS_POSTMESSAGE 0x0008 +#define QS_TIMER 0x0010 +#define QS_PAINT 0x0020 +#define QS_SENDMESSAGE 0x0040 + +#define QS_ALLINPUT 0x007f +#endif /* WINVER >= 0x030a */ + +#endif /* NOMSG */ + +BOOL WINAPI PostMessage(HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI SendMessage(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG + +BOOL WINAPI PostAppMessage(HTASK, UINT, WPARAM, LPARAM); + +void WINAPI ReplyMessage(LRESULT); +BOOL WINAPI InSendMessage(void); + +/* Special HWND value for use with PostMessage() and SendMessage() */ +#define HWND_BROADCAST ((HWND)0xffff) + +BOOL WINAPI CallMsgFilter(MSG FAR*, int); + +#define WH_GETMESSAGE 3 + +#define WH_CALLWNDPROC 4 + +#define WH_MSGFILTER (-1) +#define WH_SYSMSGFILTER 6 + +/* CallMsgFilter() and WH_SYS/MSGFILTER context codes */ +#define MSGF_DIALOGBOX 0 +#define MSGF_MENU 2 +#define MSGF_MOVE 3 +#define MSGF_SIZE 4 +#define MSGF_SCROLLBAR 5 +#define MSGF_NEXTWINDOW 6 +#define MSGF_MAINLOOP 8 +#define MSGF_USER 4096 +#endif /* NOMSG */ + +/* Standard window messages */ +/* PenWindows specific messages */ +#define WM_PENWINFIRST 0x0380 +#define WM_PENWINLAST 0x038F + +/* Coalescing messages */ +#define WM_COALESCE_FIRST 0x0390 +#define WM_COALESCE_LAST 0x039F + + +#if (WINVER >= 0x030a) +/****** Power management ****************************************************/ +#define WM_POWER 0x0048 + +/* wParam for WM_POWER window message and DRV_POWER driver notification */ +#define PWR_OK 1 +#define PWR_FAIL (-1) +#define PWR_SUSPENDREQUEST 1 +#define PWR_SUSPENDRESUME 2 +#define PWR_CRITICALRESUME 3 +#endif /* WINVER >= 0x030a */ + +/****** Application termination *********************************************/ + +#define WM_QUERYENDSESSION 0x0011 +#define WM_ENDSESSION 0x0016 + +#define WM_QUIT 0x0012 + +void WINAPI PostQuitMessage(int); + +#define WM_SYSTEMERROR 0x0017 + +/****** Window class management *********************************************/ + +typedef LRESULT (CALLBACK* WNDPROC)(HWND, UINT, WPARAM, LPARAM); + +typedef struct tagWNDCLASS +{ + UINT style; + WNDPROC lpfnWndProc; + int cbClsExtra; + int cbWndExtra; + HINSTANCE hInstance; + HICON hIcon; + HCURSOR hCursor; + HBRUSH hbrBackground; + LPCSTR lpszMenuName; + LPCSTR lpszClassName; +} WNDCLASS; +typedef WNDCLASS* PWNDCLASS; +typedef WNDCLASS NEAR* NPWNDCLASS; +typedef WNDCLASS FAR* LPWNDCLASS; + +ATOM WINAPI RegisterClass(const WNDCLASS FAR*); +BOOL WINAPI UnregisterClass(LPCSTR, HINSTANCE); + +BOOL WINAPI GetClassInfo(HINSTANCE, LPCSTR, WNDCLASS FAR*); +int WINAPI GetClassName(HWND, LPSTR, int); + +#ifndef NOWINSTYLES + +/* Class styles */ +#define CS_VREDRAW 0x0001 +#define CS_HREDRAW 0x0002 + +#define CS_OWNDC 0x0020 +#define CS_CLASSDC 0x0040 +#define CS_PARENTDC 0x0080 + +#define CS_SAVEBITS 0x0800 + +#define CS_DBLCLKS 0x0008 + +#define CS_BYTEALIGNCLIENT 0x1000 +#define CS_BYTEALIGNWINDOW 0x2000 + +#define CS_NOCLOSE 0x0200 + +#define CS_KEYCVTWINDOW 0x0004 +#define CS_NOKEYCVT 0x0100 + +#define CS_GLOBALCLASS 0x4000 +#endif /* NOWINSTYLES */ + +#ifndef NOWINOFFSETS + +WORD WINAPI GetClassWord(HWND, int); +WORD WINAPI SetClassWord(HWND, int, WORD); +LONG WINAPI GetClassLong(HWND, int); +LONG WINAPI SetClassLong(HWND, int, LONG); + +/* Class field offsets for GetClassLong() and GetClassWord() */ +#define GCL_MENUNAME (-8) +#define GCW_HBRBACKGROUND (-10) +#define GCW_HCURSOR (-12) +#define GCW_HICON (-14) +#define GCW_HMODULE (-16) +#define GCW_CBWNDEXTRA (-18) +#define GCW_CBCLSEXTRA (-20) +#define GCL_WNDPROC (-24) +#define GCW_STYLE (-26) + +#if (WINVER >= 0x030a) +#define GCW_ATOM (-32) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINOFFSETS */ + +/****** Window creation/destroy *********************************************/ + +/* Window Styles */ +#ifndef NOWINSTYLES + +/* Basic window types */ +#define WS_OVERLAPPED 0x00000000L +#define WS_POPUP 0x80000000L +#define WS_CHILD 0x40000000L + +/* Clipping styles */ +#define WS_CLIPSIBLINGS 0x04000000L +#define WS_CLIPCHILDREN 0x02000000L + +/* Generic window states */ +#define WS_VISIBLE 0x10000000L +#define WS_DISABLED 0x08000000L + +/* Main window states */ +#define WS_MINIMIZE 0x20000000L +#define WS_MAXIMIZE 0x01000000L + +/* Main window styles */ +#define WS_CAPTION 0x00C00000L /* WS_BORDER | WS_DLGFRAME */ +#define WS_BORDER 0x00800000L +#define WS_DLGFRAME 0x00400000L +#define WS_VSCROLL 0x00200000L +#define WS_HSCROLL 0x00100000L +#define WS_SYSMENU 0x00080000L +#define WS_THICKFRAME 0x00040000L +#define WS_MINIMIZEBOX 0x00020000L +#define WS_MAXIMIZEBOX 0x00010000L + +/* Control window styles */ +#define WS_GROUP 0x00020000L +#define WS_TABSTOP 0x00010000L + +/* Common Window Styles */ +#define WS_OVERLAPPEDWINDOW (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX) +#define WS_POPUPWINDOW (WS_POPUP | WS_BORDER | WS_SYSMENU) +#define WS_CHILDWINDOW (WS_CHILD) + +/* Extended Window Styles */ +#define WS_EX_DLGMODALFRAME 0x00000001L +#define WS_EX_NOPARENTNOTIFY 0x00000004L + +#if (WINVER >= 0x030a) +#define WS_EX_TOPMOST 0x00000008L +#define WS_EX_ACCEPTFILES 0x00000010L +#define WS_EX_TRANSPARENT 0x00000020L +#endif /* WINVER >= 0x030a */ + +/* Obsolete style names */ +#define WS_TILED WS_OVERLAPPED +#define WS_ICONIC WS_MINIMIZE +#define WS_SIZEBOX WS_THICKFRAME +#define WS_TILEDWINDOW WS_OVERLAPPEDWINDOW + + +#endif /* NOWINSTYLES */ + +/* Special value for CreateWindow, et al. */ +#define HWND_DESKTOP ((HWND)0) + +BOOL WINAPI IsWindow(HWND); + +HWND WINAPI CreateWindowEx(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); +HWND WINAPI CreateWindow(LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, void FAR*); + +#define WM_CREATE 0x0001 +#define WM_NCCREATE 0x0081 + +/* WM_CREATE/WM_NCCREATE lParam struct */ +typedef struct tagCREATESTRUCT +{ + void FAR* lpCreateParams; + HINSTANCE hInstance; + HMENU hMenu; + HWND hwndParent; + int cy; + int cx; + int y; + int x; + LONG style; + LPCSTR lpszName; + LPCSTR lpszClass; + DWORD dwExStyle; +} CREATESTRUCT; +typedef CREATESTRUCT FAR* LPCREATESTRUCT; + +BOOL WINAPI DestroyWindow(HWND); + +#define WM_DESTROY 0x0002 +#define WM_NCDESTROY 0x0082 + +/* Basic window attributes */ + +HTASK WINAPI GetWindowTask(HWND); + +BOOL WINAPI IsChild(HWND, HWND); + +HWND WINAPI GetParent(HWND); +HWND WINAPI SetParent(HWND, HWND); + +BOOL WINAPI IsWindowVisible(HWND); + +BOOL WINAPI ShowWindow(HWND, int); + + +#ifndef NOSHOWWINDOW + +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 + +/* Obsolete ShowWindow() command names */ +#define HIDE_WINDOW 0 +#define SHOW_OPENWINDOW 1 +#define SHOW_ICONWINDOW 2 +#define SHOW_FULLSCREEN 3 +#define SHOW_OPENNOACTIVATE 4 + +#define WM_SHOWWINDOW 0x0018 + +/* WM_SHOWWINDOW wParam codes */ +#define SW_PARENTCLOSING 1 +#define SW_OTHERMAXIMIZED 2 +#define SW_PARENTOPENING 3 +#define SW_OTHERRESTORED 4 + +/* Obsolete constant names */ +#define SW_OTHERZOOM SW_OTHERMAXIMIZED +#define SW_OTHERUNZOOM SW_OTHERRESTORED +#endif /* NOSHOWWINDOW */ + +#define WM_SETREDRAW 0x000B + +/* Enabled state */ +BOOL WINAPI EnableWindow(HWND,BOOL); +BOOL WINAPI IsWindowEnabled(HWND); + +#define WM_ENABLE 0x000A + +/* Window text */ +void WINAPI SetWindowText(HWND, LPCSTR); +int WINAPI GetWindowText(HWND, LPSTR, int); +int WINAPI GetWindowTextLength(HWND); + +#define WM_SETTEXT 0x000C +#define WM_GETTEXT 0x000D +#define WM_GETTEXTLENGTH 0x000E + +/* Window words */ +WORD WINAPI GetWindowWord(HWND, int); +WORD WINAPI SetWindowWord(HWND, int, WORD); +LONG WINAPI GetWindowLong(HWND, int); +LONG WINAPI SetWindowLong(HWND, int, LONG); + +/* Window field offsets for GetWindowLong() and GetWindowWord() */ +#ifndef NOWINOFFSETS +#define GWL_WNDPROC (-4) +#define GWW_HINSTANCE (-6) +#define GWW_HWNDPARENT (-8) +#define GWW_ID (-12) +#define GWL_STYLE (-16) +#define GWL_EXSTYLE (-20) +#endif /* NOWINOFFSETS */ + +/****** Window size, position, Z-order, and visibility **********************/ + +#define CW_USEDEFAULT ((int)0x8000) + +void WINAPI GetClientRect(HWND, RECT FAR*); +void WINAPI GetWindowRect(HWND, RECT FAR*); + + +#if (WINVER >= 0x030a) +typedef struct tagWINDOWPLACEMENT +{ + UINT length; + UINT flags; + UINT showCmd; + POINT ptMinPosition; + POINT ptMaxPosition; + RECT rcNormalPosition; +} WINDOWPLACEMENT; +typedef WINDOWPLACEMENT *PWINDOWPLACEMENT; +typedef WINDOWPLACEMENT FAR* LPWINDOWPLACEMENT; + +#define WPF_SETMINPOSITION 0x0001 +#define WPF_RESTORETOMAXIMIZED 0x0002 + +BOOL WINAPI GetWindowPlacement(HWND, WINDOWPLACEMENT FAR*); +BOOL WINAPI SetWindowPlacement(HWND, const WINDOWPLACEMENT FAR*); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI SetWindowPos(HWND, HWND, int, int, int, int, UINT); + +/* SetWindowPos() and WINDOWPOS flags */ +#define SWP_NOSIZE 0x0001 +#define SWP_NOMOVE 0x0002 +#define SWP_NOZORDER 0x0004 +#define SWP_NOREDRAW 0x0008 +#define SWP_NOACTIVATE 0x0010 +#define SWP_FRAMECHANGED 0x0020 /* The frame changed: send WM_NCCALCSIZE */ +#define SWP_SHOWWINDOW 0x0040 +#define SWP_HIDEWINDOW 0x0080 +#define SWP_NOCOPYBITS 0x0100 +#define SWP_NOOWNERZORDER 0x0200 /* Don't do owner Z ordering */ + +#define SWP_DRAWFRAME SWP_FRAMECHANGED +#define SWP_NOREPOSITION SWP_NOOWNERZORDER + +#define SWP_NOSENDCHANGING 0x0400 +#define SWP_DEFERERASE 0x2000 + +/* SetWindowPos() hwndInsertAfter field values */ +#define HWND_TOP ((HWND)0) +#define HWND_BOTTOM ((HWND)1) +#define HWND_TOPMOST ((HWND)-1) +#define HWND_NOTOPMOST ((HWND)-2) + +#ifndef NODEFERWINDOWPOS + +DECLARE_HANDLE(HDWP); + +HDWP WINAPI BeginDeferWindowPos(int); +HDWP WINAPI DeferWindowPos(HDWP, HWND, HWND, int, int, int, int, UINT); +BOOL WINAPI EndDeferWindowPos(HDWP); + +#endif /* NODEFERWINDOWPOS */ + +BOOL WINAPI MoveWindow(HWND, int, int, int, int, BOOL); +BOOL WINAPI BringWindowToTop(HWND); + +#if (WINVER >= 0x030a) + +#define WM_WINDOWPOSCHANGING 0x0046 +#define WM_WINDOWPOSCHANGED 0x0047 + +/* WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam */ +typedef struct tagWINDOWPOS +{ + HWND hwnd; + HWND hwndInsertAfter; + int x; + int y; + int cx; + int cy; + UINT flags; +} WINDOWPOS; +typedef WINDOWPOS FAR* LPWINDOWPOS; +#endif /* WINVER >= 0x030a */ + +#define WM_MOVE 0x0003 +#define WM_SIZE 0x0005 + +/* WM_SIZE message wParam values */ +#define SIZE_RESTORED 0 +#define SIZE_MINIMIZED 1 +#define SIZE_MAXIMIZED 2 +#define SIZE_MAXSHOW 3 +#define SIZE_MAXHIDE 4 + +/* Obsolete constant names */ +#define SIZENORMAL SIZE_RESTORED +#define SIZEICONIC SIZE_MINIMIZED +#define SIZEFULLSCREEN SIZE_MAXIMIZED +#define SIZEZOOMSHOW SIZE_MAXSHOW +#define SIZEZOOMHIDE SIZE_MAXHIDE + +/****** Window proc implementation & subclassing support *********************/ + +LRESULT WINAPI DefWindowProc(HWND, UINT, WPARAM, LPARAM); + +#ifdef STRICT +LRESULT WINAPI CallWindowProc(WNDPROC, HWND, UINT, WPARAM, LPARAM); +#else +LRESULT WINAPI CallWindowProc(FARPROC, HWND, UINT, WPARAM, LPARAM); +#endif + +/****** Main window support **************************************************/ + +void WINAPI AdjustWindowRect(RECT FAR*, DWORD, BOOL); +void WINAPI AdjustWindowRectEx(RECT FAR*, DWORD, BOOL, DWORD); + +#define WM_QUERYOPEN 0x0013 +#define WM_CLOSE 0x0010 + +/* Struct pointed to by WM_GETMINMAXINFO lParam */ +typedef struct tagMINMAXINFO +{ + POINT ptReserved; + POINT ptMaxSize; + POINT ptMaxPosition; + POINT ptMinTrackSize; + POINT ptMaxTrackSize; +} MINMAXINFO; +#define WM_GETMINMAXINFO 0x0024 + + +BOOL WINAPI FlashWindow(HWND, BOOL); + +void WINAPI ShowOwnedPopups(HWND, BOOL); + +/* Obsolete functions */ +BOOL WINAPI OpenIcon(HWND); +void WINAPI CloseWindow(HWND); +BOOL WINAPI AnyPopup(void); +BOOL WINAPI IsIconic(HWND); +BOOL WINAPI IsZoomed(HWND); + +/****** Window coordinate mapping and hit-testing ***************************/ + +void WINAPI ClientToScreen(HWND, POINT FAR*); +void WINAPI ScreenToClient(HWND, POINT FAR*); + +#if (WINVER >= 0x030a) +void WINAPI MapWindowPoints(HWND hwndFrom, HWND hwndTo, POINT FAR* lppt, UINT cpt); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI WindowFromPoint(POINT); +HWND WINAPI ChildWindowFromPoint(HWND, POINT); + +/****** Window query and enumeration ****************************************/ + +HWND WINAPI GetDesktopWindow(void); + +HWND WINAPI FindWindow(LPCSTR, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* WNDENUMPROC)(HWND, LPARAM); +#else +typedef FARPROC WNDENUMPROC; +#endif + +BOOL WINAPI EnumWindows(WNDENUMPROC, LPARAM); +BOOL WINAPI EnumChildWindows(HWND, WNDENUMPROC, LPARAM); +BOOL WINAPI EnumTaskWindows(HTASK, WNDENUMPROC, LPARAM); + +HWND WINAPI GetTopWindow(HWND); + +HWND WINAPI GetWindow(HWND, UINT); +HWND WINAPI GetNextWindow(HWND, UINT); + +/* GetWindow() constants */ +#define GW_HWNDFIRST 0 +#define GW_HWNDLAST 1 +#define GW_HWNDNEXT 2 +#define GW_HWNDPREV 3 +#define GW_OWNER 4 +#define GW_CHILD 5 + + +/****** Window property support *********************************************/ + +BOOL WINAPI SetProp(HWND, LPCSTR, HANDLE); +HANDLE WINAPI GetProp(HWND, LPCSTR); +HANDLE WINAPI RemoveProp(HWND, LPCSTR); + +#ifdef STRICT +typedef BOOL (CALLBACK* PROPENUMPROC)(HWND, LPCSTR, HANDLE); +#else +typedef FARPROC PROPENUMPROC; +#endif + +int WINAPI EnumProps(HWND, PROPENUMPROC); + +/****** Window drawing support **********************************************/ + +HDC WINAPI GetDC(HWND); +int WINAPI ReleaseDC(HWND, HDC); + +HDC WINAPI GetWindowDC(HWND); + +#if (WINVER >= 0x030a) +HDC WINAPI GetDCEx(register HWND hwnd, HRGN hrgnClip, DWORD flags); + +#define DCX_WINDOW 0x00000001L +#define DCX_CACHE 0x00000002L +#define DCX_CLIPCHILDREN 0x00000008L +#define DCX_CLIPSIBLINGS 0x00000010L +#define DCX_PARENTCLIP 0x00000020L + +#define DCX_EXCLUDERGN 0x00000040L +#define DCX_INTERSECTRGN 0x00000080L + + +#define DCX_LOCKWINDOWUPDATE 0x00000400L + + +#define DCX_USESTYLE 0x00010000L + +#endif /* WINVER >= 0x030a */ + +/****** Window repainting ***************************************************/ + +#define WM_PAINT 0x000F +#define WM_ERASEBKGND 0x0014 +#define WM_ICONERASEBKGND 0x0027 + +/* BeginPaint() return structure */ +typedef struct tagPAINTSTRUCT +{ + HDC hdc; + BOOL fErase; + RECT rcPaint; + BOOL fRestore; + BOOL fIncUpdate; + BYTE rgbReserved[16]; +} PAINTSTRUCT; +typedef PAINTSTRUCT* PPAINTSTRUCT; +typedef PAINTSTRUCT NEAR* NPPAINTSTRUCT; +typedef PAINTSTRUCT FAR* LPPAINTSTRUCT; + +HDC WINAPI BeginPaint(HWND, PAINTSTRUCT FAR*); +void WINAPI EndPaint(HWND, const PAINTSTRUCT FAR*); + +void WINAPI UpdateWindow(HWND); + +int WINAPI ExcludeUpdateRgn(HDC, HWND); + +#if (WINVER >= 0x030a) +BOOL WINAPI LockWindowUpdate(HWND hwndLock); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI GetUpdateRect(HWND, RECT FAR*, BOOL); +int WINAPI GetUpdateRgn(HWND, HRGN, BOOL); + +void WINAPI InvalidateRect(HWND, const RECT FAR*, BOOL); +void WINAPI ValidateRect(HWND, const RECT FAR*); + +void WINAPI InvalidateRgn(HWND, HRGN, BOOL); +void WINAPI ValidateRgn(HWND, HRGN); + +#if (WINVER >= 0x030a) +BOOL WINAPI RedrawWindow(HWND hwnd, const RECT FAR* lprcUpdate, HRGN hrgnUpdate, UINT flags); + +#define RDW_INVALIDATE 0x0001 +#define RDW_INTERNALPAINT 0x0002 +#define RDW_ERASE 0x0004 + +#define RDW_VALIDATE 0x0008 +#define RDW_NOINTERNALPAINT 0x0010 +#define RDW_NOERASE 0x0020 + +#define RDW_NOCHILDREN 0x0040 +#define RDW_ALLCHILDREN 0x0080 + +#define RDW_UPDATENOW 0x0100 +#define RDW_ERASENOW 0x0200 + +#define RDW_FRAME 0x0400 +#define RDW_NOFRAME 0x0800 + +#endif /* WINVER >= 0x030a */ + +/****** Window scrolling ****************************************************/ + +void WINAPI ScrollWindow(HWND, int, int, const RECT FAR*, const RECT FAR*); +BOOL WINAPI ScrollDC(HDC, int, int, const RECT FAR*, const RECT FAR*, HRGN, RECT FAR*); + +#if (WINVER >= 0x030a) + +int WINAPI ScrollWindowEx(HWND hwnd, int dx, int dy, + const RECT FAR* prcScroll, const RECT FAR* prcClip, + HRGN hrgnUpdate, RECT FAR* prcUpdate, UINT flags); + +#define SW_SCROLLCHILDREN 0x0001 +#define SW_INVALIDATE 0x0002 +#define SW_ERASE 0x0004 + + +#endif /* WINVER >= 0x030a */ + +/****** Non-client window area management ************************************/ + +#define WM_NCPAINT 0x0085 + +#define WM_NCCALCSIZE 0x0083 + +#if (WINVER >= 0x030a) +/* WM_NCCALCSIZE return flags */ +#define WVR_ALIGNTOP 0x0010 +#define WVR_ALIGNLEFT 0x0020 +#define WVR_ALIGNBOTTOM 0x0040 +#define WVR_ALIGNRIGHT 0x0080 +#define WVR_HREDRAW 0x0100 +#define WVR_VREDRAW 0x0200 +#define WVR_REDRAW (WVR_HREDRAW | WVR_VREDRAW) +#define WVR_VALIDRECTS 0x0400 + + +/* WM_NCCALCSIZE parameter structure */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[3]; + WINDOWPOS FAR* lppos; +} NCCALCSIZE_PARAMS; +#else /* WINVER >= 0x030a */ +typedef struct tagNCCALCSIZE_PARAMS +{ + RECT rgrc[2]; +} NCCALCSIZE_PARAMS; +#endif /* WINVER >= 0x030a */ +typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS; + +#define WM_NCHITTEST 0x0084 + +/* WM_NCHITTEST return codes */ +#define HTERROR (-2) +#define HTTRANSPARENT (-1) +#define HTNOWHERE 0 +#define HTCLIENT 1 +#define HTCAPTION 2 +#define HTSYSMENU 3 +#define HTSIZE 4 +#define HTMENU 5 +#define HTHSCROLL 6 +#define HTVSCROLL 7 +#define HTMINBUTTON 8 +#define HTMAXBUTTON 9 +#define HTLEFT 10 +#define HTRIGHT 11 +#define HTTOP 12 +#define HTTOPLEFT 13 +#define HTTOPRIGHT 14 +#define HTBOTTOM 15 +#define HTBOTTOMLEFT 16 +#define HTBOTTOMRIGHT 17 +#define HTBORDER 18 +#define HTGROWBOX HTSIZE +#define HTREDUCE HTMINBUTTON +#define HTZOOM HTMAXBUTTON + +/****** Drag-and-drop support ***********************************************/ + +#define WM_QUERYDRAGICON 0x0037 +#define WM_DROPFILES 0x0233 + +/****** Window activation ***************************************************/ + +HWND WINAPI SetActiveWindow(HWND); +HWND WINAPI GetActiveWindow(void); + +HWND WINAPI GetLastActivePopup(HWND); + +/* WM_ACTIVATE state values */ +#define WA_INACTIVE 0 +#define WA_ACTIVE 1 +#define WA_CLICKACTIVE 2 + +#define WM_ACTIVATE 0x0006 +#define WM_ACTIVATEAPP 0x001C +#define WM_NCACTIVATE 0x0086 + +/****** Keyboard input support **********************************************/ + +HWND WINAPI SetFocus(HWND); +HWND WINAPI GetFocus(void); + +int WINAPI GetKeyState(int); +int WINAPI GetAsyncKeyState(int); + +void WINAPI GetKeyboardState(BYTE FAR* ); +void WINAPI SetKeyboardState(BYTE FAR* ); + +#define WM_SETFOCUS 0x0007 +#define WM_KILLFOCUS 0x0008 + +#define WM_KEYDOWN 0x0100 +#define WM_KEYUP 0x0101 + +#define WM_CHAR 0x0102 +#define WM_DEADCHAR 0x0103 + +#define WM_SYSKEYDOWN 0x0104 +#define WM_SYSKEYUP 0x0105 + +#define WM_SYSCHAR 0x0106 +#define WM_SYSDEADCHAR 0x0107 + + +/* Keyboard message range */ +#define WM_KEYFIRST 0x0100 +#define WM_KEYLAST 0x0108 + +/* WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags */ +#define KF_EXTENDED 0x0100 +#define KF_DLGMODE 0x0800 +#define KF_MENUMODE 0x1000 +#define KF_ALTDOWN 0x2000 +#define KF_REPEAT 0x4000 +#define KF_UP 0x8000 + +/* Virtual key codes */ +#ifndef NOVIRTUALKEYCODES +#define VK_LBUTTON 0x01 +#define VK_RBUTTON 0x02 +#define VK_CANCEL 0x03 +#define VK_MBUTTON 0x04 +#define VK_BACK 0x08 +#define VK_TAB 0x09 +#define VK_CLEAR 0x0C +#define VK_RETURN 0x0D +#define VK_SHIFT 0x10 +#define VK_CONTROL 0x11 +#define VK_MENU 0x12 +#define VK_PAUSE 0x13 +#define VK_CAPITAL 0x14 +#define VK_ESCAPE 0x1B +#define VK_SPACE 0x20 +#define VK_PRIOR 0x21 +#define VK_NEXT 0x22 +#define VK_END 0x23 +#define VK_HOME 0x24 +#define VK_LEFT 0x25 +#define VK_UP 0x26 +#define VK_RIGHT 0x27 +#define VK_DOWN 0x28 +#define VK_SELECT 0x29 +#define VK_PRINT 0x2A +#define VK_EXECUTE 0x2B +#define VK_SNAPSHOT 0x2C +#define VK_INSERT 0x2D +#define VK_DELETE 0x2E +#define VK_HELP 0x2F +#define VK_NUMPAD0 0x60 +#define VK_NUMPAD1 0x61 +#define VK_NUMPAD2 0x62 +#define VK_NUMPAD3 0x63 +#define VK_NUMPAD4 0x64 +#define VK_NUMPAD5 0x65 +#define VK_NUMPAD6 0x66 +#define VK_NUMPAD7 0x67 +#define VK_NUMPAD8 0x68 +#define VK_NUMPAD9 0x69 +#define VK_MULTIPLY 0x6A +#define VK_ADD 0x6B +#define VK_SEPARATOR 0x6C +#define VK_SUBTRACT 0x6D +#define VK_DECIMAL 0x6E +#define VK_DIVIDE 0x6F +#define VK_F1 0x70 +#define VK_F2 0x71 +#define VK_F3 0x72 +#define VK_F4 0x73 +#define VK_F5 0x74 +#define VK_F6 0x75 +#define VK_F7 0x76 +#define VK_F8 0x77 +#define VK_F9 0x78 +#define VK_F10 0x79 +#define VK_F11 0x7A +#define VK_F12 0x7B +#define VK_F13 0x7C +#define VK_F14 0x7D +#define VK_F15 0x7E +#define VK_F16 0x7F +#define VK_F17 0x80 +#define VK_F18 0x81 +#define VK_F19 0x82 +#define VK_F20 0x83 +#define VK_F21 0x84 +#define VK_F22 0x85 +#define VK_F23 0x86 +#define VK_F24 0x87 +#define VK_NUMLOCK 0x90 +#define VK_SCROLL 0x91 + +/* VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' */ +/* VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' */ + +#endif /* NOVIRTUALKEYCODES */ + + +/* SetWindowsHook() keyboard hook */ +#define WH_KEYBOARD 2 + +/****** Mouse input support *************************************************/ + +HWND WINAPI SetCapture(HWND); +void WINAPI ReleaseCapture(void); +HWND WINAPI GetCapture(void); + +BOOL WINAPI SwapMouseButton(BOOL); + +/* Mouse input messages */ +#define WM_MOUSEMOVE 0x0200 +#define WM_LBUTTONDOWN 0x0201 +#define WM_LBUTTONUP 0x0202 +#define WM_LBUTTONDBLCLK 0x0203 +#define WM_RBUTTONDOWN 0x0204 +#define WM_RBUTTONUP 0x0205 +#define WM_RBUTTONDBLCLK 0x0206 +#define WM_MBUTTONDOWN 0x0207 +#define WM_MBUTTONUP 0x0208 +#define WM_MBUTTONDBLCLK 0x0209 + +/* Mouse input message range */ +#define WM_MOUSEFIRST 0x0200 +#define WM_MOUSELAST 0x0209 + +/* Mouse message wParam key states */ +#ifndef NOKEYSTATES +#define MK_LBUTTON 0x0001 +#define MK_RBUTTON 0x0002 +#define MK_SHIFT 0x0004 +#define MK_CONTROL 0x0008 +#define MK_MBUTTON 0x0010 +#endif /* NOKEYSTATES */ + +/* Non-client mouse messages */ +#define WM_NCMOUSEMOVE 0x00A0 +#define WM_NCLBUTTONDOWN 0x00A1 +#define WM_NCLBUTTONUP 0x00A2 +#define WM_NCLBUTTONDBLCLK 0x00A3 +#define WM_NCRBUTTONDOWN 0x00A4 +#define WM_NCRBUTTONUP 0x00A5 +#define WM_NCRBUTTONDBLCLK 0x00A6 +#define WM_NCMBUTTONDOWN 0x00A7 +#define WM_NCMBUTTONUP 0x00A8 +#define WM_NCMBUTTONDBLCLK 0x00A9 + +/* Mouse click activation support */ +#define WM_MOUSEACTIVATE 0x0021 + +/* WM_MOUSEACTIVATE return codes */ +#define MA_ACTIVATE 1 +#define MA_ACTIVATEANDEAT 2 +#define MA_NOACTIVATE 3 +#if (WINVER >= 0x030a) +#define MA_NOACTIVATEANDEAT 4 +#endif /* WINVER >= 0x030a */ + +/* SetWindowsHook() mouse hook */ +#ifndef NOWH +#define WH_MOUSE 7 + +typedef struct tagMOUSEHOOKSTRUCT +{ + POINT pt; + HWND hwnd; + UINT wHitTestCode; + DWORD dwExtraInfo; +} MOUSEHOOKSTRUCT; +typedef MOUSEHOOKSTRUCT FAR* LPMOUSEHOOKSTRUCT; +#endif /* NOWH */ + +/****** Mode control ********************************************************/ + +#define WM_CANCELMODE 0x001F + +/****** System modal window support *****************************************/ + +HWND WINAPI GetSysModalWindow(void); +HWND WINAPI SetSysModalWindow(HWND); + +/****** Timer support *******************************************************/ + +#ifdef STRICT +typedef void (CALLBACK* TIMERPROC)(HWND, UINT, UINT, DWORD); +#else +typedef FARPROC TIMERPROC; +#endif + +UINT WINAPI SetTimer(HWND, UINT, UINT, TIMERPROC); + +BOOL WINAPI KillTimer(HWND, UINT); + +#define WM_TIMER 0x0113 + +/****** Accelerator support *************************************************/ + +DECLARE_HANDLE(HACCEL); + +HACCEL WINAPI LoadAccelerators(HINSTANCE, LPCSTR); + +#ifndef NOMSG +int WINAPI TranslateAccelerator(HWND, HACCEL, MSG FAR*); +#endif + +/****** Menu support ********************************************************/ + +#ifndef NOMENUS + +/* Menu template header */ +typedef struct +{ + UINT versionNumber; + UINT offset; +} MENUITEMTEMPLATEHEADER; + +/* Menu template item struct */ +typedef struct +{ + UINT mtOption; + UINT mtID; + char mtString[1]; +} MENUITEMTEMPLATE; + +#if (WINVER >= 0x030a) +BOOL WINAPI IsMenu(HMENU); +#endif /* WINVER >= 0x030a */ + +HMENU WINAPI CreateMenu(void); +HMENU WINAPI CreatePopupMenu(void); +HMENU WINAPI LoadMenu(HINSTANCE, LPCSTR); +HMENU WINAPI LoadMenuIndirect(const void FAR*); + +BOOL WINAPI DestroyMenu(HMENU); + +HMENU WINAPI GetMenu(HWND); +BOOL WINAPI SetMenu(HWND, HMENU); + +HMENU WINAPI GetSystemMenu(HWND, BOOL); + +void WINAPI DrawMenuBar(HWND); + +BOOL WINAPI HiliteMenuItem(HWND, HMENU, UINT, UINT); + +BOOL WINAPI InsertMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI AppendMenu(HMENU, UINT, UINT, LPCSTR); +BOOL WINAPI ModifyMenu(HMENU, UINT, UINT, UINT, LPCSTR); +BOOL WINAPI RemoveMenu(HMENU, UINT, UINT); +BOOL WINAPI DeleteMenu(HMENU, UINT, UINT); + +BOOL WINAPI ChangeMenu(HMENU, UINT, LPCSTR, UINT, UINT); + +#define MF_INSERT 0x0000 +#define MF_CHANGE 0x0080 +#define MF_APPEND 0x0100 +#define MF_DELETE 0x0200 +#define MF_REMOVE 0x1000 + +/* Menu flags for Add/Check/EnableMenuItem() */ +#define MF_BYCOMMAND 0x0000 +#define MF_BYPOSITION 0x0400 + +#define MF_SEPARATOR 0x0800 + +#define MF_ENABLED 0x0000 +#define MF_GRAYED 0x0001 +#define MF_DISABLED 0x0002 + +#define MF_UNCHECKED 0x0000 +#define MF_CHECKED 0x0008 +#define MF_USECHECKBITMAPS 0x0200 + +#define MF_STRING 0x0000 +#define MF_BITMAP 0x0004 +#define MF_OWNERDRAW 0x0100 + +#define MF_POPUP 0x0010 +#define MF_MENUBARBREAK 0x0020 +#define MF_MENUBREAK 0x0040 + +#define MF_UNHILITE 0x0000 +#define MF_HILITE 0x0080 + +#define MF_SYSMENU 0x2000 +#define MF_HELP 0x4000 +#define MF_MOUSESELECT 0x8000 + + +#define MF_END 0x0080 /* Only valid in menu resource templates */ + +BOOL WINAPI EnableMenuItem(HMENU, UINT, UINT); +BOOL WINAPI CheckMenuItem(HMENU, UINT, UINT); + +HMENU WINAPI GetSubMenu(HMENU, int); + +int WINAPI GetMenuItemCount(HMENU); +UINT WINAPI GetMenuItemID(HMENU, int); + +int WINAPI GetMenuString(HMENU, UINT, LPSTR, int, UINT); +UINT WINAPI GetMenuState(HMENU, UINT, UINT); + +BOOL WINAPI SetMenuItemBitmaps(HMENU, UINT, UINT, HBITMAP, HBITMAP); +DWORD WINAPI GetMenuCheckMarkDimensions(void); + +BOOL WINAPI TrackPopupMenu(HMENU, UINT, int, int, int, HWND, const RECT FAR*); + +/* Flags for TrackPopupMenu */ +#define TPM_LEFTBUTTON 0x0000 +#if (WINVER >= 0x030a) +#define TPM_RIGHTBUTTON 0x0002 +#define TPM_LEFTALIGN 0x0000 +#define TPM_CENTERALIGN 0x0004 +#define TPM_RIGHTALIGN 0x0008 +#endif /* WINVER >= 0x030a */ + +#endif /* NOMENUS */ + +/* Menu messages */ +#define WM_INITMENU 0x0116 +#define WM_INITMENUPOPUP 0x0117 + +#ifndef NOMENUS + +#define WM_MENUSELECT 0x011F +#define WM_MENUCHAR 0x0120 + +#endif /* NOMENUS */ + +/* Menu and control command messages */ +#define WM_COMMAND 0x0111 + +/****** Scroll bar support **************************************************/ + +#ifndef NOSCROLL + +#define WM_HSCROLL 0x0114 +#define WM_VSCROLL 0x0115 + +/* WM_H/VSCROLL commands */ +#define SB_LINEUP 0 +#define SB_LINELEFT 0 +#define SB_LINEDOWN 1 +#define SB_LINERIGHT 1 +#define SB_PAGEUP 2 +#define SB_PAGELEFT 2 +#define SB_PAGEDOWN 3 +#define SB_PAGERIGHT 3 +#define SB_THUMBPOSITION 4 +#define SB_THUMBTRACK 5 +#define SB_TOP 6 +#define SB_LEFT 6 +#define SB_BOTTOM 7 +#define SB_RIGHT 7 +#define SB_ENDSCROLL 8 + +/* Scroll bar selection constants */ +#define SB_HORZ 0 +#define SB_VERT 1 +#define SB_CTL 2 +#define SB_BOTH 3 + +int WINAPI SetScrollPos(HWND, int, int, BOOL); +int WINAPI GetScrollPos(HWND, int); +void WINAPI SetScrollRange(HWND, int, int, int, BOOL); +void WINAPI GetScrollRange(HWND, int, int FAR*, int FAR*); +void WINAPI ShowScrollBar(HWND, int, BOOL); +BOOL WINAPI EnableScrollBar(HWND, int, UINT); + +/* EnableScrollBar() flags */ +#define ESB_ENABLE_BOTH 0x0000 +#define ESB_DISABLE_BOTH 0x0003 + +#define ESB_DISABLE_LEFT 0x0001 +#define ESB_DISABLE_RIGHT 0x0002 + +#define ESB_DISABLE_UP 0x0001 +#define ESB_DISABLE_DOWN 0x0002 + +#define ESB_DISABLE_LTUP ESB_DISABLE_LEFT +#define ESB_DISABLE_RTDN ESB_DISABLE_RIGHT + +#endif /* NOSCROLL */ + +/******* Clipboard manager **************************************************/ + +#ifndef NOCLIPBOARD + +/* Predefined Clipboard Formats */ +#define CF_TEXT 1 +#define CF_BITMAP 2 +#define CF_METAFILEPICT 3 +#define CF_SYLK 4 +#define CF_DIF 5 +#define CF_TIFF 6 +#define CF_OEMTEXT 7 +#define CF_DIB 8 +#define CF_PALETTE 9 +#define CF_PENDATA 10 +#define CF_RIFF 11 +#define CF_WAVE 12 + +#define CF_OWNERDISPLAY 0x0080 +#define CF_DSPTEXT 0x0081 +#define CF_DSPBITMAP 0x0082 +#define CF_DSPMETAFILEPICT 0x0083 + +/* "Private" formats don't get GlobalFree()'d */ +#define CF_PRIVATEFIRST 0x0200 +#define CF_PRIVATELAST 0x02FF + +/* "GDIOBJ" formats do get DeleteObject()'d */ +#define CF_GDIOBJFIRST 0x0300 +#define CF_GDIOBJLAST 0x03FF + +/* Clipboard Manager Functions */ +BOOL WINAPI OpenClipboard(HWND); +BOOL WINAPI CloseClipboard(void); +BOOL WINAPI EmptyClipboard(void); + +#if (WINVER >= 0x030a) +HWND WINAPI GetOpenClipboardWindow(void); +#endif /* WINVER >= 0x030a */ + +HWND WINAPI GetClipboardOwner(void); + +HWND WINAPI SetClipboardViewer(HWND); +HWND WINAPI GetClipboardViewer(void); + +HANDLE WINAPI SetClipboardData(UINT, HANDLE); +HANDLE WINAPI GetClipboardData(UINT); + +BOOL WINAPI IsClipboardFormatAvailable(UINT); +int WINAPI GetPriorityClipboardFormat(UINT FAR*, int); + +UINT WINAPI RegisterClipboardFormat(LPCSTR); +int WINAPI CountClipboardFormats(void); +UINT WINAPI EnumClipboardFormats(UINT); +int WINAPI GetClipboardFormatName(UINT, LPSTR, int); + +BOOL WINAPI ChangeClipboardChain(HWND, HWND); + +/* Clipboard command messages */ +#define WM_CUT 0x0300 +#define WM_COPY 0x0301 +#define WM_PASTE 0x0302 +#define WM_CLEAR 0x0303 +#define WM_UNDO 0x0304 + +/* Clipboard owner messages */ +#define WM_RENDERFORMAT 0x0305 +#define WM_RENDERALLFORMATS 0x0306 +#define WM_DESTROYCLIPBOARD 0x0307 + +/* Clipboard viewer messages */ +#define WM_DRAWCLIPBOARD 0x0308 +#define WM_PAINTCLIPBOARD 0x0309 +#define WM_SIZECLIPBOARD 0x030B +#define WM_VSCROLLCLIPBOARD 0x030A +#define WM_HSCROLLCLIPBOARD 0x030E +#define WM_ASKCBFORMATNAME 0x030C +#define WM_CHANGECBCHAIN 0x030D + +#endif /* NOCLIPBOARD */ + +/****** Mouse cursor support *************************************************/ + +HCURSOR WINAPI LoadCursor(HINSTANCE, LPCSTR); +HCURSOR WINAPI CreateCursor(HINSTANCE, int, int, int, int, const void FAR*, const void FAR*); +BOOL WINAPI DestroyCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI CopyCursor(HINSTANCE, HCURSOR); +#endif /* WINVER >= 0x030a */ + +int WINAPI ShowCursor(BOOL); + +void WINAPI SetCursorPos(int, int); +void WINAPI GetCursorPos(POINT FAR*); + +HCURSOR WINAPI SetCursor(HCURSOR); + +#if (WINVER >= 0x030a) +HCURSOR WINAPI GetCursor(void); +#endif /* WINVER >= 0x030a */ + +void WINAPI ClipCursor(const RECT FAR*); +#if (WINVER >= 0x030a) +void WINAPI GetClipCursor(RECT FAR*); +#endif /* WINVER >= 0x030a */ + +/* Standard cursor resource IDs */ +#define IDC_ARROW MAKEINTRESOURCE(32512) +#define IDC_IBEAM MAKEINTRESOURCE(32513) +#define IDC_WAIT MAKEINTRESOURCE(32514) +#define IDC_CROSS MAKEINTRESOURCE(32515) +#define IDC_UPARROW MAKEINTRESOURCE(32516) +#define IDC_SIZE MAKEINTRESOURCE(32640) +#define IDC_ICON MAKEINTRESOURCE(32641) +#define IDC_SIZENWSE MAKEINTRESOURCE(32642) +#define IDC_SIZENESW MAKEINTRESOURCE(32643) +#define IDC_SIZEWE MAKEINTRESOURCE(32644) +#define IDC_SIZENS MAKEINTRESOURCE(32645) + +#define WM_SETCURSOR 0x0020 + +/****** Icon support *********************************************************/ + +HICON WINAPI LoadIcon(HINSTANCE, LPCSTR); +HICON WINAPI CreateIcon(HINSTANCE, int, int, BYTE, BYTE, const void FAR*, const void FAR*); +BOOL WINAPI DestroyIcon(HICON); + +#if (WINVER >= 0x030a) +HICON WINAPI CopyIcon(HINSTANCE, HICON); +#endif /* WINVER >= 0x030a */ + +BOOL WINAPI DrawIcon(HDC, int, int, HICON); + +#ifndef NOICONS + +/* Standard icon resource IDs */ +#define IDI_APPLICATION MAKEINTRESOURCE(32512) +#define IDI_HAND MAKEINTRESOURCE(32513) +#define IDI_QUESTION MAKEINTRESOURCE(32514) +#define IDI_EXCLAMATION MAKEINTRESOURCE(32515) +#define IDI_ASTERISK MAKEINTRESOURCE(32516) + +#endif /* NOICONS */ + +/****** Message Box support *************************************************/ + +#ifndef NOMB + +int WINAPI MessageBox(HWND, LPCSTR, LPCSTR, UINT); +void WINAPI MessageBeep(UINT); + +#define MB_OK 0x0000 +#define MB_OKCANCEL 0x0001 +#define MB_ABORTRETRYIGNORE 0x0002 +#define MB_YESNOCANCEL 0x0003 +#define MB_YESNO 0x0004 +#define MB_RETRYCANCEL 0x0005 +#define MB_TYPEMASK 0x000F + +#define MB_ICONHAND 0x0010 +#define MB_ICONQUESTION 0x0020 +#define MB_ICONEXCLAMATION 0x0030 +#define MB_ICONASTERISK 0x0040 +#define MB_ICONMASK 0x00F0 + +#define MB_ICONINFORMATION MB_ICONASTERISK +#define MB_ICONSTOP MB_ICONHAND + +#define MB_DEFBUTTON1 0x0000 +#define MB_DEFBUTTON2 0x0100 +#define MB_DEFBUTTON3 0x0200 +#define MB_DEFMASK 0x0F00 + +#define MB_APPLMODAL 0x0000 +#define MB_SYSTEMMODAL 0x1000 +#define MB_TASKMODAL 0x2000 + +#define MB_NOFOCUS 0x8000 + + + +#endif /* NOMB */ + +/****** Caret support ********************************************************/ + +void WINAPI CreateCaret(HWND, HBITMAP, int, int); +void WINAPI DestroyCaret(void); + +void WINAPI SetCaretPos(int, int); +void WINAPI GetCaretPos(POINT FAR*); + +void WINAPI HideCaret(HWND); +void WINAPI ShowCaret(HWND); + +UINT WINAPI GetCaretBlinkTime(void); +void WINAPI SetCaretBlinkTime(UINT); + +/****** WM_SYSCOMMAND support ***********************************************/ + +#define WM_SYSCOMMAND 0x0112 + +#ifndef NOSYSCOMMANDS + +/* System Menu Command Values */ +#define SC_SIZE 0xF000 +#define SC_MOVE 0xF010 +#define SC_MINIMIZE 0xF020 +#define SC_MAXIMIZE 0xF030 +#define SC_NEXTWINDOW 0xF040 +#define SC_PREVWINDOW 0xF050 +#define SC_CLOSE 0xF060 +#define SC_VSCROLL 0xF070 +#define SC_HSCROLL 0xF080 +#define SC_MOUSEMENU 0xF090 +#define SC_KEYMENU 0xF100 +#define SC_ARRANGE 0xF110 +#define SC_RESTORE 0xF120 +#define SC_TASKLIST 0xF130 +#define SC_SCREENSAVE 0xF140 +#define SC_HOTKEY 0xF150 + +/* Obsolete names */ +#define SC_ICON SC_MINIMIZE +#define SC_ZOOM SC_MAXIMIZE + + +#endif /* NOSYSCOMMANDS */ + +/****** MDI Support *********************************************************/ + +#ifndef NOMDI + +/* CreateWindow lpParams structure for creating MDI client */ +typedef struct tagCLIENTCREATESTRUCT +{ + HMENU hWindowMenu; + UINT idFirstChild; +} CLIENTCREATESTRUCT; +typedef CLIENTCREATESTRUCT FAR* LPCLIENTCREATESTRUCT; + +/* MDI client style bits */ +#if (WINVER >= 0x030a) +#define MDIS_ALLCHILDSTYLES 0x0001 +#endif /* WINVER >= 0x030a */ + +/* MDI messages */ +#define WM_MDICREATE 0x0220 +#define WM_MDIDESTROY 0x0221 +#define WM_MDIACTIVATE 0x0222 +#define WM_MDIRESTORE 0x0223 +#define WM_MDINEXT 0x0224 +#define WM_MDIMAXIMIZE 0x0225 +#define WM_MDITILE 0x0226 +#define WM_MDICASCADE 0x0227 +#define WM_MDIICONARRANGE 0x0228 +#define WM_MDIGETACTIVE 0x0229 +#define WM_MDISETMENU 0x0230 + +/* WM_MDICREATE message structure */ +typedef struct tagMDICREATESTRUCT +{ + LPCSTR szClass; + LPCSTR szTitle; + HINSTANCE hOwner; + int x; + int y; + int cx; + int cy; + DWORD style; + LPARAM lParam; +} MDICREATESTRUCT; +typedef MDICREATESTRUCT FAR* LPMDICREATESTRUCT; + +#if (WINVER >= 0x030a) +/* wParam values for WM_MDITILE and WM_MDICASCADE messages. */ +#define MDITILE_VERTICAL 0x0000 +#define MDITILE_HORIZONTAL 0x0001 +#define MDITILE_SKIPDISABLED 0x0002 +#endif /* WINVER >= 0x030a */ + +#define WM_CHILDACTIVATE 0x0022 + +LRESULT WINAPI DefFrameProc(HWND, HWND, UINT, WPARAM, LPARAM); +LRESULT WINAPI DefMDIChildProc(HWND, UINT, WPARAM, LPARAM); + +#ifndef NOMSG +BOOL WINAPI TranslateMDISysAccel(HWND, MSG FAR*); +#endif + +UINT WINAPI ArrangeIconicWindows(HWND); + +#endif /* NOMDI */ + +/****** Dialog and Control Management ***************************************/ + +#ifndef NOCTLMGR + +/* Dialog window class */ +#define WC_DIALOG (MAKEINTATOM(0x8002)) + +/* cbWndExtra bytes needed by dialog manager for dialog classes */ +#define DLGWINDOWEXTRA 30 + +/* Dialog styles */ +#define DS_ABSALIGN 0x01L +#define DS_SYSMODAL 0x02L +#define DS_LOCALEDIT 0x20L +#define DS_SETFONT 0x40L +#define DS_MODALFRAME 0x80L +#define DS_NOIDLEMSG 0x100L + +/* Dialog messages */ +#define DM_GETDEFID (WM_USER+0) +#define DM_SETDEFID (WM_USER+1) + +/* Returned in HIWORD() of DM_GETDEFID result if msg is supported */ +#define DC_HASDEFID 0x534B + +#endif /* NOCTLMGR */ + +/* Dialog notification messages */ +#define WM_INITDIALOG 0x0110 +#define WM_NEXTDLGCTL 0x0028 + +#define WM_PARENTNOTIFY 0x0210 + +#define WM_ENTERIDLE 0x0121 + + +#ifndef NOCTLMGR + +#ifdef STRICT +typedef BOOL (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM); +#else +typedef FARPROC DLGPROC; +#endif + +/* Get/SetWindowWord/Long offsets for use with WC_DIALOG windows */ +#define DWL_MSGRESULT 0 +#define DWL_DLGPROC 4 +#define DWL_USER 8 + +#ifndef NOMSG +BOOL WINAPI IsDialogMessage(HWND, MSG FAR*); +#endif + +LRESULT WINAPI DefDlgProc(HWND, UINT, WPARAM, LPARAM); + +HWND WINAPI CreateDialog(HINSTANCE, LPCSTR, HWND, DLGPROC); +HWND WINAPI CreateDialogIndirect(HINSTANCE, const void FAR*, HWND, DLGPROC); +HWND WINAPI CreateDialogParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +HWND WINAPI CreateDialogIndirectParam(HINSTANCE, const void FAR*, HWND, DLGPROC, LPARAM); + +int WINAPI DialogBox(HINSTANCE, LPCSTR, HWND, DLGPROC); +int WINAPI DialogBoxIndirect(HINSTANCE, HGLOBAL, HWND, DLGPROC); +int WINAPI DialogBoxParam(HINSTANCE, LPCSTR, HWND, DLGPROC, LPARAM); +int WINAPI DialogBoxIndirectParam(HINSTANCE, HGLOBAL, HWND, DLGPROC, LPARAM); + +void WINAPI EndDialog(HWND, int); + +int WINAPI GetDlgCtrlID(HWND); +HWND WINAPI GetDlgItem(HWND, int); +LRESULT WINAPI SendDlgItemMessage(HWND, int, UINT, WPARAM, LPARAM); + +void WINAPI SetDlgItemInt(HWND, int, UINT, BOOL); +UINT WINAPI GetDlgItemInt(HWND, int, BOOL FAR* , BOOL); + +void WINAPI SetDlgItemText(HWND, int, LPCSTR); +int WINAPI GetDlgItemText(HWND, int, LPSTR, int); + +void WINAPI CheckDlgButton(HWND, int, UINT); +void WINAPI CheckRadioButton(HWND, int, int, int); +UINT WINAPI IsDlgButtonChecked(HWND, int); + +HWND WINAPI GetNextDlgGroupItem(HWND, HWND, BOOL); +HWND WINAPI GetNextDlgTabItem(HWND, HWND, BOOL); + +void WINAPI MapDialogRect(HWND, RECT FAR*); +DWORD WINAPI GetDialogBaseUnits(void); + +#define WM_GETDLGCODE 0x0087 + +/* dialog codes */ +#define DLGC_WANTARROWS 0x0001 +#define DLGC_WANTTAB 0x0002 +#define DLGC_WANTALLKEYS 0x0004 +#define DLGC_WANTMESSAGE 0x0004 +#define DLGC_HASSETSEL 0x0008 +#define DLGC_DEFPUSHBUTTON 0x0010 +#define DLGC_UNDEFPUSHBUTTON 0x0020 +#define DLGC_RADIOBUTTON 0x0040 +#define DLGC_WANTCHARS 0x0080 +#define DLGC_STATIC 0x0100 +#define DLGC_BUTTON 0x2000 + +#define WM_CTLCOLOR 0x0019 + +/* WM_CTLCOLOR control IDs */ +#define CTLCOLOR_MSGBOX 0 +#define CTLCOLOR_EDIT 1 +#define CTLCOLOR_LISTBOX 2 +#define CTLCOLOR_BTN 3 +#define CTLCOLOR_DLG 4 +#define CTLCOLOR_SCROLLBAR 5 +#define CTLCOLOR_STATIC 6 + +#define WM_SETFONT 0x0030 +#define WM_GETFONT 0x0031 + +#endif /* NOCTLMGR */ + +/* Standard dialog button IDs */ +#define IDOK 1 +#define IDCANCEL 2 +#define IDABORT 3 +#define IDRETRY 4 +#define IDIGNORE 5 +#define IDYES 6 +#define IDNO 7 + +/****** Owner draw control support ******************************************/ + +/* Owner draw control types */ +#define ODT_MENU 1 +#define ODT_LISTBOX 2 +#define ODT_COMBOBOX 3 +#define ODT_BUTTON 4 + +/* Owner draw actions */ +#define ODA_DRAWENTIRE 0x0001 +#define ODA_SELECT 0x0002 +#define ODA_FOCUS 0x0004 + +/* Owner draw state */ +#define ODS_SELECTED 0x0001 +#define ODS_GRAYED 0x0002 +#define ODS_DISABLED 0x0004 +#define ODS_CHECKED 0x0008 +#define ODS_FOCUS 0x0010 + +#define WM_DRAWITEM 0x002B + +typedef struct tagDRAWITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemAction; + UINT itemState; + HWND hwndItem; + HDC hDC; + RECT rcItem; + DWORD itemData; +} DRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT; +typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT; + +#define WM_MEASUREITEM 0x002C + +typedef struct tagMEASUREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + UINT itemWidth; + UINT itemHeight; + DWORD itemData; +} MEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT; +typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT; + +#define WM_DELETEITEM 0x002D + +typedef struct tagDELETEITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + UINT itemID; + HWND hwndItem; + DWORD itemData; +} DELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT; +typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT; + +#define WM_COMPAREITEM 0x0039 + +typedef struct tagCOMPAREITEMSTRUCT +{ + UINT CtlType; + UINT CtlID; + HWND hwndItem; + UINT itemID1; + DWORD itemData1; + UINT itemID2; + DWORD itemData2; +} COMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT; +typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT; + +/****** Static control ******************************************************/ + +#ifndef NOCTLMGR + +/* Static Control Styles */ +#define SS_LEFT 0x00000000L +#define SS_CENTER 0x00000001L +#define SS_RIGHT 0x00000002L +#define SS_ICON 0x00000003L +#define SS_BLACKRECT 0x00000004L +#define SS_GRAYRECT 0x00000005L +#define SS_WHITERECT 0x00000006L +#define SS_BLACKFRAME 0x00000007L +#define SS_GRAYFRAME 0x00000008L +#define SS_WHITEFRAME 0x00000009L +#define SS_SIMPLE 0x0000000BL +#define SS_LEFTNOWORDWRAP 0x0000000CL +#define SS_NOPREFIX 0x00000080L + +#if (WINVER >= 0x030a) +#ifndef NOWINMESSAGES +/* Static Control Mesages */ +#define STM_SETICON (WM_USER+0) +#define STM_GETICON (WM_USER+1) +#endif /* NOWINMESSAGES */ +#endif /* WINVER >= 0x030a */ + +#endif /* NOCTLMGR */ + +/****** Button control *****************************************************/ + +#ifndef NOCTLMGR + +/* Button Control Styles */ +#define BS_PUSHBUTTON 0x00000000L +#define BS_DEFPUSHBUTTON 0x00000001L +#define BS_CHECKBOX 0x00000002L +#define BS_AUTOCHECKBOX 0x00000003L +#define BS_RADIOBUTTON 0x00000004L +#define BS_3STATE 0x00000005L +#define BS_AUTO3STATE 0x00000006L +#define BS_GROUPBOX 0x00000007L +#define BS_USERBUTTON 0x00000008L +#define BS_AUTORADIOBUTTON 0x00000009L +#define BS_OWNERDRAW 0x0000000BL +#define BS_LEFTTEXT 0x00000020L + +/* Button Control Messages */ +#define BM_GETCHECK (WM_USER+0) +#define BM_SETCHECK (WM_USER+1) +#define BM_GETSTATE (WM_USER+2) +#define BM_SETSTATE (WM_USER+3) +#define BM_SETSTYLE (WM_USER+4) + +/* User Button Notification Codes */ +#define BN_CLICKED 0 +#define BN_PAINT 1 +#define BN_HILITE 2 +#define BN_UNHILITE 3 +#define BN_DISABLE 4 +#define BN_DOUBLECLICKED 5 + +#endif /* NOCTLMGR */ + +/****** Edit control *******************************************************/ + +#ifndef NOCTLMGR + +/* Edit control styles */ +#ifndef NOWINSTYLES +#define ES_LEFT 0x00000000L +#define ES_CENTER 0x00000001L +#define ES_RIGHT 0x00000002L +#define ES_MULTILINE 0x00000004L +#define ES_UPPERCASE 0x00000008L +#define ES_LOWERCASE 0x00000010L +#define ES_PASSWORD 0x00000020L +#define ES_AUTOVSCROLL 0x00000040L +#define ES_AUTOHSCROLL 0x00000080L +#define ES_NOHIDESEL 0x00000100L +#define ES_OEMCONVERT 0x00000400L +#if (WINVER >= 0x030a) +#define ES_READONLY 0x00000800L +#define ES_WANTRETURN 0x00001000L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Edit control messages */ +#ifndef NOWINMESSAGES +#define EM_GETSEL (WM_USER+0) +#define EM_SETSEL (WM_USER+1) +#define EM_GETRECT (WM_USER+2) +#define EM_SETRECT (WM_USER+3) +#define EM_SETRECTNP (WM_USER+4) +#define EM_LINESCROLL (WM_USER+6) +#define EM_GETMODIFY (WM_USER+8) +#define EM_SETMODIFY (WM_USER+9) +#define EM_GETLINECOUNT (WM_USER+10) +#define EM_LINEINDEX (WM_USER+11) +#define EM_SETHANDLE (WM_USER+12) +#define EM_GETHANDLE (WM_USER+13) +#define EM_LINELENGTH (WM_USER+17) +#define EM_REPLACESEL (WM_USER+18) +#define EM_SETFONT (WM_USER+19) /* NOT IMPLEMENTED: use WM_SETFONT */ +#define EM_GETLINE (WM_USER+20) +#define EM_LIMITTEXT (WM_USER+21) +#define EM_CANUNDO (WM_USER+22) +#define EM_UNDO (WM_USER+23) +#define EM_FMTLINES (WM_USER+24) +#define EM_LINEFROMCHAR (WM_USER+25) +#define EM_SETWORDBREAK (WM_USER+26) /* NOT IMPLEMENTED: use EM_SETWORDBREAK */ +#define EM_SETTABSTOPS (WM_USER+27) +#define EM_SETPASSWORDCHAR (WM_USER+28) +#define EM_EMPTYUNDOBUFFER (WM_USER+29) +#if (WINVER >= 0x030a) +#define EM_GETFIRSTVISIBLELINE (WM_USER+30) +#define EM_SETREADONLY (WM_USER+31) +#define EM_SETWORDBREAKPROC (WM_USER+32) +#define EM_GETWORDBREAKPROC (WM_USER+33) +#define EM_GETPASSWORDCHAR (WM_USER+34) +#endif /* WINVER >= 0x030a */ +#endif /* NOWINMESSAGES */ + +#if (WINVER >= 0x030a) +typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code); + +/* EDITWORDBREAKPROC code values */ +#define WB_LEFT 0 +#define WB_RIGHT 1 +#define WB_ISDELIMITER 2 +#endif /* WINVER >= 0x030a */ + +/* Edit control notification codes */ +#define EN_SETFOCUS 0x0100 +#define EN_KILLFOCUS 0x0200 +#define EN_CHANGE 0x0300 +#define EN_UPDATE 0x0400 +#define EN_ERRSPACE 0x0500 +#define EN_MAXTEXT 0x0501 +#define EN_HSCROLL 0x0601 +#define EN_VSCROLL 0x0602 + +#endif /* NOCTLMGR */ + +/****** Scroll bar control *************************************************/ +/* Also see scrolling support */ + +#ifndef NOCTLMGR + +#ifndef NOWINSTYLES + +/* Scroll bar styles */ +#define SBS_HORZ 0x0000L +#define SBS_VERT 0x0001L +#define SBS_TOPALIGN 0x0002L +#define SBS_LEFTALIGN 0x0002L +#define SBS_BOTTOMALIGN 0x0004L +#define SBS_RIGHTALIGN 0x0004L +#define SBS_SIZEBOXTOPLEFTALIGN 0x0002L +#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L +#define SBS_SIZEBOX 0x0008L + +#endif /* NOWINSTYLES */ + +#endif /* NOCTLMGR */ + +/****** Listbox control ****************************************************/ + +#ifndef NOCTLMGR + +/* Listbox styles */ +#ifndef NOWINSTYLES +#define LBS_NOTIFY 0x0001L +#define LBS_SORT 0x0002L +#define LBS_NOREDRAW 0x0004L +#define LBS_MULTIPLESEL 0x0008L +#define LBS_OWNERDRAWFIXED 0x0010L +#define LBS_OWNERDRAWVARIABLE 0x0020L +#define LBS_HASSTRINGS 0x0040L +#define LBS_USETABSTOPS 0x0080L +#define LBS_NOINTEGRALHEIGHT 0x0100L +#define LBS_MULTICOLUMN 0x0200L +#define LBS_WANTKEYBOARDINPUT 0x0400L +#define LBS_EXTENDEDSEL 0x0800L +#if (WINVER >= 0x030a) +#define LBS_DISABLENOSCROLL 0x1000L +#endif /* WINVER >= 0x030a */ +#define LBS_STANDARD (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER) +#endif /* NOWINSTYLES */ + +/* Listbox messages */ +#ifndef NOWINMESSAGES +#define LB_ADDSTRING (WM_USER+1) +#define LB_INSERTSTRING (WM_USER+2) +#define LB_DELETESTRING (WM_USER+3) +#define LB_RESETCONTENT (WM_USER+5) +#define LB_SETSEL (WM_USER+6) +#define LB_SETCURSEL (WM_USER+7) +#define LB_GETSEL (WM_USER+8) +#define LB_GETCURSEL (WM_USER+9) +#define LB_GETTEXT (WM_USER+10) +#define LB_GETTEXTLEN (WM_USER+11) +#define LB_GETCOUNT (WM_USER+12) +#define LB_SELECTSTRING (WM_USER+13) +#define LB_DIR (WM_USER+14) +#define LB_GETTOPINDEX (WM_USER+15) +#define LB_FINDSTRING (WM_USER+16) +#define LB_GETSELCOUNT (WM_USER+17) +#define LB_GETSELITEMS (WM_USER+18) +#define LB_SETTABSTOPS (WM_USER+19) +#define LB_GETHORIZONTALEXTENT (WM_USER+20) +#define LB_SETHORIZONTALEXTENT (WM_USER+21) +#define LB_SETCOLUMNWIDTH (WM_USER+22) +#define LB_SETTOPINDEX (WM_USER+24) +#define LB_GETITEMRECT (WM_USER+25) +#define LB_GETITEMDATA (WM_USER+26) +#define LB_SETITEMDATA (WM_USER+27) +#define LB_SELITEMRANGE (WM_USER+28) +#define LB_SETCARETINDEX (WM_USER+31) +#define LB_GETCARETINDEX (WM_USER+32) + +#if (WINVER >= 0x030a) +#define LB_SETITEMHEIGHT (WM_USER+33) +#define LB_GETITEMHEIGHT (WM_USER+34) +#define LB_FINDSTRINGEXACT (WM_USER+35) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Listbox notification codes */ +#define LBN_ERRSPACE (-2) +#define LBN_SELCHANGE 1 +#define LBN_DBLCLK 2 +#define LBN_SELCANCEL 3 +#define LBN_SETFOCUS 4 +#define LBN_KILLFOCUS 5 + +/* Listbox notification messages */ +#define WM_VKEYTOITEM 0x002E +#define WM_CHARTOITEM 0x002F + +/* Listbox message return values */ +#define LB_OKAY 0 +#define LB_ERR (-1) +#define LB_ERRSPACE (-2) + +#define LB_CTLCODE 0L + +/****** Dialog directory support ********************************************/ + +int WINAPI DlgDirList(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelect(HWND, LPSTR, int); + +int WINAPI DlgDirListComboBox(HWND, LPSTR, int, int, UINT); +BOOL WINAPI DlgDirSelectComboBox(HWND, LPSTR, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI DlgDirSelectEx(HWND, LPSTR, int, int); +BOOL WINAPI DlgDirSelectComboBoxEx(HWND, LPSTR, int, int); +#endif /* WINVER >= 0x030a */ + + +/* DlgDirList, DlgDirListComboBox flags values */ +#define DDL_READWRITE 0x0000 +#define DDL_READONLY 0x0001 +#define DDL_HIDDEN 0x0002 +#define DDL_SYSTEM 0x0004 +#define DDL_DIRECTORY 0x0010 +#define DDL_ARCHIVE 0x0020 + +#define DDL_POSTMSGS 0x2000 +#define DDL_DRIVES 0x4000 +#define DDL_EXCLUSIVE 0x8000 + +#endif /* NOCTLMGR */ + +/****** Combo box control **************************************************/ + +#ifndef NOCTLMGR + +/* Combo box styles */ +#ifndef NOWINSTYLES +#define CBS_SIMPLE 0x0001L +#define CBS_DROPDOWN 0x0002L +#define CBS_DROPDOWNLIST 0x0003L +#define CBS_OWNERDRAWFIXED 0x0010L +#define CBS_OWNERDRAWVARIABLE 0x0020L +#define CBS_AUTOHSCROLL 0x0040L +#define CBS_OEMCONVERT 0x0080L +#define CBS_SORT 0x0100L +#define CBS_HASSTRINGS 0x0200L +#define CBS_NOINTEGRALHEIGHT 0x0400L +#if (WINVER >= 0x030a) +#define CBS_DISABLENOSCROLL 0x0800L +#endif /* WINVER >= 0x030a */ +#endif /* NOWINSTYLES */ + +/* Combo box messages */ +#ifndef NOWINMESSAGES +#define CB_GETEDITSEL (WM_USER+0) +#define CB_LIMITTEXT (WM_USER+1) +#define CB_SETEDITSEL (WM_USER+2) +#define CB_ADDSTRING (WM_USER+3) +#define CB_DELETESTRING (WM_USER+4) +#define CB_DIR (WM_USER+5) +#define CB_GETCOUNT (WM_USER+6) +#define CB_GETCURSEL (WM_USER+7) +#define CB_GETLBTEXT (WM_USER+8) +#define CB_GETLBTEXTLEN (WM_USER+9) +#define CB_INSERTSTRING (WM_USER+10) +#define CB_RESETCONTENT (WM_USER+11) +#define CB_FINDSTRING (WM_USER+12) +#define CB_SELECTSTRING (WM_USER+13) +#define CB_SETCURSEL (WM_USER+14) +#define CB_SHOWDROPDOWN (WM_USER+15) +#define CB_GETITEMDATA (WM_USER+16) +#define CB_SETITEMDATA (WM_USER+17) +#if (WINVER >= 0x030a) +#define CB_GETDROPPEDCONTROLRECT (WM_USER+18) +#define CB_SETITEMHEIGHT (WM_USER+19) +#define CB_GETITEMHEIGHT (WM_USER+20) +#define CB_SETEXTENDEDUI (WM_USER+21) +#define CB_GETEXTENDEDUI (WM_USER+22) +#define CB_GETDROPPEDSTATE (WM_USER+23) +#define CB_FINDSTRINGEXACT (WM_USER+24) +#endif /* WINVER >= 0x030a */ + +#endif /* NOWINMESSAGES */ + +/* Combo box notification codes */ +#define CBN_ERRSPACE (-1) +#define CBN_SELCHANGE 1 +#define CBN_DBLCLK 2 +#define CBN_SETFOCUS 3 +#define CBN_KILLFOCUS 4 +#define CBN_EDITCHANGE 5 +#define CBN_EDITUPDATE 6 +#define CBN_DROPDOWN 7 +#if (WINVER >= 0x030a) +#define CBN_CLOSEUP 8 +#define CBN_SELENDOK 9 +#define CBN_SELENDCANCEL 10 +#endif /* WINVER >= 0x030a */ + +/* Combo box message return values */ +#define CB_OKAY 0 +#define CB_ERR (-1) +#define CB_ERRSPACE (-2) + +#endif /* NOCTLMGR */ + +/******* Windows hook support **********************************************/ + +#ifndef NOWH + +DECLARE_HANDLE32(HHOOK); + +#ifdef STRICT +typedef LRESULT (CALLBACK* HOOKPROC)(int code, WPARAM wParam, LPARAM lParam); +#else +typedef FARPROC HOOKPROC; +#endif + +#ifdef STRICT +HHOOK WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HHOOK FAR*); +#else +HOOKPROC WINAPI SetWindowsHook(int, HOOKPROC); +LRESULT WINAPI DefHookProc(int, WPARAM, LPARAM, HOOKPROC FAR*); +#endif +BOOL WINAPI UnhookWindowsHook(int, HOOKPROC); + +#if (WINVER >= 0x030a) + +HHOOK WINAPI SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hInstance, HTASK hTask); +BOOL WINAPI UnhookWindowsHookEx(HHOOK hHook); +LRESULT WINAPI CallNextHookEx(HHOOK hHook, int code, WPARAM wParam, LPARAM lParam); + +#endif /* WINVER >= 0x030a */ + + +/* Standard hook code */ +#define HC_ACTION 0 + +/* Obsolete hook codes (NO LONGER SUPPORTED) */ +#define HC_GETLPLPFN (-3) +#define HC_LPLPFNNEXT (-2) +#define HC_LPFNNEXT (-1) + +#endif /* NOWH */ + +/****** Computer-based-training (CBT) support *******************************/ + +#define WM_QUEUESYNC 0x0023 + +#ifndef NOWH + +/* SetWindowsHook() code */ +#define WH_CBT 5 + +#define HCBT_MOVESIZE 0 +#define HCBT_MINMAX 1 +#define HCBT_QS 2 +#define HCBT_CREATEWND 3 +#define HCBT_DESTROYWND 4 +#define HCBT_ACTIVATE 5 +#define HCBT_CLICKSKIPPED 6 +#define HCBT_KEYSKIPPED 7 +#define HCBT_SYSCOMMAND 8 +#define HCBT_SETFOCUS 9 + +#if (WINVER >= 0x030a) +/* HCBT_CREATEWND parameters pointed to by lParam */ +typedef struct tagCBT_CREATEWND +{ + CREATESTRUCT FAR* lpcs; + HWND hwndInsertAfter; +} CBT_CREATEWND; +typedef CBT_CREATEWND FAR* LPCBT_CREATEWND; + +/* HCBT_ACTIVATE structure pointed to by lParam */ +typedef struct tagCBTACTIVATESTRUCT +{ + BOOL fMouse; + HWND hWndActive; +} CBTACTIVATESTRUCT; + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Hardware hook support ***********************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +#define WH_HARDWARE 8 + +typedef struct tagHARDWAREHOOKSTRUCT +{ + HWND hWnd; + UINT wMessage; + WPARAM wParam; + LPARAM lParam; +} HARDWAREHOOKSTRUCT; +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Shell support *******************************************************/ + +#ifndef NOWH +#if (WINVER >= 0x030a) +/* SetWindowsHook() Shell hook code */ +#define WH_SHELL 10 + +#define HSHELL_WINDOWCREATED 1 +#define HSHELL_WINDOWDESTROYED 2 +#define HSHELL_ACTIVATESHELLWINDOW 3 + +#endif /* WINVER >= 0x030a */ +#endif /* NOWH */ + +/****** Journalling support *************************************************/ + +#ifndef NOWH +#define WH_JOURNALRECORD 0 +#define WH_JOURNALPLAYBACK 1 + +/* Journalling hook codes */ +#define HC_GETNEXT 1 +#define HC_SKIP 2 +#define HC_NOREMOVE 3 +#define HC_NOREM HC_NOREMOVE +#define HC_SYSMODALON 4 +#define HC_SYSMODALOFF 5 + +/* Journalling message structure */ +typedef struct tagEVENTMSG +{ + UINT message; + UINT paramL; + UINT paramH; + DWORD time; +} EVENTMSG; +typedef EVENTMSG *PEVENTMSG; +typedef EVENTMSG NEAR* NPEVENTMSG; +typedef EVENTMSG FAR* LPEVENTMSG; + +BOOL WINAPI EnableHardwareInput(BOOL); + +#endif /* NOWH */ + + +/****** Debugger support ****************************************************/ + +#if (WINVER >= 0x030a) +/* SetWindowsHook debug hook support */ +#define WH_DEBUG 9 + +typedef struct tagDEBUGHOOKINFO +{ + HMODULE hModuleHook; + LPARAM reserved; + LPARAM lParam; + WPARAM wParam; + int code; +} DEBUGHOOKINFO; +typedef DEBUGHOOKINFO FAR* LPDEBUGHOOKINFO; + +#ifndef NOMSG +BOOL WINAPI QuerySendMessage(HANDLE h1, HANDLE h2, HANDLE h3, LPMSG lpmsg); +#endif /* NOMSG */ + +BOOL WINAPI LockInput(HANDLE h1, HWND hwndInput, BOOL fLock); + +LONG WINAPI GetSystemDebugState(void); +/* Flags returned by GetSystemDebugState. + */ +#define SDS_MENU 0x0001 +#define SDS_SYSMODAL 0x0002 +#define SDS_NOTASKQUEUE 0x0004 +#define SDS_DIALOG 0x0008 +#define SDS_TASKLOCKED 0x0010 +#endif /* WINVER >= 0x030a */ + +/****** Help support ********************************************************/ + +#ifndef NOHELP + +BOOL WINAPI WinHelp(HWND hwndMain, LPCSTR lpszHelp, UINT usCommand, DWORD ulData); + +/* WinHelp() commands */ +#define HELP_CONTEXT 0x0001 +#define HELP_QUIT 0x0002 +#define HELP_INDEX 0x0003 +#define HELP_CONTENTS 0x0003 +#define HELP_HELPONHELP 0x0004 +#define HELP_SETINDEX 0x0005 +#define HELP_SETCONTENTS 0x0005 +#define HELP_CONTEXTPOPUP 0x0008 +#define HELP_FORCEFILE 0x0009 +#define HELP_KEY 0x0101 +#define HELP_COMMAND 0x0102 +#define HELP_PARTIALKEY 0x0105 +#define HELP_MULTIKEY 0x0201 +#define HELP_SETWINPOS 0x0203 + +typedef struct tagMULTIKEYHELP +{ + UINT mkSize; + BYTE mkKeylist; + BYTE szKeyphrase[1]; +} MULTIKEYHELP; + + +typedef struct +{ + int wStructSize; + int x; + int y; + int dx; + int dy; + int wMax; + char rgchMember[2]; +} HELPWININFO; +typedef HELPWININFO NEAR* PHELPWININFO; +typedef HELPWININFO FAR* LPHELPWININFO; + +#endif /* NOHELP */ + +/****** Sound support ******************************************************/ + +#ifndef NOSOUND + +int WINAPI OpenSound(void); +void WINAPI CloseSound(void); + +int WINAPI StartSound(void); +int WINAPI StopSound(void); + +int WINAPI SetVoiceQueueSize(int, int); +int WINAPI SetVoiceNote(int, int, int, int); +int WINAPI SetVoiceAccent(int, int, int, int, int); +int WINAPI SetVoiceEnvelope(int, int, int); +int WINAPI SetVoiceSound(int, DWORD, int); + +int WINAPI SetVoiceThreshold(int, int); +int FAR* WINAPI GetThresholdEvent(void); +int WINAPI GetThresholdStatus(void); + +int WINAPI SetSoundNoise(int, int); + +/* SetSoundNoise() Sources */ +#define S_PERIOD512 0 +#define S_PERIOD1024 1 +#define S_PERIOD2048 2 +#define S_PERIODVOICE 3 +#define S_WHITE512 4 +#define S_WHITE1024 5 +#define S_WHITE2048 6 +#define S_WHITEVOICE 7 + +int WINAPI WaitSoundState(int); + +/* WaitSoundState() constants */ +#define S_QUEUEEMPTY 0 +#define S_THRESHOLD 1 +#define S_ALLTHRESHOLD 2 + +int WINAPI SyncAllVoices(void); +int WINAPI CountVoiceNotes(int); + +/* Accent Modes */ +#define S_NORMAL 0 +#define S_LEGATO 1 +#define S_STACCATO 2 + +/* Error return values */ +#define S_SERDVNA (-1) +#define S_SEROFM (-2) +#define S_SERMACT (-3) +#define S_SERQFUL (-4) +#define S_SERBDNT (-5) +#define S_SERDLN (-6) +#define S_SERDCC (-7) +#define S_SERDTP (-8) +#define S_SERDVL (-9) +#define S_SERDMD (-10) +#define S_SERDSH (-11) +#define S_SERDPT (-12) +#define S_SERDFQ (-13) +#define S_SERDDR (-14) +#define S_SERDSR (-15) +#define S_SERDST (-16) + +#endif /* NOSOUND */ + +/****** Comm support ******************************************************/ + +#ifndef NOCOMM + +#define NOPARITY 0 +#define ODDPARITY 1 +#define EVENPARITY 2 +#define MARKPARITY 3 +#define SPACEPARITY 4 + +#define ONESTOPBIT 0 +#define ONE5STOPBITS 1 +#define TWOSTOPBITS 2 + +#define IGNORE 0 +#define INFINITE 0xFFFF + +/* Error Flags */ +#define CE_RXOVER 0x0001 +#define CE_OVERRUN 0x0002 +#define CE_RXPARITY 0x0004 +#define CE_FRAME 0x0008 +#define CE_BREAK 0x0010 +#define CE_CTSTO 0x0020 +#define CE_DSRTO 0x0040 +#define CE_RLSDTO 0x0080 +#define CE_TXFULL 0x0100 +#define CE_PTO 0x0200 +#define CE_IOE 0x0400 +#define CE_DNS 0x0800 +#define CE_OOP 0x1000 +#define CE_MODE 0x8000 + +#define IE_BADID (-1) +#define IE_OPEN (-2) +#define IE_NOPEN (-3) +#define IE_MEMORY (-4) +#define IE_DEFAULT (-5) +#define IE_HARDWARE (-10) +#define IE_BYTESIZE (-11) +#define IE_BAUDRATE (-12) + +/* Events */ +#define EV_RXCHAR 0x0001 +#define EV_RXFLAG 0x0002 +#define EV_TXEMPTY 0x0004 +#define EV_CTS 0x0008 +#define EV_DSR 0x0010 +#define EV_RLSD 0x0020 +#define EV_BREAK 0x0040 +#define EV_ERR 0x0080 +#define EV_RING 0x0100 +#define EV_PERR 0x0200 +#define EV_CTSS 0x0400 +#define EV_DSRS 0x0800 +#define EV_RLSDS 0x1000 +#define EV_RingTe 0x2000 +#define EV_RINGTE EV_RingTe + +/* Escape Functions */ +#define SETXOFF 1 +#define SETXON 2 +#define SETRTS 3 +#define CLRRTS 4 +#define SETDTR 5 +#define CLRDTR 6 +#define RESETDEV 7 + +#define LPTx 0x80 + +#if (WINVER >= 0x030a) + +/* new escape functions */ +#define GETMAXLPT 8 +#define GETMAXCOM 9 +#define GETBASEIRQ 10 + +/* Comm Baud Rate indices */ +#define CBR_110 0xFF10 +#define CBR_300 0xFF11 +#define CBR_600 0xFF12 +#define CBR_1200 0xFF13 +#define CBR_2400 0xFF14 +#define CBR_4800 0xFF15 +#define CBR_9600 0xFF16 +#define CBR_14400 0xFF17 +#define CBR_19200 0xFF18 +#define CBR_38400 0xFF1B +#define CBR_56000 0xFF1F +#define CBR_128000 0xFF23 +#define CBR_256000 0xFF27 + +/* notifications passed in low word of lParam on WM_COMMNOTIFY messages */ +#define CN_RECEIVE 0x0001 +#define CN_TRANSMIT 0x0002 +#define CN_EVENT 0x0004 + +#endif /* WINVER >= 0x030a */ + +typedef struct tagDCB +{ + BYTE Id; + UINT BaudRate; + BYTE ByteSize; + BYTE Parity; + BYTE StopBits; + UINT RlsTimeout; + UINT CtsTimeout; + UINT DsrTimeout; + + UINT fBinary :1; + UINT fRtsDisable :1; + UINT fParity :1; + UINT fOutxCtsFlow :1; + UINT fOutxDsrFlow :1; + UINT fDummy :2; + UINT fDtrDisable :1; + + UINT fOutX :1; + UINT fInX :1; + UINT fPeChar :1; + UINT fNull :1; + UINT fChEvt :1; + UINT fDtrflow :1; + UINT fRtsflow :1; + UINT fDummy2 :1; + + char XonChar; + char XoffChar; + UINT XonLim; + UINT XoffLim; + char PeChar; + char EofChar; + char EvtChar; + UINT TxDelay; +} DCB; +typedef DCB FAR* LPDCB; + +#if (defined(STRICT) | (WINVER >= 0x030a)) + +typedef struct tagCOMSTAT +{ + BYTE status; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#define CSTF_CTSHOLD 0x01 +#define CSTF_DSRHOLD 0x02 +#define CSTF_RLSDHOLD 0x04 +#define CSTF_XOFFHOLD 0x08 +#define CSTF_XOFFSENT 0x10 +#define CSTF_EOF 0x20 +#define CSTF_TXIM 0x40 + +#else /* (STRICT | WINVER >= 0x030a) */ + +/* NOTE: This structure declaration is not ANSI compatible! */ +typedef struct tagCOMSTAT +{ + BYTE fCtsHold :1; + BYTE fDsrHold :1; + BYTE fRlsdHold :1; + BYTE fXoffHold :1; + BYTE fXoffSent :1; + BYTE fEof :1; + BYTE fTxim :1; + UINT cbInQue; + UINT cbOutQue; +} COMSTAT; + +#endif /* !(STRICT | WINVER >= 0x030a */ + +int WINAPI BuildCommDCB(LPCSTR, DCB FAR*); + +int WINAPI OpenComm(LPCSTR, UINT, UINT); +int WINAPI CloseComm(int); + +int WINAPI ReadComm(int, void FAR*, int); +int WINAPI WriteComm(int, const void FAR*, int); +int WINAPI UngetCommChar(int, char); +int WINAPI FlushComm(int, int); +int WINAPI TransmitCommChar(int, char); + +int WINAPI SetCommState(const DCB FAR*); +int WINAPI GetCommState(int, DCB FAR*); +int WINAPI GetCommError(int, COMSTAT FAR* ); + +int WINAPI SetCommBreak(int); +int WINAPI ClearCommBreak(int); + +UINT FAR* WINAPI SetCommEventMask(int, UINT); +UINT WINAPI GetCommEventMask(int, int); + +LONG WINAPI EscapeCommFunction(int, int); + +#if (WINVER >= 0x030a) +BOOL WINAPI EnableCommNotification(int, HWND, int, int); + +#define WM_COMMNOTIFY 0x0044 +#endif /* WINVER >= 0x030a */ + +#endif /* NOCOMM */ + +/****** String formatting support *******************************************/ + +int WINAPI wvsprintf(LPSTR lpszOut, LPCSTR lpszFmt, const void FAR* lpParams); + +int FAR CDECL wsprintf(LPSTR lpszOut, LPCSTR lpszFmt, ...); + + +/****** Driver support ******************************************************/ + +#if (WINVER >= 0x030a) + +#ifndef NODRIVERS + +DECLARE_HANDLE(HDRVR); + +typedef LRESULT (CALLBACK* DRIVERPROC)(DWORD, HDRVR, UINT, LPARAM, LPARAM); + +/* Driver messages */ +#define DRV_LOAD 0x0001 +#define DRV_ENABLE 0x0002 +#define DRV_OPEN 0x0003 +#define DRV_CLOSE 0x0004 +#define DRV_DISABLE 0x0005 +#define DRV_FREE 0x0006 +#define DRV_CONFIGURE 0x0007 +#define DRV_QUERYCONFIGURE 0x0008 +#define DRV_INSTALL 0x0009 +#define DRV_REMOVE 0x000A +#define DRV_EXITSESSION 0x000B +#define DRV_EXITAPPLICATION 0x000C +#define DRV_POWER 0x000F + +#define DRV_RESERVED 0x0800 +#define DRV_USER 0x4000 + +/* LPARAM of DRV_CONFIGURE message */ +typedef struct tagDRVCONFIGINFO +{ + DWORD dwDCISize; + LPCSTR lpszDCISectionName; + LPCSTR lpszDCIAliasName; +} DRVCONFIGINFO; +typedef DRVCONFIGINFO NEAR* PDRVCONFIGINFO; +typedef DRVCONFIGINFO FAR* LPDRVCONFIGINFO; + +/* Supported return values for DRV_CONFIGURE message */ +#define DRVCNF_CANCEL 0x0000 +#define DRVCNF_OK 0x0001 +#define DRVCNF_RESTART 0x0002 + +/* Supported lParam1 of DRV_EXITAPPLICATION notification */ +#define DRVEA_NORMALEXIT 0x0001 +#define DRVEA_ABNORMALEXIT 0x0002 + +LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR driverID, UINT message, LPARAM lParam1, LPARAM lParam2); + +HDRVR WINAPI OpenDriver(LPCSTR szDriverName, LPCSTR szSectionName, LPARAM lParam2); +LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2); + +LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, LPARAM lParam1, LPARAM lParam2); + +HINSTANCE WINAPI GetDriverModuleHandle(HDRVR hDriver); + +HDRVR WINAPI GetNextDriver(HDRVR, DWORD); + +/* GetNextDriver flags */ +#define GND_FIRSTINSTANCEONLY 0x00000001 + +#define GND_FORWARD 0x00000000 +#define GND_REVERSE 0x00000002 + +typedef struct tagDRIVERINFOSTRUCT +{ + UINT length; + HDRVR hDriver; + HINSTANCE hModule; + char szAliasName[128]; +} DRIVERINFOSTRUCT; +typedef DRIVERINFOSTRUCT FAR* LPDRIVERINFOSTRUCT; + +BOOL WINAPI GetDriverInfo(HDRVR, DRIVERINFOSTRUCT FAR*); + +#endif /* !NODRIVERS */ +#endif /* WINVER >= 0x030a */ +#endif /* NOUSER */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* _INC_WINDOWS */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/windows.inc b/private/oleauto/tools/win16/hdos/c800/include/windows.inc new file mode 100644 index 000000000..76f76eb62 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windows.inc @@ -0,0 +1,2343 @@ +;************************************************************************* +; +; WINDOWS.INC - Windows assembly language structures & constants +; +;************************************************************************* +; +; Conditional Block includes: (True states) +; NOTEXT - don't include TextMetric struc & text drawing modes & stock objs. +; NORASTOPS - don't include binary and ternary raster ops. +; NOVK - don't include virtual key definitions +; NOMB - don't include message box definitions +; NOWM - don't include window messages +; +; +FALSE = 0 +TRUE = 1 +NULL = 0 + +;******************************************************************* +; +; Rectangle +; +;******************************************************************* + +RECT struc + rcLeft dw ? + rcTop dw ? + rcRight dw ? + rcBottom dw ? +RECT ends + +;******************************************************************* +; +; Window Class structure +; +;******************************************************************* + +WNDCLASS struc + clsStyle dw ? ; class style + clsLpfnWndProc dd ? + clsCbClsExtra dw ? + clsCbWndExtra dw ? + clsHInstance dw ? ; instance handle + clsHIcon dw ? ; class icon handle + clsHCursor dw ? ; class cursor handle + clsHbrBackground dw ? ; class background brush + clsLpszMenuName dd ? ; menu name + clsLpszClassName dd ? ; far ptr to class name +WNDCLASS ends + +IFNDEF NOTEXT +TEXTMETRIC struc + tmHeight dw ? + tmAscent dw ? + tmDescent dw ? + tmIntLeading dw ? + tmExtLeading dw ? + tmAveCharWidth dw ? + tmMaxCharWidth dw ? + tmWeight dw ? + tmItalic db ? + tmUnderlined db ? + tmStruckOut db ? + tmFirstChar db ? + tmLastChar db ? + tmDefaultChar db ? + tmBreakChar db ? + tmPitch db ? + tmCharSet db ? + tmOverhang dw ? + tmAspectX dw ? + tmAspectY dw ? +TEXTMETRIC ends + +LF_FACESIZE EQU 32 + +LOGFONT struc + lfHeight dw ? + lfWidth dw ? + lfEscapement dw ? + lfOrientation dw ? + lfWeight dw ? + lfItalic db ? + lfUnderline db ? + lfStrikeOut db ? + lfCharSet db ? + lfOutPrecision db ? + lfClipPrecision db ? + lfQuality db ? + lfPitchAndFamily db ? + lfFaceName db LF_FACESIZE dup(?) +LOGFONT ends + +LOGBRUSH struc + lbStyle dw ? + lbColor dd ? + lbHatch dw ? +LOGBRUSH ends + +; +; Text Drawing modes +; +TRANSPARENT = 1 +OPAQUE = 2 +; +; Mapping Modes +; +MM_TEXT = 1 +MM_LOMETRIC = 2 +MM_HIMETRIC = 3 +MM_LOENGLISH = 4 +MM_HIENGLISH = 5 +MM_TWIPS = 6 +MM_ISOTROPIC = 7 +MM_ANISOTROPIC = 8 +; +; Coordinate Modes +; +ABSOLUTE = 1 +RELATIVE = 2 +; +; Stock Logical Objects +; +WHITE_BRUSH = 0 +LTGRAY_BRUSH = 1 +GRAY_BRUSH = 2 +DKGRAY_BRUSH = 3 +BLACK_BRUSH = 4 +NULL_BRUSH = 5 +HOLLOW_BRUSH = 5 +WHITE_PEN = 6 +BLACK_PEN = 7 +NULL_PEN = 8 +DOT_MARKER = 9 +OEM_FIXED_FONT = 10 +ANSI_FIXED_FONT = 11 +ANSI_VAR_FONT = 12 +SYSTEM_FONT = 13 +DEVICE_DEFAULT_FONT = 14 +DEFAULT_PALETTE = 15 +SYSTEM_FIXED_FONT = 16 +ENDIF +; +; Brush Styles +; +BS_SOLID = 0 +BS_NULL = 1 +BS_HOLLOW = BS_NULL +BS_HATCHED = 2 +BS_PATTERN = 3 +BS_INDEXED = 4 +BS_DIBPATTERN = 5 +; +; Hatch Styles +; +HS_HORIZONTAL = 0 ; ----- +HS_VERTICAL = 1 ; ||||| +HS_FDIAGONAL = 2 ; \\\\\ +HS_BDIAGONAL = 3 ; ///// +HS_CROSS = 4 ; +++++ +HS_DIAGCROSS = 5 ; xxxxx +; +; Pen Styles +; +PS_SOLID = 0 +PS_DASH = 1 ; ------- +PS_DOT = 2 ; ....... +PS_DASHDOT = 3 ; _._._._ +PS_DASHDOTDOT = 4 ; _.._.._ +PS_NULL = 5 +PS_INSIDEFRAME = 6 +; +; Device Parameters for GetDeviceCaps() +; +DRIVERVERSION =0 ; Device driver version +TECHNOLOGY =2 ; Device classification +HORZSIZE =4 ; Horizontal size in millimeters +VERTSIZE =6 ; Vertical size in millimeters +HORZRES =8 ; Horizontal width in pixels +VERTRES =10 ; Vertical width in pixels +BITSPIXEL =12 ; Number of bits per pixel +PLANES =14 ; Number of planes +NUMBRUSHES =16 ; Number of brushes the device has +NUMPENS =18 ; Number of pens the device has +NUMMARKERS =20 ; Number of markers the device has +NUMFONTS =22 ; Number of fonts the device has +NUMCOLORS =24 ; Number of colors the device supports +PDEVICESIZE =26 ; Size required for device descriptor +CURVECAPS =28 ; Curve capabilities +LINECAPS =30 ; Line capabilities +POLYGONALCAPS =32 ; Polygonal capabilities +TEXTCAPS =34 ; Text capabilities +CLIPCAPS =36 ; Clipping capabilities +RASTERCAPS =38 ; Bitblt capabilities +ASPECTX =40 ; Length of the X leg +ASPECTY =42 ; Length of the Y leg +ASPECTXY =44 ; Length of the hypotenuse + +LOGPIXELSX =88 ; Logical pixels/inch in X +LOGPIXELSY =90 ; Logical pixels/inch in Y + +SIZEPALETTE =104 ; Number of entries in physical palette +NUMRESERVED =106 ; Number of reserved entries in palette +COLORRES =108 ; Actual color resolution +; +ifndef NOGDICAPMASKS +; +; Device Capability Masks: +; +; Device Technologies +DT_PLOTTER = 0 ; /* Vector plotter */ +DT_RASDISPLAY = 1 ; /* Raster display */ +DT_RASPRINTER = 2 ; /* Raster printer */ +DT_RASCAMERA = 3 ; /* Raster camera */ +DT_CHARSTREAM = 4 ; /* Character-stream, PLP */ +DT_METAFILE = 5 ; /* Metafile, VDM */ +DT_DISPFILE = 6 ; /* Display-file */ +; +; Curve Capabilities +CC_NONE = 0 ; /* Curves not supported */ +CC_CIRCLES = 1 ; /* Can do circles */ +CC_PIE = 2 ; /* Can do pie wedges */ +CC_CHORD = 4 ; /* Can do chord arcs */ +CC_ELLIPSES = 8 ; /* Can do ellipese */ +CC_WIDE = 16 ; /* Can do wide lines */ +CC_STYLED = 32 ; /* Can do styled lines */ +CC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +CC_INTERIORS = 128; /* Can do interiors */ +; +; Line Capabilities +LC_NONE = 0 ; /* Lines not supported */ +LC_POLYLINE = 2 ; /* Can do polylines */ +LC_MARKER = 4 ; /* Can do markers */ +LC_POLYMARKER = 8 ; /* Can do polymarkers */ +LC_WIDE = 16 ; /* Can do wide lines */ +LC_STYLED = 32 ; /* Can do styled lines */ +LC_WIDESTYLED = 64 ; /* Can do wide styled lines */ +LC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities +PC_NONE = 0 ; /* Polygonals not supported */ +PC_POLYGON = 1 ; /* Can do polygons */ +PC_RECTANGLE = 2 ; /* Can do rectangles */ +PC_WINDPOLYGON = 4 ; /* Can do winding polygons */ +PC_TRAPEZOID = 4 ; /* Can do trapezoids */ +PC_SCANLINE = 8 ; /* Can do scanlines */ +PC_WIDE = 16 ; /* Can do wide borders */ +PC_STYLED = 32 ; /* Can do styled borders */ +PC_WIDESTYLED = 64 ; /* Can do wide styled borders */ +PC_INTERIORS = 128; /* Can do interiors */ +; +; Polygonal Capabilities */ +CP_NONE = 0 ; /* No clipping of output */ +CP_RECTANGLE = 1 ; /* Output clipped to rects */ +; +; Text Capabilities +TC_OP_CHARACTER = 0001h ; /* Can do OutputPrecision CHARACTER */ +TC_OP_STROKE = 0002h ; /* Can do OutputPrecision STROKE */ +TC_CP_STROKE = 0004h ; /* Can do ClipPrecision STROKE */ +TC_CR_90 = 0008h ; /* Can do CharRotAbility 90 */ +TC_CR_ANY = 0010h ; /* Can do CharRotAbility ANY */ +TC_SF_X_YINDEP = 0020h ; /* Can do ScaleFreedom X_YINDEPENDENT */ +TC_SA_DOUBLE = 0040h ; /* Can do ScaleAbility DOUBLE */ +TC_SA_INTEGER = 0080h ; /* Can do ScaleAbility INTEGER */ +TC_SA_CONTIN = 0100h ; /* Can do ScaleAbility CONTINUOUS */ +TC_EA_DOUBLE = 0200h ; /* Can do EmboldenAbility DOUBLE */ +TC_IA_ABLE = 0400h ; /* Can do ItalisizeAbility ABLE */ +TC_UA_ABLE = 0800h ; /* Can do UnderlineAbility ABLE */ +TC_SO_ABLE = 1000h ; /* Can do StrikeOutAbility ABLE */ +TC_RA_ABLE = 2000h ; /* Can do RasterFontAble ABLE */ +TC_VA_ABLE = 4000h ; /* Can do VectorFontAble ABLE */ +TC_RESERVED = 8000h +; +; Raster Capabilities +RC_BITBLT = 1 ; /* Can do standard BLT. */ +RC_BANDING = 2 ; /* Device requires banding support */ +RC_SCALING = 4 ; /* Device requires scaling support */ +RC_BITMAP64 = 8 ; /* Device can support >64K bitmap */ +RC_GDI20_OUTPUT = 0010h ; /* has 2.0 output calls */ +RC_DI_BITMAP = 0080h ; /* supports DIB to memory */ +RC_PALETTE = 0100h ; /* supports a palette */ +RC_DIBTODEV = 0200h ; /* supports DIBitsToDevice */ +RC_BIGFONT = 0400h ; /* supports >64K fonts */ +RC_STRETCHBLT = 0800h ; /* supports StretchBlt */ +RC_FLOODFILL = 1000h ; /* supports FloodFill */ +RC_STRETCHDIB = 2000h ; /* supports StretchDIBits */ + +endif ;NOGDICAPMASKS + +; palette entry flags +; +PC_RESERVED = 1 ;/* palette index used for animation */ +PC_EXPLICIT = 2 ;/* palette index is explicit to device */ +PC_NOCOLLAPSE = 4 ;/* do not match color to system palette */ + +; DIB color table identifiers +; +DIB_RGB_COLORS = 0 ;/* color table in RGBTriples */ +DIB_PAL_COLORS = 1 ;/* color table in palette indices */ +; + +;constants for Get/SetSystemPaletteUse() +; +SYSPAL_STATIC = 1 +SYSPAL_NOSTATIC = 2 + +; constants for CreateDIBitmap +CBM_INIT = 4 ;/* initialize bitmap */ +; +; Bitmap format constants +BI_RGB = 0 +BI_RLE8 = 1 +BI_RLE4 = 2 +; +; +ANSI_CHARSET = 0 +SYMBOL_CHARSET = 2 +OEM_CHARSET = 255 +; +; styles for CombineRgn +; +RGN_AND = 1 +RGN_OR = 2 +RGN_XOR = 3 +RGN_DIFF = 4 +RGN_COPY = 5 +; +; Predefined cursor & icon IDs +; +IDC_ARROW = 32512 +IDC_IBEAM = 32513 +IDC_WAIT = 32514 +IDC_CROSS = 32515 +IDC_UPARROW = 32516 +IDC_SIZE = 32640 +IDC_ICON = 32641 +IDC_SIZENWSE = 32642 +IDC_SIZENESW = 32643 +IDC_SIZEWE = 32644 +IDC_SIZENS = 32645 + +IDI_APPLICATION = 32512 +IDI_HAND = 32513 +IDI_QUESTION = 32514 +IDI_EXCLAMATION = 32515 +IDI_ASTERISK = 32516 + +; +; OEM Resource Ordinal Numbers */ +; +OBM_CLOSE = 32754 +OBM_UPARROW = 32753 +OBM_DNARROW = 32752 +OBM_RGARROW = 32751 +OBM_LFARROW = 32750 +OBM_REDUCE = 32749 +OBM_ZOOM = 32748 +OBM_RESTORE = 32747 +OBM_REDUCED = 32746 +OBM_ZOOMD = 32745 +OBM_RESTORED = 32744 +OBM_UPARROWD = 32743 +OBM_DNARROWD = 32742 +OBM_RGARROWD = 32741 +OBM_LFARROWD = 32740 +OBM_MNARROW = 32739 +OBM_COMBO = 32738 +OBM_UPARROWI = 32737 +OBM_DNARROWI = 32736 +OBM_RGARROWI = 32735 +OBM_LFARROWI = 32734 + +OBM_OLD_CLOSE = 32767 +OBM_SIZE = 32766 +OBM_OLD_UPARROW = 32765 +OBM_OLD_DNARROW = 32764 +OBM_OLD_RGARROW = 32763 +OBM_OLD_LFARROW = 32762 +OBM_BTSIZE = 32761 +OBM_CHECK = 32760 +OBM_CHECKBOXES = 32759 +OBM_BTNCORNERS = 32758 +OBM_OLD_REDUCE = 32757 +OBM_OLD_ZOOM = 32756 +OBM_OLD_RESTORE = 32755 + +OCR_NORMAL = 32512 +OCR_IBEAM = 32513 +OCR_WAIT = 32514 +OCR_CROSS = 32515 +OCR_UP = 32516 +OCR_SIZE = 32640 +OCR_ICON = 32641 +OCR_SIZENWSE = 32642 +OCR_SIZENESW = 32643 +OCR_SIZEWE = 32644 +OCR_SIZENS = 32645 +OCR_SIZEALL = 32646 +OCR_ICOCUR = 32647 + +OIC_SAMPLE = 32512 +OIC_HAND = 32513 +OIC_QUES = 32514 +OIC_BANG = 32515 +OIC_NOTE = 32516 + +; +; Scroll bar constants +; +SB_HORZ = 0 +SB_VERT = 1 +SB_CTL = 2 +SB_BOTH = 3 +; +; Scroll Commands +; +SB_LINEUP = 0 +SB_LINEDOWN = 1 +SB_PAGEUP = 2 +SB_PAGEDOWN = 3 +SB_THUMBPOSITION = 4 +SB_THUMBTRACK = 5 +SB_TOP = 6 +SB_BOTTOM = 7 +SB_ENDSCROLL = 8 +; +; MessageBox type flags +; +IFNDEF NOMB +MB_OK = 0000H +MB_OKCANCEL = 0001H +MB_ABORTRETRYIGNORE = 0002H +MB_YESNOCANCEL = 0003H +MB_YESNO = 0004H +MB_RETRYCANCEL = 0005H + +MB_ICONHAND = 0010H +MB_ICONQUESTION = 0020H +MB_ICONEXCLAMATION = 0030H +MB_ICONASTERISK = 0040H + +MB_DEFBUTTON1 = 0000H +MB_DEFBUTTON2 = 0100H +MB_DEFBUTTON3 = 0200H + +MB_APPLMODAL = 0000H +MB_SYSTEMMODAL = 1000H +MB_TASKMODAL = 2000H + +MB_NOFOCUS = 8000H + +; +; Conventional dialog box and message box command IDs +; +IDOK = 1 +IDCANCEL = 2 +IDABORT = 3 +IDRETRY = 4 +IDIGNORE = 5 +IDYES = 6 +IDNO = 7 +; +; Flags for OpenFile +; +OF_READ = 0000H +OF_WRITE = 0001H +OF_READWRITE = 0002H +OF_SHARE_COMPAT = 0000H +OF_SHARE_EXCLUSIVE = 0010H +OF_SHARE_DENY_WRITE = 0020H +OF_SHARE_DENY_READ = 0030H +OF_SHARE_DENY_NONE = 0040H +OF_PARSE = 0100H +OF_DELETE = 0200H +OF_VERIFY = 0400H ; Used with OF_REOPEN +OF_SEARCH = 0400H ; Used without OF_REOPEN +OF_CANCEL = 0800H +OF_CREATE = 1000H +OF_PROMPT = 2000H +OF_EXIST = 4000H +OF_REOPEN = 8000H + +TF_FORCEDRIVE = 80H + +OPENSTRUC STRUC +opLen db ? +opDisk db ? +opXtra dw ? +opDate dw ? +opTime dw ? +opFile db 120 dup (?) +OPENSTRUC ENDS +; +; DrawText format flags +; +DT_LEFT = 00H +DT_CENTER = 01H +DT_RIGHT = 02H +DT_TOP = 00H +DT_VCENTER = 04H +DT_BOTTOM = 08H +DT_WORDBREAK = 10H +DT_SINGLELINE = 20H +DT_EXPANDTABS = 40H +DT_TABSTOP = 80H +DT_NOCLIP = 0100H +DT_EXTERNALLEADING = 0200H +DT_CALCRECT = 0400H +DT_NOPREFIX = 0800H +DT_INTERNAL = 1000H +ENDIF + +; +; ExtFloodFill style flags +; +FLOODFILLBORDER = 0 +FLOODFILLSURFACE = 1 + +; +; Memory manager flags +; +LMEM_FIXED = 0000h +LMEM_MOVEABLE = 0002h +LMEM_NOCOMPACT = 0010H +LMEM_NODISCARD = 0020H +LMEM_ZEROINIT = 0040h +LMEM_MODIFY = 0080H +LMEM_DISCARDABLE= 0F00h +LHND = LMEM_MOVEABLE+LMEM_ZEROINIT +LPTR = LMEM_FIXED+LMEM_ZEROINIT +; Flags returned by LocalFlags (in addition to LMEM_DISCARDABLE) +LMEM_DISCARDED = 4000H +LMEM_LOCKCOUNT = 00FFH + +NONZEROLHND = LMEM_MOVEABLE +NONZEROLPTR = LMEM_FIXED + + + +GMEM_FIXED = 0000h +GMEM_MOVEABLE = 0002h +GMEM_NOCOMPACT = 0010h +GMEM_NODISCARD = 0020h +GMEM_ZEROINIT = 0040h +GMEM_MODIFY = 0080h +GMEM_DISCARDABLE= 0100h +GMEM_NOT_BANKED = 1000h +GMEM_DDESHARE = 2000h +GMEM_SHARE = 2000h +GMEM_NOTIFY = 4000h +GMEM_LOWER = GMEM_NOT_BANKED +GHND = GMEM_MOVEABLE+GMEM_ZEROINIT +GPTR = GMEM_FIXED+GMEM_ZEROINIT + +; Flags returned by GlobalFlags (in addition to GMEM_DISCARDABLE) +GMEM_DISCARDED = 4000h +GMEM_LOCKCOUNT = 00FFh + +; Flags returned by GetWinFlags + +WF_PMODE = 0001h +WF_CPU286 = 0002h +WF_CPU386 = 0004h +WF_CPU486 = 0008h +WF_STANDARD = 0010h +WF_WIN286 = 0010h +WF_ENHANCED = 0020h +WF_WIN386 = 0020h +WF_CPU086 = 0040h +WF_CPU186 = 0080h +WF_LARGEFRAME = 0100h +WF_SMALLFRAME = 0200h +WF_80x87 = 0400h +WF_PAGING = 0800h +WF_WLO = 8000h + +; WEP fSystemExit flag values +WEP_SYSTEM_EXIT = 1 +WEP_FREE_DLL = 0 + + +; Virtual Keys, Standard Set + +IFNDEF NOVK +VK_LBUTTON = 01H +VK_RBUTTON = 02H +VK_CANCEL = 03H +VK_BACK = 08H +VK_TAB = 09H +VK_CLEAR = 0cH +VK_RETURN = 0dH +VK_SHIFT = 10H +VK_CONTROL = 11H +VK_MENU = 12H +VK_PAUSE = 13H +VK_CAPITAL = 14H +VK_ESCAPE = 1bH +VK_SPACE = 20H + +VK_PRIOR = 21H +VK_NEXT = 22H +VK_END = 23H +VK_HOME = 24H +VK_LEFT = 25H +VK_UP = 26H +VK_RIGHT = 27H +VK_DOWN = 28H + +; VK_A thru VK_Z are the same as their ASCII equivalents: 'A' thru 'Z' +; VK_0 thru VK_9 are the same as their ASCII equivalents: '0' thru '0' + +VK_PRINT = 2aH +VK_EXECUTE = 2bH +VK_SNAPSHOT = 2ch ; Printscreen key.. +VK_INSERT = 2dH +VK_DELETE = 2eH +VK_HELP = 2fH + +VK_NUMPAD0 = 60H +VK_NUMPAD1 = 61H +VK_NUMPAD2 = 62H +VK_NUMPAD3 = 63H +VK_NUMPAD4 = 64H +VK_NUMPAD5 = 65H +VK_NUMPAD6 = 66H +VK_NUMPAD7 = 67H +VK_NUMPAD8 = 68H +VK_NUMPAD9 = 69H +VK_MULTIPLY = 6AH +VK_ADD = 6BH +VK_SEPARATER = 6CH +VK_SUBTRACT = 6DH +VK_DECIMAL = 6EH +VK_DIVIDE = 6FH + +VK_F1 = 70H +VK_F2 = 71H +VK_F3 = 72H +VK_F4 = 73H +VK_F5 = 74H +VK_F6 = 75H +VK_F7 = 76H +VK_F8 = 77H +VK_F9 = 78H +VK_F10 = 79H +VK_F11 = 7aH +VK_F12 = 7bH +VK_F13 = 7cH +VK_F14 = 7dH +VK_F15 = 7eH +VK_F16 = 7fH +VK_F17 = 80H +VK_F18 = 81H +VK_F19 = 82H +VK_F20 = 83H +VK_F21 = 84H +VK_F22 = 85H +VK_F23 = 86H +VK_F24 = 87H + +VK_NUMLOCK = 90H +VK_SCROLL = 91H +ENDIF + +IFNDEF NOWH + +; SetWindowsHook() codes +WH_MSGFILTER = (-1) +WH_JOURNALRECORD = 0 +WH_JOURNALPLAYBACK = 1 +WH_KEYBOARD = 2 +WH_GETMESSAGE = 3 +WH_CALLWNDPROC = 4 +IFNDEF NOWIN31 +WH_CBT = 5 +WH_SYSMSGFILTER = 6 +WH_MOUSE = 7 +WH_HARDWARE = 8 +WH_DEBUG = 9 +ENDIF +; +; Hook Codes +HC_GETLPLPFN = (-3) +HC_LPLPFNNEXT = (-2) +HC_LPFNNEXT = (-1) +HC_ACTION = 0 +HC_GETNEXT = 1 +HC_SKIP = 2 +HC_NOREM = 3 +HC_NOREMOVE = 3 +HC_SYSMODALON = 4 +HC_SYSMODALOFF = 5 +; +; CBT Hook Codes +HCBT_MOVESIZE = 0 +HCBT_MINMAX = 1 +HCBT_QS = 2 +HCBT_CREATEWND = 3 +HCBT_DESTROYWND = 4 +HCBT_ACTIVATE = 5 +HCBT_CLICKSKIPPED = 6 +HCBT_KEYSKIPPED = 7 +HCBT_SYSCOMMAND = 8 +HCBT_SETFOCUS = 9 + +; +; WH_MSGFILTER Filter Proc Codes +MSGF_DIALOGBOX = 0 +MSGF_MENU = 2 +MSGF_MOVE = 3 +MSGF_SIZE = 4 +MSGF_SCROLLBAR = 5 +MSGF_NEXTWINDOW = 6 +; +; Window Manager Hook Codes +WC_INIT = 1 +WC_SWP = 2 +WC_DEFWINDOWPROC = 3 +WC_MINMAX = 4 +WC_MOVE = 5 +WC_SIZE = 6 +WC_DRAWCAPTION = 7 +; + +; Message Structure used in Journaling +EVENTMSG struc + message dw ? + paramL dw ? + paramH dw ? + time dd ? +EVENTMSG ends + +ENDIF ;NOWH + +; Window field offsets for GetWindowLong() and GetWindowWord() +GWL_WNDPROC = (-4) +GWW_HINSTANCE = (-6) +GWW_HWNDPARENT = (-8) +GWW_ID = (-12) +GWL_STYLE = (-16) +GWL_EXSTYLE = (-20) + +; GetWindow() Constants +GW_HWNDFIRST = 0 +GW_HWNDLAST = 1 +GW_HWNDNEXT = 2 +GW_HWNDPREV = 3 +GW_OWNER = 4 +GW_CHILD = 5 + +; Class field offsets for GetClassLong() and GetClassWord() +GCL_MENUNAME = (-8) +GCW_HBRBACKGROUND = (-10) +GCW_HCURSOR = (-12) +GCW_HICON = (-14) +GCW_HMODULE = (-16) +GCW_CBWNDEXTRA = (-18) +GCW_CBCLSEXTRA = (-20) +GCL_WNDPROC = (-24) +GCW_STYLE = (-26) + +; WinWhere() Area Codes +HTERROR = (-2) +HTTRANSPARENT = (-1) +HTNOWHERE = 0 +HTCLIENT = 1 +HTCAPTION = 2 +HTSYSMENU = 3 +HTGROWBOX = 4 +HTSIZE = HTGROWBOX +HTMENU = 5 +HTHSCROLL = 6 +HTVSCROLL = 7 +HTREDUCE = 8 +HTZOOM = 9 +HTLEFT = 10 +HTRIGHT = 11 +HTTOP = 12 +HTTOPLEFT = 13 +HTTOPRIGHT = 14 +HTBOTTOM = 15 +HTBOTTOMLEFT = 16 +HTBOTTOMRIGHT = 17 +HTSIZEFIRST = HTLEFT +HTSIZELAST = HTBOTTOMRIGHT + + + +;************************************************************************* +; +; Misc structures & constants +; +;************************************************************************* + +IFNDEF NOMST +POINT struc + ptX dw ? + ptY dw ? +POINT ends + +LOGPEN struc + lopnStyle dw ? + lopnWidth db (SIZE POINT) DUP(?) + lopnColor dd ? +LOGPEN ends + + +BITMAP STRUC + bmType DW ? + bmWidth DW ? + bmHeight DW ? + bmWidthBytes DW ? + bmPlanes DB ? + bmBitsPixel DB ? + bmBits DD ? +BITMAP ENDS + +RGBTRIPLE struc + rgbBlue db ? + rgbGreen db ? + rgbRed db ? +RGBTRIPLE ends + +RGBQUAD struc + rgbqBlue db ? + rgbqGreen db ? + rgbqRed db ? + rgbqReserved db ? +RGBQUAD ends + +; structures for defining DIBs +BITMAPCOREHEADER struc + bcSize dd ? + bcWidth dw ? + bcHeight dw ? + bcPlanes dw ? + bcBitCount dw ? +BITMAPCOREHEADER ends + +BITMAPINFOHEADER struc + biSize dd ? + biWidth dd ? + biHeight dd ? + biPlanes dw ? + biBitCount dw ? + + biCompression dd ? + biSizeImage dd ? + biXPelsPerMeter dd ? + biYPelsPerMeter dd ? + biClrUsed dd ? + biClrImportant dd ? +BITMAPINFOHEADER ends + +BITMAPINFO struc + bmiHeader db (SIZE BITMAPINFOHEADER) DUP (?) + bmiColors db ? ; array of RGBQUADs +BITMAPINFO ends + +BITMAPCOREINFO struc + bmciHeader db (SIZE BITMAPCOREHEADER) DUP (?) + bmciColors db ? ; array of RGBTRIPLEs +BITMAPCOREINFO ends + +BITMAPFILEHEADER struc + bfType dw ? + bfSize dd ? + bfReserved1 dw ? + bfReserved2 dw ? + bfOffBits dd ? +BITMAPFILEHEADER ends + + +WNDSTRUC struc + WSwndStyle dd ? + WSwndID dw ? + WSwndText dw ? + WSwndParent dw ? + WSwndInstance dw ? + WSwndClassProc dd ? +WNDSTRUC ends +; +; Message structure +; +MSGSTRUCT struc +msHWND dw ? +msMESSAGE dw ? +msWPARAM dw ? +msLPARAM dd ? +msTIME dd ? +msPT dd ? +MSGSTRUCT ends + +NEWPARMS struc + nprmHwnd dw ? + nprmCmd db ? +NEWPARMS ends +ENDIF + +PAINTSTRUCT STRUC + PShdc DW ? + PSfErase DW ? + PSrcPaint DB size RECT dup(?) + PSfRestore DW ? + PSfIncUpdate DW ? + PSrgbReserved DB 16 dup(?) +PAINTSTRUCT ENDS + + +CREATESTRUCT struc + cs_lpCreateParams dd ? + cs_hInstance dw ? + cs_hMenu dw ? + cs_hwndParent dw ? + cs_cy dw ? + cs_cx dw ? + cs_y dw ? + cs_x dw ? + cs_style dd ? + cs_lpszName dd ? + cs_lpszClass dd ? + cs_dwExStyle dd ? +CREATESTRUCT ends +; +; PostError constants +; +WARNING = 0 ; command codes +MINOR_ERROR = 1 +FATAL_ERROR = 2 + +IGNORE = 0 ; response codes +RETRY = 1 +ABORT = 2 +; +; GDI-related constants & commands +; +ERRORREGION = 0 +NULLREGION = 1 +SIMPLEREGION = 2 +COMPLEXREGION = 3 + +IFNDEF NORASTOPS +; +; Binary raster ops +; +R2_BLACK = 1 +R2_NOTMERGEPEN = 2 +R2_MASKNOTPEN = 3 +R2_NOTCOPYPEN = 4 +R2_MASKPENNOT = 5 +R2_NOT = 6 +R2_XORPEN = 7 +R2_NOTMASKPEN = 8 +R2_MASKPEN = 9 +R2_NOTXORPEN = 10 +R2_NOP = 11 +R2_MERGENOTPEN = 12 +R2_COPYPEN = 13 +R2_MERGEPENNOT = 14 +R2_MERGEPEN = 15 +R2_WHITE = 16 +; +; Ternary raster ops +; +SRCCOPY_L = 0020h ;dest=source +SRCCOPY_H = 00CCh +SRCPAINT_L = 0086h ;dest=source OR dest +SRCPAINT_H = 00EEh +SRCAND_L = 00C6h ;dest=source AND dest +SRCAND_H = 0088h +SRCINVERT_L = 0046h ;dest= source XOR dest +SRCINVERT_H = 0066h +SRCERASE_L = 0328h ;dest= source AND (not dest ) +SRCERASE_H = 0044h +NOTSRCCOPY_L = 0008h ;dest= (not source) +NOTSRCCOPY_H = 0033h +NOTSRCERASE_L = 00A6h ;dest= (not source) AND (not dest) +NOTSRCERASE_H = 0011h +MERGECOPY_L = 00CAh ;dest= (source AND pattern) +MERGECOPY_H = 00C0h +MERGEPAINT_L = 0226h ;dest= (source AND pattern) OR dest +MERGEPAINT_H = 00BBh +PATCOPY_L = 0021h ;dest= pattern +PATCOPY_H = 00F0h +PATPAINT_L = 0A09h ;DPSnoo +PATPAINT_H = 00FBh +PATINVERT_L = 0049h ;dest= pattern XOR dest +PATINVERT_H = 005Ah +DSTINVERT_L = 0009h ;dest= (not dest) +DSTINVERT_H = 0055h +BLACKNESS_L = 0042h ;dest= BLACK +BLACKNESS_H = 0000h +WHITENESS_L = 0062h ;dest= WHITE +WHITENESS_H = 00FFh +; +; StretchBlt modes +; +BLACKONWHITE = 1 +WHITEONBLACK = 2 +COLORONCOLOR = 3 +; +; New StretchBlt modes +; +STRETCH_ANDSCANS = 1 +STRETCH_ORSCANS = 2 +STRETCH_DELETESCANS = 3 +; +; PolyFill modes +; +ALTERNATE = 1 +WINDING = 2 +ENDIF +; +; Text Alignment Options +; +TA_NOUPDATECP = 0 +TA_UPDATECP = 1 + +TA_LEFT = 0 +TA_RIGHT = 2 +TA_CENTER = 6 + +TA_TOP = 0 +TA_BOTTOM = 8 +TA_BASELINE = 24 + +ETO_GRAYED = 1 +ETO_OPAQUE = 2 +ETO_CLIPPED = 4 + +ASPECT_FILTERING = 1 + +ifndef NOMETAFILE + +; Metafile Functions */ +META_SETBKCOLOR = 0201h +META_SETBKMODE = 0102h +META_SETMAPMODE = 0103h +META_SETROP2 = 0104h +META_SETRELABS = 0105h +META_SETPOLYFILLMODE = 0106h +META_SETSTRETCHBLTMODE = 0107h +META_SETTEXTCHAREXTRA = 0108h +META_SETTEXTCOLOR = 0209h +META_SETTEXTJUSTIFICATION = 020Ah +META_SETWINDOWORG = 020Bh +META_SETWINDOWEXT = 020Ch +META_SETVIEWPORTORG = 020Dh +META_SETVIEWPORTEXT = 020Eh +META_OFFSETWINDOWORG = 020Fh +META_SCALEWINDOWEXT = 0400h +META_OFFSETVIEWPORTORG = 0211h +META_SCALEVIEWPORTEXT = 0412h +META_LINETO = 0213h +META_MOVETO = 0214h +META_EXCLUDECLIPRECT = 0415h +META_INTERSECTCLIPRECT = 0416h +META_ARC = 0817h +META_ELLIPSE = 0418h +META_FLOODFILL = 0419h +META_PIE = 081Ah +META_RECTANGLE = 041Bh +META_ROUNDRECT = 061Ch +META_PATBLT = 061Dh +META_SAVEDC = 001Eh +META_SETPIXEL = 041Fh +META_OFFSETCLIPRGN = 0220h +META_TEXTOUT = 0521h +META_BITBLT = 0922h +META_STRETCHBLT = 0B23h +META_POLYGON = 0324h +META_POLYLINE = 0325h +META_ESCAPE = 0626h +META_RESTOREDC = 0127h +META_FILLREGION = 0228h +META_FRAMEREGION = 0429h +META_INVERTREGION = 012Ah +META_PAINTREGION = 012Bh +META_SELECTCLIPREGION = 012Ch +META_SELECTOBJECT = 012Dh +META_SETTEXTALIGN = 012Eh +META_DRAWTEXT = 062Fh + +META_CHORD = 0830h +META_SETMAPPERFLAGS = 0231h +META_EXTTEXTOUT = 0a32h +META_SETDIBTODEV = 0d33h +META_SELECTPALETTE = 0234h +META_REALIZEPALETTE = 0035h +META_ANIMATEPALETTE = 0436h +META_SETPALENTRIES = 0037h +META_POLYPOLYGON = 0538h +META_RESIZEPALETTE = 0139h + +META_DIBBITBLT = 0940h +META_DIBSTRETCHBLT = 0b41h +META_DIBCREATEPATTERNBRUSH = 0142h +META_STRETCHDIB = 0f43h + +META_DELETEOBJECT = 01f0h + +META_CREATEPALETTE = 00f7h +META_CREATEBRUSH = 00F8h +META_CREATEPATTERNBRUSH = 01F9h +META_CREATEPENINDIRECT = 02FAh +META_CREATEFONTINDIRECT = 02FBh +META_CREATEBRUSHINDIRECT = 02FCh +META_CREATEBITMAPINDIRECT = 02FDh +META_CREATEBITMAP = 06FEh +META_CREATEREGION = 06FFh + +; /* Clipboard Metafile Picture Structure */ +HANDLETABLE struc + ht_objectHandle dw ? +HANDLETABLE ends + +METARECORD struc + mr_rdSize dd ? + mr_rdFunction dw ? + mr_rdParm dw ? +METARECORD ends + +METAFILEPICT struc + mfp_mm dw ? + mfp_xExt dw ? + mfp_yExt dw ? + mfp_hMF dw ? +METAFILEPICT ends + +METAHEADER struc + mtType dw ? + mtHeaderSize dw ? + mtVersion dw ? + mtSize dd ? + mtNoObjects dw ? + mtMaxRecord dd ? + mtNoParameters dw ? +METAHEADER ends + +endif ; NOMETAFILE + +; GDI Escapes +NEWFRAME = 1 +ABORTDOC = 2 +NEXTBAND = 3 +SETCOLORTABLE = 4 +GETCOLORTABLE = 5 +FLUSHOUTPUT = 6 +DRAFTMODE = 7 +QUERYESCSUPPORT = 8 +SETABORTPROC = 9 +STARTDOC = 10 +;; This value conflicts with a std WIN386 MACRO definition +;;ENDDOC = 11 +GETPHYSPAGESIZE = 12 +GETPRINTINGOFFSET = 13 +GETSCALINGFACTOR = 14 +MFCOMMENT = 15 +GETPENWIDTH = 16 +SETCOPYCOUNT = 17 +SELECTPAPERSOURCE = 18 +DEVICEDATA = 19 +PASSTHROUGH = 19 +GETTECHNOLGY = 20 +GETTECHNOLOGY = 20 +SETENDCAP = 21 +SETLINEJOIN = 22 +SETMITERLIMIT = 23 +BANDINFO = 24 +DRAWPATTERNRECT = 25 +GETVECTORPENSIZE = 26 +GETVECTORBRUSHSIZE = 27 +ENABLEDUPLEX = 28 +ENABLEMANUALFEED = 29 +GETSETPAPERBINS = 29 +GETSETPRINTORIENT = 30 +ENUMPAPERBINS = 31 + +GETEXTENDEDTEXTMETRICS = 256 +GETEXTENTTABLE = 257 +GETPAIRKERNTABLE = 258 +GETTRACKKERNTABLE = 259 + +EXTTEXTOUT = 512 + +ENABLERELATIVEWIDTHS = 768 +ENABLEPAIRKERNING = 769 +SETKERNTRACK = 770 +SETALLJUSTVALUES = 771 +SETCHARSET = 772 + +GETSETSCREENPARAMS = 3072 + +STRETCHBLT = 2048 + + +; Spooler Error Codes +SP_NOTREPORTED = 4000h +SP_ERROR = (-1) +SP_APPABORT = (-2) +SP_USERABORT = (-3) +SP_OUTOFDISK = (-4) +SP_OUTOFMEMORY = (-5) + +PR_JOBSTATUS = 0000 + +; Object Definitions for EnumObjects() +OBJ_PEN = 1 +OBJ_BRUSH = 2 + +; +; Menu flags for Change/Check/Enable MenuItem +; +MF_INSERT = 0000h +MF_CHANGE = 0080h +MF_APPEND = 0100h +MF_DELETE = 0200h +MF_REMOVE = 1000h + +MF_BYCOMMAND = 0000h +MF_BYPOSITION = 0400h + +MF_SEPARATOR = 0800h + +MF_ENABLED = 0000h +MF_GRAYED = 0001h +MF_DISABLED = 0002h + +MF_UNCHECKED = 0000h +MF_CHECKED = 0008h +MF_USECHECKBITMAPS= 0200h + +MF_STRING = 0000h +MF_BITMAP = 0004h +MF_OWNERDRAW = 0100h + +MF_POPUP = 0010h +MF_MENUBARBREAK = 0020h +MF_MENUBREAK = 0040h + +MF_UNHILITE = 0000h +MF_HILITE = 0080h + +MF_SYSMENU = 2000h +MF_HELP = 4000h +MF_MOUSESELECT = 8000h + + +; +; System Menu Command Values +; +SC_SIZE = 0F000h +SC_MOVE = 0F010h +SC_MINIMIZE = 0F020h +SC_MAXIMIZE = 0F030h +SC_NEXTWINDOW = 0F040h +SC_PREVWINDOW = 0F050h +SC_CLOSE = 0F060h +SC_VSCROLL = 0F070h +SC_HSCROLL = 0F080h +SC_MOUSEMENU = 0F090h +SC_KEYMENU = 0F100h +SC_ARRANGE = 0F110h +SC_RESTORE = 0F120h +SC_TASKLIST = 0F130h +SC_SCREENSAVE = 0F140h +SC_HOTKEY = 0F150h + +SC_ICON = SC_MINIMIZE +SC_ZOOM = SC_MAXIMIZE + +; +; Window State Messages +; +IFNDEF NOWM +WM_STATE = 0000H + +WM_NULL = 0000h +WM_CREATE = 0001h +WM_DESTROY = 0002h +WM_MOVE = 0003h +WM_SIZE = 0005h +WM_ACTIVATE = 0006h +WM_SETFOCUS = 0007h +WM_KILLFOCUS = 0008h +WM_ENABLE = 000Ah +WM_SETREDRAW = 000Bh +WM_SETTEXT = 000Ch +WM_GETTEXT = 000Dh +WM_GETTEXTLENGTH = 000Eh +WM_PAINT = 000Fh +WM_CLOSE = 0010h +WM_QUERYENDSESSION = 0011h +WM_QUIT = 0012h +WM_QUERYOPEN = 0013h +WM_ERASEBKGND = 0014h +WM_SYSCOLORCHANGE = 0015h +WM_ENDSESSION = 0016h +WM_SYSTEMERROR = 0017h +WM_SHOWWINDOW = 0018h +WM_CTLCOLOR = 0019h +WM_WININICHANGE = 001Ah +WM_DEVMODECHANGE = 001Bh +WM_ACTIVATEAPP = 001Ch +WM_FONTCHANGE = 001Dh +WM_TIMECHANGE = 001Eh +WM_CANCELMODE = 001Fh +WM_SETCURSOR = 0020h +WM_MOUSEACTIVATE = 0021h +WM_CHILDACTIVATE = 0022h +WM_QUEUESYNC = 0023h +WM_GETMINMAXINFO = 0024h +WM_PAINTICON = 0026h +WM_ICONERASEBKGND = 0027h +WM_NEXTDLGCTL = 0028h +WM_SPOOLERSTATUS = 002Ah +WM_DRAWITEM = 002Bh +WM_MEASUREITEM = 002Ch +WM_DELETEITEM = 002Dh +WM_VKEYTOITEM = 002Eh +WM_CHARTOITEM = 002Fh +WM_SETFONT = 0030h +WM_GETFONT = 0031h +WM_QUERYDRAGICON = 0037h +WM_COMPAREITEM = 0039h +WM_COMPACTING = 0041h +IFNDEF NOWIN31 +WM_COMMNOTIFY = 0044h +WM_WINDOWPOSCHANGING= 0046h +WM_WINDOWPOSCHANGED = 0047h +WM_POWER = 0048h +ENDIF + + +WM_NCCREATE = 0081h +WM_NCDESTROY = 0082h +WM_NCCALCSIZE = 0083h +WM_NCHITTEST = 0084h +WM_NCPAINT = 0085h +WM_NCACTIVATE = 0086h +WM_GETDLGCODE = 0087h +WM_NCMOUSEMOVE = 00A0h +WM_NCLBUTTONDOWN = 00A1h +WM_NCLBUTTONUP = 00A2h +WM_NCLBUTTONDBLCLK = 00A3h +WM_NCRBUTTONDOWN = 00A4h +WM_NCRBUTTONUP = 00A5h +WM_NCRBUTTONDBLCLK = 00A6h +WM_NCMBUTTONDOWN = 00A7h +WM_NCMBUTTONUP = 00A8h +WM_NCMBUTTONDBLCLK = 00A9h + +WM_KEYFIRST = 0100h +WM_KEYDOWN = 0100h +WM_KEYUP = 0101h +WM_CHAR = 0102h +WM_DEADCHAR = 0103h +WM_SYSKEYDOWN = 0104h +WM_SYSKEYUP = 0105h +WM_SYSCHAR = 0106h +WM_SYSDEADCHAR = 0107h +WM_KEYLAST = 0108h + +WM_INITDIALOG = 0110h +WM_COMMAND = 0111h +WM_SYSCOMMAND = 0112h +WM_TIMER = 0113h +WM_HSCROLL = 0114h +WM_VSCROLL = 0115h +WM_INITMENU = 0116h +WM_INITMENUPOPUP = 0117h +WM_MENUSELECT = 011Fh +WM_MENUCHAR = 0120h +WM_ENTERIDLE = 0121h + + +WM_MOUSEFIRST = 0200h +WM_MOUSEMOVE = 0200h +WM_LBUTTONDOWN = 0201h +WM_LBUTTONUP = 0202h +WM_LBUTTONDBLCLK = 0203h +WM_RBUTTONDOWN = 0204h +WM_RBUTTONUP = 0205h +WM_RBUTTONDBLCLK = 0206h +WM_MBUTTONDOWN = 0207h +WM_MBUTTONUP = 0208h +WM_MBUTTONDBLCLK = 0209h +WM_MOUSELAST = 0209h + +WM_PARENTNOTIFY = 0210h +WM_MDICREATE = 0220h +WM_MDIDESTROY = 0221h +WM_MDIACTIVATE = 0222h +WM_MDIRESTORE = 0223h +WM_MDINEXT = 0224h +WM_MDIMAXIMIZE = 0225h +WM_MDITILE = 0226h +WM_MDICASCADE = 0227h +WM_MDIICONARRANGE = 0228h +WM_MDIGETACTIVE = 0229h +WM_MDISETMENU = 0230h +WM_DROPFILES = 0233h + + +WM_CUT = 0300h +WM_COPY = 0301h +WM_PASTE = 0302h +WM_CLEAR = 0303h +WM_UNDO = 0304h +WM_RENDERFORMAT = 0305h +WM_RENDERALLFORMATS = 0306h +WM_DESTROYCLIPBOARD = 0307h +WM_DRAWCLIPBOARD = 0308h +WM_PAINTCLIPBOARD = 0309h +WM_VSCROLLCLIPBOARD = 030Ah +WM_SIZECLIPBOARD = 030Bh +WM_ASKCBFORMATNAME = 030Ch +WM_CHANGECBCHAIN = 030Dh +WM_HSCROLLCLIPBOARD = 030Eh +WM_QUERYNEWPALETTE = 030Fh +WM_PALETTEISCHANGING = 0310h +WM_PALETTECHANGED = 0311h + +IFNDEF NOWIN31 +WM_PENWINFIRST equ 0380h +WM_PENWINLAST equ 038Fh + + +WM_COALESCE_FIRST equ 0390h +WM_COALESCE_LAST equ 039Fh + + + + +ENDIF + + + +; private window messages start here +WM_USER = 0400H +ENDIF ; NOWM + +; WM_MOUSEACTIVATE Return Codes +MA_ACTIVATE = 1 +MA_ACTIVATEANDEAT = 2 +MA_NOACTIVATE = 3 + +; Size message commands +SIZENORMAL = 0 +SIZEICONIC = 1 +SIZEFULLSCREEN = 2 +SIZEZOOMSHOW = 3 +SIZEZOOMHIDE = 4 + +; ShowWindow() Commands +SW_HIDE = 0 +SW_SHOWNORMAL = 1 +SW_NORMAL = 1 +SW_SHOWMINIMIZED = 2 +SW_SHOWMAXIMIZED = 3 +SW_MAXIMIZE = 3 +SW_SHOWNOACTIVATE = 4 +SW_SHOW = 5 +SW_MINIMIZE = 6 +SW_SHOWMINNOACTIVE = 7 +SW_SHOWNA = 8 +SW_RESTORE = 9 + +; Old ShowWindow() Commands +HIDE_WINDOW = 0 +SHOW_OPENWINDOW = 1 +SHOW_ICONWINDOW = 2 +SHOW_FULLSCREEN = 3 +SHOW_OPENNOACTIVATE= 4 + +; identifiers for the WM_SHOWWINDOW message +SW_PARENTCLOSING = 1 +SW_OTHERZOOM = 2 +SW_PARENTOPENING = 3 +SW_OTHERUNZOOM = 4 +; +; Key state masks for mouse messages +; +MK_LBUTTON = 0001h +MK_RBUTTON = 0002h +MK_SHIFT = 0004h +MK_CONTROL = 0008h +MK_MBUTTON = 0010h +; +; Class styles +; +CS_VREDRAW = 0001h +CS_HREDRAW = 0002h +CS_KEYCVTWINDOW = 0004H +CS_DBLCLKS = 0008h +; 0010h reserved +CS_OWNDC = 0020h +CS_CLASSDC = 0040h +CS_PARENTDC = 0080h +CS_NOKEYCVT = 0100h +CS_SAVEBITS = 0800h +CS_NOCLOSE = 0200h +CS_BYTEALIGNCLIENT = 1000h +CS_BYTEALIGNWINDOW = 2000h +CS_GLOBALCLASS = 4000h ; Global window class + +; +; Special CreateWindow position value +; +CW_USEDEFAULT EQU 8000h + +; +; Windows styles (the high words) +; +WS_OVERLAPPED = 00000h +WS_ICONICPOPUP = 0C000h +WS_POPUP = 08000h +WS_CHILD = 04000h +WS_MINIMIZE = 02000h +WS_VISIBLE = 01000h +WS_DISABLED = 00800h +WS_CLIPSIBLINGS = 00400h +WS_CLIPCHILDREN = 00200h +WS_MAXIMIZE = 00100h +WS_CAPTION = 000C0h ; WS_BORDER | WS_DLGFRAME +WS_BORDER = 00080h +WS_DLGFRAME = 00040h +WS_VSCROLL = 00020h +WS_HSCROLL = 00010h +WS_SYSMENU = 00008h +WS_THICKFRAME = 00004h +WS_HREDRAW = 00002h +WS_VREDRAW = 00001h +WS_GROUP = 00002h +WS_TABSTOP = 00001h +WS_MINIMIZEBOX = 00002h +WS_MAXIMIZEBOX = 00001h + +; Common Window Styles + +WS_OVERLAPPEDWINDOW = WS_OVERLAPPED + WS_CAPTION + WS_SYSMENU + WS_THICKFRAME + WS_MINIMIZEBOX + WS_MAXIMIZEBOX +WS_POPUPWINDOW = WS_POPUP + WS_BORDER + WS_SYSMENU +WS_CHILDWINDOW = WS_CHILD +WS_TILEDWINDOW = WS_OVERLAPPEDWINDOW + +WS_TILED = WS_OVERLAPPED +WS_ICONIC = WS_MINIMIZE +WS_SIZEBOX = WS_THICKFRAME + +; Extended Window Styles (low words) +WS_EX_DLGMODALFRAME = 0001 +WS_EX_DRAGOBJECT = 0002 +WS_EX_NOPARENTNOTIFY = 0004 +WS_EX_TOPMOST = 0008 + +; +; predefined clipboard formats +; +CF_TEXT = 1 +CF_BITMAP = 2 +CF_METAFILEPICT = 3 +CF_SYLK = 4 +CF_DIF = 5 +CF_TIFF = 6 +CF_OEMTEXT = 7 +CF_DIB = 8 +CF_PALETTE = 9 +CF_PENDATA = 10 +CF_RIFF = 11 +CF_WAVE = 12 + +CF_OWNERDISPLAY = 80h ; owner display +CF_DSPTEXT = 81h ; display text +CF_DSPBITMAP = 82h ; display bitmap +CF_DSPMETAFILEPICT = 83h ; display metafile +; +; Private clipboard format range +; +CF_PRIVATEFIRST = 200h ; Anything in this range doesn't +CF_PRIVATELAST = 2ffh ; get GlobalFree'd +CF_GDIOBJFIRST = 300h ; Anything in this range gets +CF_GDIOBJLAST = 3ffh ; DeleteObject'ed + + +MAKEINTRESOURCE MACRO a + mov ax,a + xor dx,dx + ENDM +; +; Predefined resource types +; +RT_CURSOR = 1 ; must be passed through MAKEINTRESOURCE +RT_BITMAP = 2 +RT_ICON = 3 +RT_MENU = 4 +RT_DIALOG = 5 +RT_STRING = 6 +RT_FONTDIR = 7 +RT_FONT = 8 +RT_ACCELERATOR = 9 +RT_RCDATA = 10 + +;** NOTE: if any new resource types are introduced above this point, then the +;** value of DIFFERENCE must be changed. +;** (RT_GROUP_CURSOR - RT_CURSOR) must always be equal to DIFFERENCE +;** (RT_GROUP_ICON - RT_ICON) must always be equal to DIFFERENCE + +DIFFERENCE = 11 + +RT_GROUP_CURSOR = RT_CURSOR + DIFFERENCE +RT_GROUP_ICON = RT_ICON + DIFFERENCE + + + +IFNDEF NOMDI +MDICREATESTRUCT struc + szClass dd ? + szTitle dd ? + hOwner dw ? + x dw ? + y dw ? + cxc dw ? + cyc dw ? + style dd ? +MDICREATESTRUCT ends + +CLIENTCREATESTRUCT struc + hWindowMenu dw ? + idFirstChild dw ? +CLIENTCREATESTRUCT ends +ENDIF + +; NOMDI + + +PALETTEENTRY struc + peRed db ? + peGreen db ? + peBlue db ? + peFlags db ? +PALETTEENTRY ends + +; Logical Palette +LOGPALETTE struc + palVersion dw ? + palNumEntries dw ? + palPalEntry db ? ; array of PALETTEENTRY +LOGPALETTE ends + +; DRAWITEMSTRUCT for ownerdraw +DRAWITEMSTRUCT struc + drCtlType dw ? + drCtlID dw ? + dritemID dw ? + dritemAction dw ? + dritemState dw ? + drhwndItem dw ? + drhDC dw ? + drrcItem DB size RECT dup(?) + dritemData dd ? +DRAWITEMSTRUCT ends + +; DELETEITEMSTRUCT for ownerdraw +DELETEITEMSTRUCT struc + deCtlType dw ? + deCtlID dw ? + deitemID dw ? + dehwndItem dw ? + deitemData dd ? +DELETEITEMSTRUCT ends + +; MEASUREITEMSTRUCT for ownerdraw +MEASUREITEMSTRUCT struc + meCtlType dw ? + meCtlID dw ? + meitemID dw ? + meitemWidth dw ? + meitemHeight dw ? + meitemData dd ? +MEASUREITEMSTRUCT ends + +; COMPAREITEMSTUCT for ownerdraw sorting +COMPAREITEMSTRUCT struc + coCtlType dw ? + coCtlID dw ? + cohwndItem dw ? + coitemID1 dw ? + coitemData1 dd ? + coitemID2 dw ? + coitemData2 dd ? +COMPAREITEMSTRUCT ends + +; Owner draw control types +ODT_MENU = 1 +ODT_LISTBOX = 2 +ODT_COMBOBOX = 3 +ODT_BUTTON = 4 + +; Owner draw actions +ODA_DRAWENTIRE = 1 +ODA_SELECT = 2 +ODA_FOCUS = 4 + +; Owner draw state +ODS_SELECTED = 0001h +ODS_GRAYED = 0002h +ODS_DISABLED = 0004h +ODS_CHECKED = 0008h +ODS_FOCUS = 0010h + +; PeekMessage() Options +PM_NOREMOVE = 0000h +PM_REMOVE = 0001h +PM_NOYIELD = 0002h + +; SetWindowPos Flags +SWP_NOSIZE = 0001h +SWP_NOMOVE = 0002h +SWP_NOZORDER = 0004h +SWP_NOREDRAW = 0008h +SWP_NOACTIVATE = 0010h +SWP_DRAWFRAME = 0020h +SWP_SHOWWINDOW = 0040h +SWP_HIDEWINDOW = 0080h +SWP_NOCOPYBITS = 0100h +SWP_NOREPOSITION = 0200h + + +IFNDEF NOWINMESSAGES + +; Listbox messages +LB_ADDSTRING = (WM_USER+1) +LB_INSERTSTRING = (WM_USER+2) +LB_DELETESTRING = (WM_USER+3) +LB_RESETCONTENT = (WM_USER+5) +LB_SETSEL = (WM_USER+6) +LB_SETCURSEL = (WM_USER+7) +LB_GETSEL = (WM_USER+8) +LB_GETCURSEL = (WM_USER+9) +LB_GETTEXT = (WM_USER+10) +LB_GETTEXTLEN = (WM_USER+11) +LB_GETCOUNT = (WM_USER+12) +LB_SELECTSTRING = (WM_USER+13) +LB_DIR = (WM_USER+14) +LB_GETTOPINDEX = (WM_USER+15) +LB_FINDSTRING = (WM_USER+16) +LB_GETSELCOUNT = (WM_USER+17) +LB_GETSELITEMS = (WM_USER+18) +LB_SETTABSTOPS = (WM_USER+19) +LB_GETHORIZONTALEXTENT = (WM_USER+20) +LB_SETHORIZONTALEXTENT = (WM_USER+21) +LB_SETTOPINDEX = (WM_USER+24) +LB_GETITEMRECT = (WM_USER+25) +LB_GETITEMDATA = (WM_USER+26) +LB_SETITEMDATA = (WM_USER+27) +LB_SELITEMRANGE = (WM_USER+28) +LB_SETCARETINDEX = (WM_USER+31) +LB_GETCARETINDEX = (WM_USER+32) +IFNDEF NOWIN31 +LB_SETITEMHEIGHT = (WM_USER+33) +LB_GETITEMHEIGHT = (WM_USER+34) +LB_FINDSTRINGEXACT = (WM_USER+35) +ENDIF + +ENDIF +; NOWINMESSAGES + +; Listbox Styles +LBS_NOTIFY = 0001h +LBS_SORT = 0002h +LBS_NOREDRAW = 0004h +LBS_MULTIPLESEL = 0008h +LBS_OWNERDRAWFIXED = 0010h +LBS_OWNERDRAWVARIABLE = 0020h +LBS_HASSTRINGS = 0040h +LBS_USETABSTOPS = 0080h +LBS_NOINTEGRALHEIGHT = 0100h +LBS_MULTICOLUMN = 0200h +LBS_WANTKEYBOARDINPUT = 0400h +LBS_EXTENDEDSEL = 0800h +LBS_STANDARD = LBS_NOTIFY + LBS_SORT + WS_VSCROLL + WS_BORDER +LBS_DISABLENOSCROLL = 1000h + +; Listbox Notification Codes +LBN_ERRSPACE = (-2) +LBN_SELCHANGE = 1 +LBN_DBLCLK = 2 +LBN_SELCANCEL = 3 +LBN_SETFOCUS = 4 +LBN_KILLFOCUS = 5 + +IFNDEF NOWINMESSAGES + +; Edit Control Messages +EM_GETSEL = (WM_USER+0) +EM_SETSEL = (WM_USER+1) +EM_GETRECT = (WM_USER+2) +EM_SETRECT = (WM_USER+3) +EM_SETRECTNP = (WM_USER+4) +EM_SCROLL = (WM_USER+5) +EM_LINESCROLL = (WM_USER+6) +EM_GETMODIFY = (WM_USER+8) +EM_SETMODIFY = (WM_USER+9) +EM_GETLINECOUNT = (WM_USER+10) +EM_LINEINDEX = (WM_USER+11) +EM_SETHANDLE = (WM_USER+12) +EM_GETHANDLE = (WM_USER+13) +EM_LINELENGTH = (WM_USER+17) +EM_REPLACESEL = (WM_USER+18) +EM_SETFONT = (WM_USER+19) +EM_GETLINE = (WM_USER+20) +EM_LIMITTEXT = (WM_USER+21) +EM_CANUNDO = (WM_USER+22) +EM_UNDO = (WM_USER+23) +EM_FMTLINES = (WM_USER+24) +EM_LINEFROMCHAR = (WM_USER+25) +EM_SETWORDBREAK = (WM_USER+26) +EM_SETTABSTOPS = (WM_USER+27) +EM_SETPASSWORDCHAR = (WM_USER+28) +EM_EMPTYUNDOBUFFER = (WM_USER+29) +IFNDEF NOWIN31 +EM_GETFIRSTVISIBLELINE = (WM_USER+30) +EM_SETREADONLY = (WM_USER+31) +EM_SETWORDBREAKPROC = (WM_USER+32) +EM_GETWORDBREAKPROC = (WM_USER+33) +EM_GETPASSWORDCHAR = (WM_USER+34) +ENDIF + +ENDIF +; NOWINMESSAGES + + +; Edit Control Styles (low word) +ES_LEFT = 0000h +ES_CENTER = 0001h +ES_RIGHT = 0002h +ES_MULTILINE = 0004h +ES_UPPERCASE = 0008h +ES_LOWERCASE = 0010h +ES_PASSWORD = 0020h +ES_AUTOVSCROLL = 0040h +ES_AUTOHSCROLL = 0080h +ES_NOHIDESEL = 0100h +ES_OEMCONVERT = 0400h +IFNDEF NOWIN31 +ES_READONLY = 0800h +ES_WANTRETURN = 1000h +ENDIF + + +; Edit Control Notification Codes +EN_SETFOCUS = 0100h +EN_KILLFOCUS = 0200h +EN_CHANGE = 0300h +EN_UPDATE = 0400h +EN_ERRSPACE = 0500h +EN_MAXTEXT = 0501h +EN_HSCROLL = 0601h +EN_VSCROLL = 0602h + +IFNDEF NOWINMESSAGES + +; Button Control Messages +BM_GETCHECK = (WM_USER+0) +BM_SETCHECK = (WM_USER+1) +BM_GETSTATE = (WM_USER+2) +BM_SETSTATE = (WM_USER+3) +BM_SETSTYLE = (WM_USER+4) + +ENDIF +; NOWINMESSAGES + +; Button Control Styles (low word) +BS_PUSHBUTTON = 00h +BS_DEFPUSHBUTTON = 01h +BS_CHECKBOX = 02h +BS_AUTOCHECKBOX = 03h +BS_RADIOBUTTON = 04h +BS_3STATE = 05h +BS_AUTO3STATE = 06h +BS_GROUPBOX = 07h +BS_USERBUTTON = 08h +BS_AUTORADIOBUTTON = 09h +BS_OWNERDRAW = 0Bh +BS_LEFTTEXT = 20h + +; User Button Notification Codes +BN_CLICKED = 0 +BN_PAINT = 1 +BN_HILITE = 2 +BN_UNHILITE = 3 +BN_DISABLE = 4 +BN_DOUBLECLICKED = 5 + +; Dialog Styles (low words) +DS_ABSALIGN = 01h +DS_SYSMODAL = 02h +DS_LOCALEDIT = 20h ;/* Edit items get Local storage. */ +DS_SETFONT = 40h ;/* User specified font for Dlg controls */ +DS_MODALFRAME = 80h ;/* Can be combined with WS_CAPTION */ +DS_NOIDLEMSG = 100h ;/* WM_ENTERIDLE message will not be sent */ + +IFNDEF NOWINMESSAGES + +; Dialog box messages +DM_GETDEFID = (WM_USER+0) +DM_SETDEFID = (WM_USER+1) + +ENDIF ;NOWINMESSAGES + +; Dialog Codes +DLGC_WANTARROWS = 0001h ; /* Control wants arrow keys */ +DLGC_WANTTAB = 0002h ; /* Control wants tab keys */ +DLGC_WANTALLKEYS = 0004h ; /* Control wants all keys */ +DLGC_WANTMESSAGE = 0004h ; /* Pass message to control */ +DLGC_HASSETSEL = 0008h ; /* Understands EM_SETSEL message */ +DLGC_DEFPUSHBUTTON = 0010h ; /* Default pushbutton */ +DLGC_UNDEFPUSHBUTTON= 0020h ; /* Non-default pushbutton */ +DLGC_RADIOBUTTON = 0040h ; /* Radio button */ +DLGC_WANTCHARS = 0080h ; /* Want WM_CHAR messages */ +DLGC_STATIC = 0100h ; /* Static item: don't include */ +DLGC_BUTTON = 2000h ; /* Button item: can be checked */ + +; Combo Box return Values +CB_OKAY = 0 +CB_ERR = (-1) +CB_ERRSPACE = (-2) + +; Combo Box Notification Codes +CBN_ERRSPACE = (-1) +CBN_SELCHANGE = 1 +CBN_DBLCLK = 2 +CBN_SETFOCUS = 3 +CBN_KILLFOCUS = 4 +CBN_EDITCHANGE = 5 +CBN_EDITUPDATE = 6 +CBN_DROPDOWN = 7 + +; Combo Box styles (low words) +CBS_SIMPLE = 0001h +CBS_DROPDOWN = 0002h +CBS_DROPDOWNLIST = 0003h +CBS_OWNERDRAWFIXED = 0010h +CBS_OWNERDRAWVARIABLE= 0020h +CBS_AUTOHSCROLL = 0040h +CBS_OEMCONVERT = 0080h +CBS_SORT = 0100h +CBS_HASSTRINGS = 0200h +CBS_NOINTEGRALHEIGHT = 0400h + +IFNDEF NOWINMESSAGES + +; Combo Box messages +CB_GETEDITSEL = (WM_USER+0) +CB_LIMITTEXT = (WM_USER+1) +CB_SETEDITSEL = (WM_USER+2) +CB_ADDSTRING = (WM_USER+3) +CB_DELETESTRING = (WM_USER+4) +CB_DIR = (WM_USER+5) +CB_GETCOUNT = (WM_USER+6) +CB_GETCURSEL = (WM_USER+7) +CB_GETLBTEXT = (WM_USER+8) +CB_GETLBTEXTLEN = (WM_USER+9) +CB_INSERTSTRING = (WM_USER+10) +CB_RESETCONTENT = (WM_USER+11) +CB_FINDSTRING = (WM_USER+12) +CB_SELECTSTRING = (WM_USER+13) +CB_SETCURSEL = (WM_USER+14) +CB_SHOWDROPDOWN = (WM_USER+15) +CB_GETITEMDATA = (WM_USER+16) +CB_SETITEMDATA = (WM_USER+17) +IFNDEF NOWIN31 +CB_GETDROPPEDCONTROLRECT = (WM_USER+18) +CB_SETITEMHEIGHT = (WM_USER+19) +CB_GETITEMHEIGHT = (WM_USER+20) +CB_SETEXTENDEDUI = (WM_USER+21) +CB_GETEXTENDEDUI = (WM_USER+22) +CB_GETDROPPEDSTATE = (WM_USER+23) +CB_FINDSTRINGEXACT = (WM_USER+24) +ENDIF + +ENDIF ; NOWINMESSAGES + +; Static Control styles (low word) +SS_LEFT = 00h +SS_CENTER = 01h +SS_RIGHT = 02h +SS_ICON = 03h +SS_BLACKRECT = 04h +SS_GRAYRECT = 05h +SS_WHITERECT = 06h +SS_BLACKFRAME = 07h +SS_GRAYFRAME = 08h +SS_WHITEFRAME = 09h +SS_SIMPLE = 0Bh +SS_LEFTNOWORDWRAP = 0Ch +SS_NOPREFIX = 80h ; Don't do "&" character translation + +IFNDEF NOWIN31 +IFNDEF NOWINMESSAGES + +;Static Control Messages +STM_SETICON = (WM_USER+0) +STM_GETICON = (WM_USER+1) +ENDIF +ENDIF + +; Scroll Bar Styles (low word) +SBS_HORZ = 0000h +SBS_VERT = 0001h +SBS_TOPALIGN = 0002h +SBS_LEFTALIGN = 0002h +SBS_BOTTOMALIGN = 0004h +SBS_RIGHTALIGN = 0004h +SBS_SIZEBOXTOPLEFTALIGN = 0002h +SBS_SIZEBOXBOTTOMRIGHTALIGN = 0004h +SBS_SIZEBOX = 0008h + +IFNDEF NOSYSMETRICS + +; GetSystemMetrics() codes +SM_CXSCREEN = 0 +SM_CYSCREEN = 1 +SM_CXVSCROLL = 2 +SM_CYHSCROLL = 3 +SM_CYCAPTION = 4 +SM_CXBORDER = 5 +SM_CYBORDER = 6 +SM_CXDLGFRAME = 7 +SM_CYDLGFRAME = 8 +SM_CYVTHUMB = 9 +SM_CXHTHUMB = 10 +SM_CXICON = 11 +SM_CYICON = 12 +SM_CXCURSOR = 13 +SM_CYCURSOR = 14 +SM_CYMENU = 15 +SM_CXFULLSCREEN = 16 +SM_CYFULLSCREEN = 17 +SM_CYKANJIWINDOW = 18 +SM_MOUSEPRESENT = 19 +SM_CYVSCROLL = 20 +SM_CXHSCROLL = 21 +SM_DEBUG = 22 +SM_SWAPBUTTON = 23 +SM_RESERVED1 = 24 +SM_RESERVED2 = 25 +SM_RESERVED3 = 26 +SM_RESERVED4 = 27 +SM_CXMIN = 28 +SM_CYMIN = 29 +SM_CXSIZE = 30 +SM_CYSIZE = 31 +SM_CXFRAME = 32 +SM_CYFRAME = 33 +SM_CXMINTRACK = 34 +SM_CYMINTRACK = 35 +IFNDEF NOWIN31 +SM_CXDOUBLECLK = 36 +SM_CYDOUBLECLK = 37 +SM_CXICONSPACING = 38 +SM_CYICONSPACING = 39 +SM_MENUDROPALIGNMENT = 40 +SM_PENWINDOWS = 41 +SM_DBCSENABLED = 42 +ENDIF +SM_CMETRICSMAX = 43 + +ENDIF ;NOSYSMETRICS + +IFNDEF NOCOLOR + +COLOR_SCROLLBAR = 0 +COLOR_BACKGROUND = 1 +COLOR_ACTIVECAPTION = 2 +COLOR_INACTIVECAPTION = 3 +COLOR_MENU = 4 +COLOR_WINDOW = 5 +COLOR_WINDOWFRAME = 6 +COLOR_MENUTEXT = 7 +COLOR_WINDOWTEXT = 8 +COLOR_CAPTIONTEXT = 9 +COLOR_ACTIVEBORDER = 10 +COLOR_INACTIVEBORDER = 11 +COLOR_APPWORKSPACE = 12 +COLOR_HIGHLIGHT = 13 +COLOR_HIGHLIGHTTEXT = 14 +COLOR_BTNFACE = 15 +COLOR_BTNSHADOW = 16 +COLOR_GRAYTEXT = 17 +COLOR_BTNTEXT = 18 +IFNDEF NOWIN31 +COLOR_INACTIVECAPTIONTEXT = 19 +COLOR_BTNHILIGHT = 20 +ENDIF +ENDIF ;NOCOLOR + +; Commands to pass WinHelp() +HELP_CONTEXT =0001h ;/* Display topic in ulTopic */ +HELP_QUIT =0002h ;/* Terminate help */ +HELP_INDEX =0003h ;/* Display index */ +HELP_HELPONHELP =0004h ;/* Display help on using help */ +HELP_SETINDEX =0005h ;/* Set the current Index for multi index help */ +HELP_KEY =0101h ;/* Display topic for keyword in offabData */ + +IFNDEF NOCOMM + +NOPARITY = 0 +ODDPARITY = 1 +EVENPARITY = 2 +MARKPARITY = 3 +SPACEPARITY = 4 + +ONESTOPBIT = 0 +ONE5STOPBITS = 1 +TWOSTOPBITS = 2 + +IGNORE = 0 ; /* Ignore signal */ +INFINITE = 0FFFFh ; /* Infinite timeout */ + +; Error Flags +CE_RXOVER = 0001h ; /* Receive Queue overflow */ +CE_OVERRUN = 0002h ; /* Receive Overrun Error */ +CE_RXPARITY = 0004h ; /* Receive Parity Error */ +CE_FRAME = 0008h ; /* Receive Framing error */ +CE_BREAK = 0010h ; /* Break Detected */ +CE_CTSTO = 0020h ; /* CTS Timeout */ +CE_DSRTO = 0040h ; /* DSR Timeout */ +CE_RLSDTO = 0080h ; /* RLSD Timeout */ +CE_TXFULL = 0100h ; /* TX Queue is full */ +CE_PTO = 0200h ; /* LPTx Timeout */ +CE_IOE = 0400h ; /* LPTx I/O Error */ +CE_DNS = 0800h ; /* LPTx Device not selected */ +CE_OOP = 1000h ; /* LPTx Out-Of-Paper */ +CE_MODE = 8000h ; /* Requested mode unsupported */ + +IE_BADID = (-1) ; /* Invalid or unsupported id */ +IE_OPEN = (-2) ; /* Device Already Open */ +IE_NOPEN = (-3) ; /* Device Not Open */ +IE_MEMORY = (-4) ; /* Unable to allocate queues */ +IE_DEFAULT = (-5) ; /* Error in default parameters */ +IE_HARDWARE = (-10) ; /* Hardware Not Present */ +IE_BYTESIZE = (-11) ; /* Illegal Byte Size */ +IE_BAUDRATE = (-12) ; /* Unsupported BaudRate */ + +; Events +EV_RXCHAR = 0001h ; /* Any Character received */ +EV_RXFLAG = 0002h ; /* Received certain character */ +EV_TXEMPTY = 0004h ; /* Transmitt Queue Empty */ +EV_CTS = 0008h ; /* CTS changed state */ +EV_DSR = 0010h ; /* DSR changed state */ +EV_RLSD = 0020h ; /* RLSD changed state */ +EV_BREAK = 0040h ; /* BREAK received */ +EV_ERR = 0080h ; /* Line status error occurred */ +EV_RING = 0100h ; /* Ring signal detected */ +EV_PERR = 0200h ; /* Printer error occured */ +EV_CTSS = 0400h ; /* CTS state */ +EV_DSRS = 0800h ; /* DSR state */ +EV_RLSDS = 1000h ; /* RLSD state */ +EV_RingTe = 2000h ; /* Ring Trailing Edge Indicator */ + + +; Escape Functions +SETXOFF = 1 ; /* Simulate XOFF received */ +SETXON = 2 ; /* Simulate XON received */ +SETRTS = 3 ; /* Set RTS high */ +CLRRTS = 4 ; /* Set RTS low */ +SETDTR = 5 ; /* Set DTR high */ +CLRDTR = 6 ; /* Set DTR low */ +RESETDEV = 7 ; /* Reset device if possible */ + +LPTx = 80h ; /* Set if ID is for LPT device */ + +IFNDEF NOWIN31 +; new escape functions +GETMAXLPT equ 8 ; Max supported LPT id +GETMAXCOM equ 9 ; Max supported COM id +GETBASEIRQ equ 10 ; Get port base & irq for a port + +; Comm Baud Rate indices +CBR_110 equ 0FF10h +CBR_300 equ 0FF11h +CBR_600 equ 0FF12h +CBR_1200 equ 0FF13h +CBR_2400 equ 0FF14h +CBR_4800 equ 0FF15h +CBR_9600 equ 0FF16h +CBR_14400 equ 0FF17h +CBR_19200 equ 0FF18h +; 0FF19h (reserved) +; 0FF1Ah (reserved) +CBR_38400 equ 0FF1Bh +; 0FF1Ch (reserved) +; 0FF1Dh (reserved) +; 0FF1Eh (reserved) +CBR_56000 equ 0FF1Fh +; 0FF20h (reserved) +; 0FF21h (reserved) +; 0FF22h (reserved) +CBR_128000 equ 0FF23h +; 0FF24h (reserved) +; 0FF25h (reserved) +; 0FF26h (reserved) +CBR_256000 equ 0FF27h + +; notifications passed in low word of lParam on WM_COMMNOTIFY messages +CN_RECEIVE equ 1 ; bytes are available in the input queue +CN_TRANSMIT equ 2 ; fewer than wOutTrigger bytes still + ; remain in the output queue waiting + ; to be transmitted. +CN_EVENT equ 4 ; an enabled event has occurred + +ENDIF + + +DCB struc + DCB_Id db ? ; /* Internal Device ID */ + DCB_BaudRate dw ? ; /* Baudrate at which runing */ + DCB_ByteSize db ? ; /* Number of bits/byte, 4-8 */ + DCB_Parity db ? ; /* 0-4=None,Odd,Even,Mark,Space */ + DCB_StopBits db ? ; /* 0,1,2 = 1, 1.5, 2 */ + DCB_RlsTimeout dw ? ; /* Timeout for RLSD to be set */ + DCB_CtsTimeout dw ? ; /* Timeout for CTS to be set */ + DCB_DsrTimeout dw ? ; /* Timeout for DSR to be set */ + + DCB_BitMask1 db ? + + ; BYTE fBinary: 1; /* Binary Mode (skip EOF check */ + ; BYTE fRtsDisable:1; /* Don't assert RTS at init time */ + ; BYTE fParity: 1; /* Enable parity checking */ + ; BYTE fOutxCtsFlow:1; /* CTS handshaking on output */ + ; BYTE fOutxDsrFlow:1; /* DSR handshaking on output */ + ; BYTE fDummy: 2; /* Reserved */ + ; BYTE fDtrDisable:1; /* Don't assert DTR at init time */ + + DCB_BitMask2 db ? + + ; BYTE fOutX: 1; /* Enable output X-ON/X-OFF */ + ; BYTE fInX: 1; /* Enable input X-ON/X-OFF */ + ; BYTE fPeChar: 1; /* Enable Parity Err Replacement */ + ; BYTE fNull: 1; /* Enable Null stripping */ + ; BYTE fChEvt: 1; /* Enable Rx character event. */ + ; BYTE fDtrflow: 1; /* DTR handshake on input */ + ; BYTE fRtsflow: 1; /* RTS handshake on input */ + ; BYTE fDummy2: 1; + + DCB_XonChar db ? ; /* Tx and Rx X-ON character */ + DCB_XoffChar db ? ; /* Tx and Rx X-OFF character */ + DCB_XonLim dw ? ; /* Transmit X-ON threshold */ + DCB_XoffLim dw ? ; /* Transmit X-OFF threshold */ + DCB_PeChar db ? ; /* Parity error replacement char */ + DCB_EofChar db ? ; /* End of Input character */ + DCB_EvtChar db ? ; /* Recieved Event character */ + DCB_TxDelay dw ? ; /* Amount of time between chars */ +DCB ends + +COMSTAT struc + COMS_BitMask1 db ? + +; BYTE fCtsHold: 1; /* Transmit is on CTS hold */ +; BYTE fDsrHold: 1; /* Transmit is on DSR hold */ +; BYTE fRlsdHold: 1; /* Transmit is on RLSD hold */ +; BYTE fXoffHold: 1; /* Received handshake */ +; BYTE fXoffSent: 1; /* Issued handshake */ +; BYTE fEof: 1; /* End of file character found */ +; BYTE fTxim: 1; /* Character being transmitted */ + + + COMS_cbInQue dw ? ; /* count of characters in Rx Queue */ + COMS_cbOutQue dw ? ; /* count of characters in Tx Queue */ +COMSTAT ends + +ENDIF ;NOCOM + +; +; Installable Driver Support +; +; Driver Messages +DRV_LOAD = 0001h +DRV_ENABLE = 0002h +DRV_OPEN = 0003h +DRV_CLOSE = 0004h +DRV_DISABLE = 0005h +DRV_FREE = 0006h +DRV_CONFIGURE = 0007h +DRV_QUERYCONFIGURE = 0008h +DRV_INSTALL = 0009h +DRV_REMOVE = 000Ah +DRV_EXITSESSION = 000Bh +DRV_POWER = 000Fh +DRV_RESERVED = 0800h +DRV_USER = 4000h + +;LPARAM of DRV_CONFIGURE message and return values +DRVCONFIGINFO struc + DRVCNF_dwDCISize dw ? + DRVCNF_lpszDCISectionName dd ? + DRVCNF_lpszDCIAliasName dd ? +DRVCONFIGINFO ends + +DRVCNF_CANCEL = 0000h +DRVCNF_OK = 0001h +DRVCNF_RESTART = 0002h + + +IFNDEF NOKERNEL +; +; Common Kernel errors +; +ERR_GALLOC = 01030h ; GlobalAlloc Failed +ERR_GREALLOC = 01031h ; GlobalReAlloc Failed +ERR_GLOCK = 01032h ; GlobalLock Failed +ERR_LALLOC = 01033h ; LocalAlloc Failed +ERR_LREALLOC = 01034h ; LocalReAlloc Failed +ERR_LLOCK = 01035h ; LocalLock Failed +ERR_ALLOCRES = 01036h ; AllocResource Failed +ERR_LOCKRES = 01037h ; LockResource Failed +ERR_LOADMODULE = 01038h ; LoadModule failed + +; +; Common User Errors +; +ERR_CREATEDLG = 01045h ; /* Create Dlg failure due to LoadMenu failure */ +ERR_CREATEDLG2 = 01046h ; /* Create Dlg failure due to CreateWindow Failure */ +ERR_REGISTERCLASS = 01047h ; /* RegisterClass failure due to Class already registered */ +ERR_DCBUSY = 01048h ; /* DC Cache is full */ +ERR_CREATEWND = 01049h ; /* Create Wnd failed due to class not found */ +ERR_STRUCEXTRA = 01050h ; /* Unallocated Extra space is used */ +ERR_LOADSTR = 01051h ; /* LoadString() failed */ +ERR_LOADMENU = 01052h ; /* LoadMenu Failed */ +ERR_NESTEDBEGINPAINT = 01053h ; /* Nested BeginPaint() calls */ +ERR_BADINDEX = 01054h ; /* Bad index to Get/Set Class/Window Word/Long */ +ERR_CREATEMENU = 01055h ; /* Error creating menu */ + +; +; Common GDI Errors +; +ERR_CREATEDC = 01070h ; /* CreateDC/CreateIC etc., failure */ +ERR_CREATEMETA = 01071h ; /* CreateMetafile failure */ +ERR_DELOBJSELECTED = 01072h ; /* Bitmap being deleted is selected into DC */ +ERR_SELBITMAP = 01073h ; /* Bitmap being selected is already selected elsewhere */ + +ENDIF ;NOKERNEL diff --git a/private/oleauto/tools/win16/hdos/c800/include/windowsx.h b/private/oleauto/tools/win16/hdos/c800/include/windowsx.h new file mode 100644 index 000000000..d86138ad6 --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/windowsx.h @@ -0,0 +1,1109 @@ +/*****************************************************************************\ +* * +* windowsx.h - Macro APIs, window message crackers, and control APIs * +* * +* Version 3.10 * +* * +* Copyright (c) 1992, Microsoft Corp. All rights reserved. * +* * +\*****************************************************************************/ + +#ifndef _INC_WINDOWSX +#define _INC_WINDOWSX + +#ifndef RC_INVOKED +#pragma pack(1) /* Assume byte packing throughout */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +extern "C" { /* Assume C declarations for C++ */ +#endif /* __cplusplus */ + +/****** KERNEL Macro APIs ****************************************************/ + +#define GetInstanceModule(hInstance) \ + GetModuleHandle((LPCSTR)MAKELP(0, hInstance)) + +#define GlobalPtrHandle(lp) \ + ((HGLOBAL)LOWORD(GlobalHandle(SELECTOROF(lp)))) + +#define GlobalLockPtr(lp) \ + ((BOOL)SELECTOROF(GlobalLock(GlobalPtrHandle(lp)))) +#define GlobalUnlockPtr(lp) \ + GlobalUnlock(GlobalPtrHandle(lp)) + +#define GlobalAllocPtr(flags, cb) \ + (GlobalLock(GlobalAlloc((flags), (cb)))) +#define GlobalReAllocPtr(lp, cbNew, flags) \ + (GlobalUnlockPtr(lp), GlobalLock(GlobalReAlloc(GlobalPtrHandle(lp) , (cbNew), (flags)))) +#define GlobalFreePtr(lp) \ + (GlobalUnlockPtr(lp), (BOOL)GlobalFree(GlobalPtrHandle(lp))) + +/****** GDI Macro APIs *******************************************************/ + +#define DeletePen(hpen) DeleteObject((HGDIOBJ)(HPEN)(hpen)) +#define SelectPen(hdc, hpen) ((HPEN)SelectObject((hdc), (HGDIOBJ)(HPEN)(hpen))) +#define GetStockPen(i) ((HPEN)GetStockObject(i)) + +#define DeleteBrush(hbr) DeleteObject((HGDIOBJ)(HBRUSH)(hbr)) +#define SelectBrush(hdc, hbr) ((HBRUSH)SelectObject((hdc), (HGDIOBJ)(HBRUSH)(hbr))) +#define GetStockBrush(i) ((HBRUSH)GetStockObject(i)) + +#define DeleteRgn(hrgn) DeleteObject((HGDIOBJ)(HRGN)(hrgn)) + +#define CopyRgn(hrgnDst, hrgnSrc) CombineRgn(hrgnDst, hrgnSrc, 0, RGN_COPY) +#define IntersectRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_AND) +#define SubtractRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_DIFF) +#define UnionRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_OR) +#define XorRgn(hrgnResult, hrgnA, hrgnB) CombineRgn(hrgnResult, hrgnA, hrgnB, RGN_XOR) + +#define DeletePalette(hpal) DeleteObject((HGDIOBJ)(HPALETTE)(hpal)) + +#define DeleteFont(hfont) DeleteObject((HGDIOBJ)(HFONT)(hfont)) +#define SelectFont(hdc, hfont) ((HFONT)SelectObject((hdc), (HGDIOBJ)(HFONT)(hfont))) +#define GetStockFont(i) ((HFONT)GetStockObject(i)) + +#define DeleteBitmap(hbm) DeleteObject((HGDIOBJ)(HBITMAP)(hbm)) +#define SelectBitmap(hdc, hbm) ((HBITMAP)SelectObject((hdc), (HGDIOBJ)(HBITMAP)(hbm))) + +#define InsetRect(lprc, dx, dy) InflateRect((lprc), -(dx), -(dy)) + +/****** USER Macro APIs ******************************************************/ + +#define GetWindowInstance(hwnd) ((HINSTANCE)GetWindowWord(hwnd, GWW_HINSTANCE)) + +#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE)) +#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE)) + +#define GetWindowOwner(hwnd) GetWindow(hwnd, GW_OWNER) + +#define GetFirstChild(hwnd) GetTopWindow(hwnd) +#define GetFirstSibling(hwnd) GetWindow(hwnd, GW_HWNDFIRST) +#define GetLastSibling(hwnd) GetWindow(hwnd, GW_HWNDLAST) +#define GetNextSibling(hwnd) GetWindow(hwnd, GW_HWNDNEXT) +#define GetPrevSibling(hwnd) GetWindow(hwnd, GW_HWNDPREV) + +#define GetWindowID(hwnd) GetDlgCtrlID(hwnd) + +#define SetWindowRedraw(hwnd, fRedraw) \ + ((void)SendMessage(hwnd, WM_SETREDRAW, (WPARAM)(BOOL)(fRedraw), 0L)) + +#define SubclassWindow(hwnd, lpfn) \ + ((WNDPROC)SetWindowLong((hwnd), GWL_WNDPROC, (LPARAM)(WNDPROC)(lpfn))) + +#define IsMinimized(hwnd) IsIconic(hwnd) +#define IsMaximized(hwnd) IsZoomed(hwnd) +#define IsRestored(hwnd) ((GetWindowStyle(hwnd) & (WS_MINIMIZE | WS_MAXIMIZE)) == 0L) + +#define SetWindowFont(hwnd, hfont, fRedraw) FORWARD_WM_SETFONT((hwnd), (hfont), (fRedraw), SendMessage) + +#define GetWindowFont(hwnd) FORWARD_WM_GETFONT((hwnd), SendMessage) + +#if (WINVER >= 0x030a) +#define MapWindowRect(hwndFrom, hwndTo, lprc) \ + MapWindowPoints((hwndFrom), (hwndTo), (POINT FAR*)(lprc), 2) +#endif /* WINVER >= 0x030a */ + +#define IsLButtonDown() (GetKeyState(VK_LBUTTON) < 0) +#define IsRButtonDown() (GetKeyState(VK_RBUTTON) < 0) +#define IsMButtonDown() (GetKeyState(VK_MBUTTON) < 0) + +#define SubclassDialog(hwndDlg, lpfn) \ + ((DLGPROC)SetWindowLong(hwndDlg, DWL_DLGPROC, (LPARAM)(DLGPROC)(lpfn))) + +#define SetDlgMsgResult(hwnd, msg, result) \ + (((msg) == WM_CTLCOLOR || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || \ + (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG) \ + ? (BOOL)LOWORD(result) : (SetWindowLong((hwnd), DWL_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE)) + +#define DefDlgProcEx(hwnd, msg, wParam, lParam, pfRecursion) \ + (*(pfRecursion) = TRUE, DefDlgProc(hwnd, msg, wParam, lParam)) + +#define CheckDefDlgRecursion(pfRecursion) \ + if (*(pfRecursion)) { *(pfRecursion) = FALSE; return FALSE; } + +/****** Message crackers ****************************************************/ + +#define HANDLE_MSG(hwnd, message, fn) \ + case (message): return HANDLE_##message((hwnd), (wParam), (lParam), (fn)) + +/* void Cls_OnCompacting(HWND hwnd, UINT compactRatio); */ +#define HANDLE_WM_COMPACTING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_COMPACTING(hwnd, compactRatio, fn) \ + (void)(fn)((hwnd), WM_COMPACTING, (WPARAM)(UINT)(compactRatio), 0L) + +/* void Cls_OnWinIniChange(HWND hwnd, LPCSTR lpszSectionName); */ +#define HANDLE_WM_WININICHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_WININICHANGE(hwnd, lpszSectionName, fn) \ + (void)(fn)((hwnd), WM_WININICHANGE, 0, (LPARAM)(LPCSTR)(lpszSectionName)) + +/* void Cls_OnSysColorChange(HWND hwnd); */ +#define HANDLE_WM_SYSCOLORCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_SYSCOLORCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_SYSCOLORCHANGE, 0, 0L) + +/* BOOL Cls_OnQueryNewPalette(HWND hwnd); */ +#define HANDLE_WM_QUERYNEWPALETTE(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYNEWPALETTE(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYNEWPALETTE, 0, 0L) + +/* void Cls_OnPaletteIsChanging(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTEISCHANGING(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTEISCHANGING(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTEISCHANGING, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnPaletteChanged(HWND hwnd, HWND hwndPaletteChange); */ +#define HANDLE_WM_PALETTECHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_PALETTECHANGED(hwnd, hwndPaletteChange, fn) \ + (void)(fn)((hwnd), WM_PALETTECHANGED, (WPARAM)(HWND)(hwndPaletteChange), 0L) + +/* void Cls_OnFontChange(HWND hwnd); */ +#define HANDLE_WM_FONTCHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_FONTCHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_FONTCHANGE, 0, 0L) + +/* void Cls_OnSpoolerStatus(HWND hwnd, UINT status, int cJobInQueue); */ +#define HANDLE_WM_SPOOLERSTATUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SPOOLERSTATUS(hwnd, status, cJobInQueue, fn) \ + (void)(fn)((hwnd), WM_SPOOLERSTATUS, (WPARAM)(status), MAKELPARAM((UINT)(cJobInQueue), 0)) + +/* void Cls_OnDevModeChange(HWND hwnd, LPCSTR lpszDeviceName); */ +#define HANDLE_WM_DEVMODECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_DEVMODECHANGE(hwnd, lpszDeviceName, fn) \ + (void)(fn)((hwnd), WM_DEVMODECHANGE, 0,(LPARAM)(LPCSTR)(lpszDeviceName)) + +/* void Cls_OnTimeChange(HWND hwnd); */ +#define HANDLE_WM_TIMECHANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_TIMECHANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_TIMECHANGE, 0, 0L) + +/* void Cls_OnPower(HWND hwnd, int code); */ +#define HANDLE_WM_POWER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_POWER(hwnd, code, fn) \ + (void)(fn)((hwnd), WM_POWER, (WPARAM)(code), 0L) + +/* BOOL Cls_OnQueryEndSession(HWND hwnd); */ +#define HANDLE_WM_QUERYENDSESSION(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYENDSESSION(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYENDSESSION, 0, 0L) + +/* void Cls_OnEndSession(HWND hwnd, BOOL fEnding); */ +#define HANDLE_WM_ENDSESSION(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENDSESSION(hwnd, fEnding, fn) \ + (void)(fn)((hwnd), WM_ENDSESSION, (WPARAM)(BOOL)(fEnding), 0L) + +/* void Cls_OnQuit(HWND hwnd, int exitCode); */ +#define HANDLE_WM_QUIT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_QUIT(hwnd, exitCode, fn) \ + (void)(fn)((hwnd), WM_QUIT, (WPARAM)(exitCode), 0L) + +/* void Cls_OnSystemError(HWND hwnd, int errCode); */ +#define HANDLE_WM_SYSTEMERROR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam)), 0L) +#define FORWARD_WM_SYSTEMERROR(hwnd, errCode, fn) \ + (void)(fn)((hwnd), WM_SYSTEMERROR, (WPARAM)(errCode), 0L) + +/* BOOL Cls_OnCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_CREATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) ? 0L : (LRESULT)-1L) +#define FORWARD_WM_CREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_CREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* BOOL Cls_OnNCCreate(HWND hwnd, CREATESTRUCT FAR* lpCreateStruct) */ +#define HANDLE_WM_NCCREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (CREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_NCCREATE(hwnd, lpCreateStruct, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCCREATE, 0, (LPARAM)(CREATESTRUCT FAR*)(lpCreateStruct)) + +/* void Cls_OnDestroy(HWND hwnd); */ +#define HANDLE_WM_DESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROY, 0, 0L) + +/* void Cls_OnNCDestroy(HWND hwnd); */ +#define HANDLE_WM_NCDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_NCDESTROY(hwnd, fn) \ + (void)(fn)((hwnd), WM_NCDESTROY, 0, 0L) + +/* void Cls_OnShowWindow(HWND hwnd, BOOL fShow, UINT status); */ +#define HANDLE_WM_SHOWWINDOW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_SHOWWINDOW(hwnd, fShow, status, fn) \ + (void)(fn)((hwnd), WM_SHOWWINDOW, (WPARAM)(BOOL)(fShow), MAKELPARAM((UINT)(status), 0)) + +/* void Cls_OnSetRedraw(HWND hwnd, BOOL fRedraw); */ +#define HANDLE_WM_SETREDRAW(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_SETREDRAW(hwnd, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETREDRAW, (WPARAM)(fRedraw), 0L) + +/* void Cls_OnEnable(HWND hwnd, BOOL fEnable); */ +#define HANDLE_WM_ENABLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam)), 0L) +#define FORWARD_WM_ENABLE(hwnd, fEnable, fn) \ + (void)(fn)((hwnd), WM_ENABLE, (WPARAM)(BOOL)(fEnable), 0L) + +/* void Cls_OnSetText(HWND hwnd, LPCSTR lpszText); */ +#define HANDLE_WM_SETTEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (LPCSTR)(lParam)), 0L) +#define FORWARD_WM_SETTEXT(hwnd, lpszText, fn) \ + (void)(fn)((hwnd), WM_SETTEXT, 0, (LPARAM)(LPCSTR)(lpszText)) + +/* INT Cls_OnGetText(HWND hwnd, int cchTextMax, LPSTR lpszText) */ +#define HANDLE_WM_GETTEXT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (int)(wParam), (LPSTR)(lParam)) +#define FORWARD_WM_GETTEXT(hwnd, cchTextMax, lpszText, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXT, (WPARAM)(int)(cchTextMax), (LPARAM)(LPSTR)(lpszText)) + +/* INT Cls_OnGetTextLength(HWND hwnd); */ +#define HANDLE_WM_GETTEXTLENGTH(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)(hwnd) +#define FORWARD_WM_GETTEXTLENGTH(hwnd, fn) \ + (int)(DWORD)(fn)((hwnd), WM_GETTEXTLENGTH, 0, 0L) + +/* BOOL Cls_OnWindowPosChanging(HWND hwnd, WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGING(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (WINDOWPOS FAR*)(lParam)) +#define FORWARD_WM_WINDOWPOSCHANGING(hwnd, lpwpos, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_WINDOWPOSCHANGING, 0, (LPARAM)(WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnWindowPosChanged(HWND hwnd, const WINDOWPOS FAR* lpwpos); */ +#define HANDLE_WM_WINDOWPOSCHANGED(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const WINDOWPOS FAR*)(lParam)), 0L) +#define FORWARD_WM_WINDOWPOSCHANGED(hwnd, lpwpos, fn) \ + (void)(fn)((hwnd), WM_WINDOWPOSCHANGED, 0, (LPARAM)(const WINDOWPOS FAR*)(lpwpos)) + +/* void Cls_OnMove(HWND hwnd, int x, int y); */ +#define HANDLE_WM_MOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_MOVE(hwnd, x, y, fn) \ + (void)(fn)((hwnd), WM_MOVE, 0, MAKELPARAM((int)(x), (int)(y))) + +/* void Cls_OnSize(HWND hwnd, UINT state, int cx, int cy); */ +#define HANDLE_WM_SIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SIZE(hwnd, state, cx, cy, fn) \ + (void)(fn)((hwnd), WM_SIZE, (WPARAM)(UINT)(state), MAKELPARAM((int)(cx), (int)(cy))) + +/* void Cls_OnClose(HWND hwnd); */ +#define HANDLE_WM_CLOSE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLOSE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLOSE, 0, 0L) + +/* BOOL Cls_OnQueryOpen(HWND hwnd); */ +#define HANDLE_WM_QUERYOPEN(hwnd, wParam, lParam, fn) \ + MAKELRESULT((BOOL)(fn)(hwnd), 0) +#define FORWARD_WM_QUERYOPEN(hwnd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_QUERYOPEN, 0, 0L) + +/* void Cls_OnGetMinMaxInfo(HWND hwnd, MINMAXINFO FAR* lpMinMaxInfo); */ +#define HANDLE_WM_GETMINMAXINFO(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MINMAXINFO FAR*)(lParam)), 0L) +#define FORWARD_WM_GETMINMAXINFO(hwnd, lpMinMaxInfo, fn) \ + (void)(fn)((hwnd), WM_GETMINMAXINFO, 0, (LPARAM)(MINMAXINFO FAR*)(lpMinMaxInfo)) + +/* void Cls_OnPaint(HWND hwnd); */ +#define HANDLE_WM_PAINT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PAINT(hwnd, fn) \ + (void)(fn)((hwnd), WM_PAINT, 0, 0L) + +/* BOOL Cls_OnEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* BOOL Cls_OnIconEraseBkgnd(HWND hwnd, HDC hdc); */ +#define HANDLE_WM_ICONERASEBKGND(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HDC)(wParam)) +#define FORWARD_WM_ICONERASEBKGND(hwnd, hdc, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_ICONERASEBKGND, (WPARAM)(HDC)(hdc), 0L) + +/* void Cls_OnNCPaint(HWND hwnd, HRGN hrgn); */ +#define HANDLE_WM_NCPAINT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HRGN)(wParam)), 0L) +#define FORWARD_WM_NCPAINT(hwnd, hrgn, fn) \ + (void)(fn)((hwnd), WM_NCPAINT, (WPARAM)(HRGN)(hrgn), 0L) + +/* UINT Cls_OnNCCalcSize(HWND hwnd, BOOL fCalcValidRects, NCCALCSIZE_PARAMS FAR* lpcsp) */ +#define HANDLE_WM_NCCALCSIZE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (NCCALCSIZE_PARAMS FAR*)(lParam)) +#define FORWARD_WM_NCCALCSIZE(hwnd, fCalcValidRects, lpcsp, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCCALCSIZE, (WPARAM)(fCalcValidRects), (LPARAM)(NCCALCSIZE_PARAMS FAR*)(lpcsp)) + +/* UINT Cls_OnNCHitTest(HWND hwnd, int x, int y); */ +#define HANDLE_WM_NCHITTEST(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_NCHITTEST(hwnd, x, y, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_NCHITTEST, 0, MAKELPARAM((int)(x), (int)(y))) + +/* HICON Cls_OnQueryDragIcon(HWND hwnd); */ +#define HANDLE_WM_QUERYDRAGICON(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_QUERYDRAGICON(hwnd, fn) \ + (HICON)(UINT)(DWORD)(fn)((hwnd), WM_QUERYDRAGICON, 0, 0L) + +#ifdef _INC_SHELLAPI +/* void Cls_OnDropFiles(HWND hwnd, HDROP hdrop); */ +#define HANDLE_WM_DROPFILES(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HDROP)(wParam)), 0L) +#define FORWARD_WM_DROPFILES(hwnd, hdrop, fn) \ + (void)(fn)((hwnd), WM_DROPFILES, (WPARAM)(hdrop), 0L) +#endif /* _INC_SHELLAPI */ + +/* void Cls_OnActivate(HWND hwnd, UINT state, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_ACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATE(hwnd, state, hwndActDeact, fMinimized, fn) \ + (void)(fn)((hwnd), WM_ACTIVATE, (WPARAM)(UINT)(state), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnActivateApp(HWND hwnd, BOOL fActivate, HTASK htaskActDeact); */ +#define HANDLE_WM_ACTIVATEAPP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HTASK)LOWORD(lParam)), 0L) +#define FORWARD_WM_ACTIVATEAPP(hwnd, fActivate, htaskActDeact, fn) \ + (void)(fn)((hwnd), WM_ACTIVATEAPP, (WPARAM)(BOOL)(fActivate), MAKELPARAM((htaskActDeact),0)) + +/* BOOL Cls_OnNCActivate(HWND hwnd, BOOL fActive, HWND hwndActDeact, BOOL fMinimized); */ +#define HANDLE_WM_NCACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (BOOL)HIWORD(lParam)) +#define FORWARD_WM_NCACTIVATE(hwnd, fActive, hwndActDeact, fMinimized, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_NCACTIVATE, (WPARAM)(BOOL)(fActive), MAKELPARAM((UINT)(HWND)(hwndActDeact), (UINT)(BOOL)(fMinimized))) + +/* void Cls_OnSetFocus(HWND hwnd, HWND hwndOldFocus) */ +#define HANDLE_WM_SETFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_SETFOCUS(hwnd, hwndOldFocus, fn) \ + (void)(fn)((hwnd), WM_SETFOCUS, (WPARAM)(HWND)(hwndOldFocus), 0L) + +/* void Cls_OnKillFocus(HWND hwnd, HWND hwndNewFocus); */ +#define HANDLE_WM_KILLFOCUS(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_KILLFOCUS(hwnd, hwndNewFocus, fn) \ + (void)(fn)((hwnd), WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_KEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_KEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_KEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_CHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_CHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_DEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_DEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_DEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat),0)) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), TRUE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYDOWN(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYDOWN, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysKey(HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags); */ +#define HANDLE_WM_SYSKEYUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), FALSE, (int)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSKEYUP(hwnd, vk, cRepeat, flags, fn) \ + (void)(fn)((hwnd), WM_SYSKEYUP, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(cRepeat), (UINT)(flags))) + +/* void Cls_OnSysChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnSysDeadChar(HWND hwnd, UINT ch, int cRepeat); */ +#define HANDLE_WM_SYSDEADCHAR(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_SYSDEADCHAR(hwnd, ch, cRepeat, fn) \ + (void)(fn)((hwnd), WM_SYSDEADCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(cRepeat), 0)) + +/* void Cls_OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MOUSEMOVE(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MOUSEMOVE, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_LBUTTONDBLCLK : WM_LBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnLButtonUp(HWND hwnd, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_LBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_LBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_LBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_RBUTTONDBLCLK : WM_RBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_RBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnRButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_RBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_RBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_RBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONDOWN(hwnd, fDoubleClick, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_MBUTTONDBLCLK : WM_MBUTTONDOWN, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags); */ +#define HANDLE_WM_MBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnMButtonUp(HWND hwnd, int x, int y, UINT flags); */ +#define HANDLE_WM_MBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_MBUTTONUP(hwnd, x, y, keyFlags, fn) \ + (void)(fn)((hwnd), WM_MBUTTONUP, (WPARAM)(UINT)(keyFlags), MAKELPARAM((x), (y))) + +/* void Cls_OnNCMouseMove(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMOUSEMOVE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMOUSEMOVE(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMOUSEMOVE, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCLBUTTONDBLCLK : WM_NCLBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y))) + +/* void Cls_OnNCLButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCLButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCLBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCLBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCLBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCRBUTTONDBLCLK : WM_NCRBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCRButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCRButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCRBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCRBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCRBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDOWN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), FALSE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONDOWN(hwnd, fDoubleClick, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), (fDoubleClick) ? WM_NCMBUTTONDBLCLK : WM_NCMBUTTONDOWN, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* void Cls_OnNCMButtonDown(HWND hwnd, BOOL fDoubleClick, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONDBLCLK(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), TRUE, (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) + +/* void Cls_OnNCMButtonUp(HWND hwnd, int x, int y, UINT codeHitTest); */ +#define HANDLE_WM_NCMBUTTONUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)LOWORD(lParam), (int)HIWORD(lParam), (UINT)(wParam)), 0L) +#define FORWARD_WM_NCMBUTTONUP(hwnd, x, y, codeHitTest, fn) \ + (void)(fn)((hwnd), WM_NCMBUTTONUP, (WPARAM)(UINT)(codeHitTest), MAKELPARAM((x), (y)) ) + +/* int Cls_OnMouseActivate(HWND hwnd, HWND hwndTopLevel, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_MOUSEACTIVATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)) +#define FORWARD_WM_MOUSEACTIVATE(hwnd, hwndTopLevel, codeHitTest, msg, fn) \ + (int)(DWORD)(fn)((hwnd), WM_MOUSEACTIVATE, (WPARAM)(HWND)(hwndTopLevel), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnCancelMode(HWND hwnd); */ +#define HANDLE_WM_CANCELMODE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CANCELMODE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CANCELMODE, 0, 0L) + +/* void Cls_OnTimer(HWND hwnd, UINT id); */ +#define HANDLE_WM_TIMER(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam)), 0L) +#define FORWARD_WM_TIMER(hwnd, id, fn) \ + (void)(fn)((hwnd), WM_TIMER, (WPARAM)(UINT)(id), 0L) + +/* void Cls_OnInitMenu(HWND hwnd, HMENU hMenu); */ +#define HANDLE_WM_INITMENU(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam)), 0L) +#define FORWARD_WM_INITMENU(hwnd, hMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENU, (WPARAM)(HMENU)(hMenu), 0L) + +/* void Cls_OnInitMenuPopup(HWND hwnd, HMENU hMenu, int item, BOOL fSystemMenu); */ +#define HANDLE_WM_INITMENUPOPUP(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)(wParam), (int)LOWORD(lParam), (BOOL)HIWORD(lParam)), 0L) +#define FORWARD_WM_INITMENUPOPUP(hwnd, hMenu, item, fSystemMenu, fn) \ + (void)(fn)((hwnd), WM_INITMENUPOPUP, (WPARAM)(HMENU)(hMenu), MAKELPARAM((item),(fSystemMenu))) + +/* void Cls_OnMenuSelect(HWND hwnd, HMENU hmenu, int item, HMENU hmenuPopup, UINT flags); */ +#define HANDLE_WM_MENUSELECT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HMENU)HIWORD(lParam), (LOWORD(lParam) & MF_POPUP) ? 0 : (int)(wParam), \ + (LOWORD(lParam) & MF_POPUP) ? (HMENU)(wParam) : 0, LOWORD(lParam)), 0L) +#define FORWARD_WM_MENUSELECT(hwnd, hmenu, item, hmenuPopup, flags, fn) \ + (void)(fn)((hwnd), WM_MENUSELECT, ((flags) & MF_POPUP) ? (WPARAM)(HMENU)(hmenuPopup) : (WPARAM)(int)(item), MAKELPARAM((flags), (hmenu))) + +/* DWORD Cls_OnMenuChar(HWND hwnd, UINT ch, UINT flags, HMENU hmenu); */ +#define HANDLE_WM_MENUCHAR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam), LOWORD(lParam), (HMENU)HIWORD(lParam)); +#define FORWARD_WM_MENUCHAR(hwnd, ch, flags, hmenu, fn) \ + (DWORD)(fn)((hwnd), WM_MENUCHAR, (WPARAM)(UINT)(ch), MAKELPARAM((flags), (UINT)(hmenu))) + +/* void Cls_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify); */ +#define HANDLE_WM_COMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_COMMAND(hwnd, id, hwndCtl, codeNotify, fn) \ + (void)(fn)((hwnd), WM_COMMAND, (WPARAM)(int)(id), MAKELPARAM((UINT)(hwndCtl), (codeNotify))) + +/* void Cls_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_HSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnVScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos); */ +#define HANDLE_WM_VSCROLL(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)HIWORD(lParam), (UINT)(wParam), (int)LOWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLL(hwnd, hwndCtl, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLL, (WPARAM)(UINT)(code), MAKELPARAM((pos), (UINT)(hwndCtl))) + +/* void Cls_OnCut(HWND hwnd); */ +#define HANDLE_WM_CUT(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CUT(hwnd, fn) \ + (void)(fn)((hwnd), WM_CUT, 0, 0L) + +/* void Cls_OnCopy(HWND hwnd); */ +#define HANDLE_WM_COPY(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_COPY(hwnd, fn) \ + (void)(fn)((hwnd), WM_COPY, 0, 0L) + +/* void Cls_OnPaste(HWND hwnd); */ +#define HANDLE_WM_PASTE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_PASTE(hwnd, fn) \ + (void)(fn)((hwnd), WM_PASTE, 0, 0L) + +/* void Cls_OnClear(HWND hwnd); */ +#define HANDLE_WM_CLEAR(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CLEAR(hwnd, fn) \ + (void)(fn)((hwnd), WM_CLEAR, 0, 0L) + +/* void Cls_OnUndo(HWND hwnd); */ +#define HANDLE_WM_UNDO(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_UNDO(hwnd, fn) \ + (void)(fn)((hwnd), WM_UNDO, 0, 0L) + +/* HANDLE Cls_OnRenderFormat(HWND hwnd, UINT fmt); */ +#define HANDLE_WM_RENDERFORMAT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HANDLE)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_RENDERFORMAT(hwnd, fmt, fn) \ + (HANDLE)(UINT)(DWORD)(fn)((hwnd), WM_RENDERFORMAT, (WPARAM)(UINT)(fmt), 0L) + +/* void Cls_OnRenderAllFormats(HWND hwnd); */ +#define HANDLE_WM_RENDERALLFORMATS(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_RENDERALLFORMATS(hwnd, fn) \ + (void)(fn)((hwnd), WM_RENDERALLFORMATS, 0, 0L) + +/* void Cls_OnDestroyClipboard(HWND hwnd); */ +#define HANDLE_WM_DESTROYCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DESTROYCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DESTROYCLIPBOARD, 0, 0L) + +/* void Cls_OnDrawClipboard(HWND hwnd); */ +#define HANDLE_WM_DRAWCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_DRAWCLIPBOARD(hwnd, fn) \ + (void)(fn)((hwnd), WM_DRAWCLIPBOARD, 0, 0L) + +/* void Cls_OnPaintClipboard(HWND hwnd, HWND hwndCBViewer, const PAINTSTRUCT FAR* lpPaintStruct) */ +#define HANDLE_WM_PAINTCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const PAINTSTRUCT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_PAINTCLIPBOARD(hwnd, hwndCBViewer, lpPaintStruct, fn) \ + (void)(fn)((hwnd), WM_PAINTCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lpPaintStruct)) + +/* void Cls_OnSizeClipboard(HWND hwnd, HWND hwndCBViewer, const RECT FAR* lprc); */ +#define HANDLE_WM_SIZECLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (const RECT FAR*)GlobalLock((HGLOBAL)LOWORD(lParam))), GlobalUnlock((HGLOBAL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SIZECLIPBOARD(hwnd, hwndCBViewer, lprc, fn) \ + (void)(fn)((hwnd), WM_SIZECLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), (LPARAM)(lprc)) + +/* void Cls_OnVScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_VSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_VSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_VSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnHScrollClipboard(HWND hwnd, HWND hwndCBViewer, UINT code, int pos); */ +#define HANDLE_WM_HSCROLLCLIPBOARD(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_HSCROLLCLIPBOARD(hwnd, hwndCBViewer, code, pos, fn) \ + (void)(fn)((hwnd), WM_HSCROLLCLIPBOARD, (WPARAM)(HWND)(hwndCBViewer), MAKELPARAM((code), (pos))) + +/* void Cls_OnAskCBFormatName(HWND hwnd, int cchMax, LPSTR rgchName); */ +#define HANDLE_WM_ASKCBFORMATNAME(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), (LPSTR)(lParam)), 0L) +#define FORWARD_WM_ASKCBFORMATNAME(hwnd, cchMax, rgchName, fn) \ + (void)(fn)((hwnd), WM_ASKCBFORMATNAME, (WPARAM)(int)(cchMax), (LPARAM)(rgchName)) + +/* void Cls_OnChangeCBChain(HWND hwnd, HWND hwndRemove, HWND hwndNext); */ +#define HANDLE_WM_CHANGECBCHAIN(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_CHANGECBCHAIN(hwnd, hwndRemove, hwndNext, fn) \ + (void)(fn)((hwnd), WM_CHANGECBCHAIN, (WPARAM)(HWND)(hwndRemove), MAKELPARAM((UINT)(hwndNext), 0)) + +/* BOOL Cls_OnSetCursor(HWND hwnd, HWND hwndCursor, UINT codeHitTest, UINT msg); */ +#define HANDLE_WM_SETCURSOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(BOOL)(fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)); +#define FORWARD_WM_SETCURSOR(hwnd, hwndCursor, codeHitTest, msg, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_SETCURSOR, (WPARAM)(HWND)(hwndCursor), MAKELPARAM((codeHitTest), (msg))) + +/* void Cls_OnSysCommand(HWND hwnd, UINT cmd, int x, int y); */ +#define HANDLE_WM_SYSCOMMAND(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (int)LOWORD(lParam), (int)HIWORD(lParam)), 0L) +#define FORWARD_WM_SYSCOMMAND(hwnd, cmd, x, y, fn) \ + (void)(fn)((hwnd), WM_SYSCOMMAND, (WPARAM)(UINT)(cmd), MAKELPARAM((x), (y))) + +/* HWND Cls_MDICreate(HWND hwnd, const MDICREATESTRUCT FAR* lpmcs); */ +#define HANDLE_WM_MDICREATE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (MDICREATESTRUCT FAR*)(lParam)) +#define FORWARD_WM_MDICREATE(hwnd, lpmcs, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDICREATE, 0, (LPARAM)(lpmcs)) + +/* void Cls_MDIDestroy(HWND hwnd, HWND hwndDestroy); */ +#define HANDLE_WM_MDIDESTROY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIDESTROY(hwnd, hwndDestroy, fn) \ + (void)(fn)((hwnd), WM_MDIDESTROY, (WPARAM)(hwndDestroy), 0L) + +/* NOTE: Usable only by MDI client windows */ +/* void Cls_MDIActivate(HWND hwnd, BOOL fActive, HWND hwndActivate, HWND hwndDeactivate); */ +#define HANDLE_WM_MDIACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (BOOL)(wParam), (HWND)LOWORD(lParam), (HWND)HIWORD(lParam)), 0L) +#define FORWARD_WM_MDIACTIVATE(hwnd, fActive, hwndActivate, hwndDeactivate, fn) \ + (void)(fn)(hwnd, WM_MDIACTIVATE, (WPARAM)(fActive), MAKELPARAM((hwndActivate), (hwndDeactivate))) + +/* void Cls_MDIRestore(HWND hwnd, HWND hwndRestore); */ +#define HANDLE_WM_MDIRESTORE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIRESTORE(hwnd, hwndRestore, fn) \ + (void)(fn)((hwnd), WM_MDIRESTORE, (WPARAM)(hwndRestore), 0L) + +/* HWND Cls_MDINext(HWND hwnd, HWND hwndCur, BOOL fPrev); */ +#define HANDLE_WM_MDINEXT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_MDINEXT(hwnd, hwndCur, fPrev, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDINEXT, (WPARAM)(hwndCur), MAKELPARAM((fPrev), 0)) + +/* void Cls_MDIMaximize(HWND hwnd, HWND hwndMaximize); */ +#define HANDLE_WM_MDIMAXIMIZE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HWND)(wParam)), 0L) +#define FORWARD_WM_MDIMAXIMIZE(hwnd, hwndMaximize, fn) \ + (void)(fn)((hwnd), WM_MDIMAXIMIZE, (WPARAM)(hwndMaximize), 0L) + +/* BOOL Cls_MDITile(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDITILE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDITILE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDITILE, (WPARAM)(cmd), 0L) + +/* BOOL Cls_MDICascade(HWND hwnd, UINT cmd); */ +#define HANDLE_WM_MDICASCADE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(fn)((hwnd), (UINT)(wParam)) +#define FORWARD_WM_MDICASCADE(hwnd, cmd, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_MDICASCADE, (WPARAM)(cmd), 0L) + +/* void Cls_MDIIconArrange(HWND hwnd); */ +#define HANDLE_WM_MDIICONARRANGE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_MDIICONARRANGE(hwnd, fn) \ + (void)(fn)((hwnd), WM_MDIICONARRANGE, 0, 0L) + +/* HWND Cls_MDIGetActive(HWND hwnd); */ +#define HANDLE_WM_MDIGETACTIVE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd) +#define FORWARD_WM_MDIGETACTIVE(hwnd, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_MDIGETACTIVE, 0, 0L) + +/* HMENU Cls_MDISetMenu(HWND hwnd, BOOL fRefresh, HMENU hmenuFrame, HMENU hmenuWindow); */ +#define HANDLE_WM_MDISETMENU(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)((hwnd), (BOOL)(wParam), (HMENU)LOWORD(lParam), (HMENU)HIWORD(lParam)) +#define FORWARD_WM_MDISETMENU(hwnd, fRefresh, hmenuFrame, hmenuWindow, fn) \ + (HMENU)(UINT)(DWORD)(fn)((hwnd), WM_MDISETMENU, (WPARAM)(fRefresh), MAKELPARAM((hmenuFrame), (hmenuWindow))) + +/* void Cls_OnChildActivate(HWND hwnd); */ +#define HANDLE_WM_CHILDACTIVATE(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_CHILDACTIVATE(hwnd, fn) \ + (void)(fn)((hwnd), WM_CHILDACTIVATE, 0, 0L) + +/* BOOL Cls_OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam); */ +#define HANDLE_WM_INITDIALOG(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(BOOL)(fn)((hwnd), (HWND)(wParam), lParam); +#define FORWARD_WM_INITDIALOG(hwnd, hwndFocus, lParam, fn) \ + (BOOL)(DWORD)(fn)((hwnd), WM_INITDIALOG, (WPARAM)(HWND)(hwndFocus), (lParam)) + +/* HWND Cls_OnNextDlgCtl(HWND hwnd, HWND hwndSetFocus, BOOL fNext) */ +#define HANDLE_WM_NEXTDLGCTL(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HWND)(fn)((hwnd), (HWND)(wParam), (BOOL)LOWORD(lParam)) +#define FORWARD_WM_NEXTDLGCTL(hwnd, hwndSetFocus, fNext, fn) \ + (HWND)(UINT)(DWORD)(fn)((hwnd), WM_NEXTDLGCTL, (WPARAM)(HWND)(hwndSetFocus), MAKELPARAM((fNext), 0)) + +/* void Cls_OnParentNotify(HWND hwnd, UINT msg, HWND hwndChild, int idChild); */ +#define HANDLE_WM_PARENTNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L) +#define FORWARD_WM_PARENTNOTIFY(hwnd, msg, hwndChild, idChild, fn) \ + (void)(fn)((hwnd), WM_PARENTNOTIFY, (WPARAM)(UINT)(msg), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(idChild))) + +/* void Cls_OnEnterIdle(HWND hwnd, UINT source, HWND hwndSource); */ +#define HANDLE_WM_ENTERIDLE(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam)), 0L) +#define FORWARD_WM_ENTERIDLE(hwnd, source, hwndSource, fn) \ + (void)(fn)((hwnd), WM_ENTERIDLE, (WPARAM)(UINT)(source), MAKELPARAM((UINT)(HWND)(hwndSource), 0)) + +/* UINT Cls_OnGetDlgCode(HWND hwnd, MSG FAR* lpmsg); */ +#define HANDLE_WM_GETDLGCODE(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(fn)(hwnd, (MSG FAR*)(lParam)) +#define FORWARD_WM_GETDLGCODE(hwnd, lpmsg, fn) \ + (UINT)(DWORD)(fn)((hwnd), WM_GETDLGCODE, (SELECTOROF(lpmsg) ? lpmsg->wParam : 0), (LPARAM)(lpmsg)) + +/* HBRUSH Cls_OnCtlColor(HWND hwnd, HDC hdc, HWND hwndChild, int type); */ +#define HANDLE_WM_CTLCOLOR(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)LOWORD(lParam), (int)(HIWORD(lParam))) +#define FORWARD_WM_CTLCOLOR(hwnd, hdc, hwndChild, type, fn) \ + (HBRUSH)(UINT)(DWORD)(fn)((hwnd), WM_CTLCOLOR, (WPARAM)(HDC)(hdc), MAKELPARAM((UINT)(HWND)(hwndChild), (UINT)(int)(type))) + +/* void Cls_OnSetFont(HWND hwndCtl, HFONT hfont, BOOL fRedraw); */ +#define HANDLE_WM_SETFONT(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (HFONT)(wParam), (BOOL)LOWORD(lParam)), 0L) +#define FORWARD_WM_SETFONT(hwnd, hfont, fRedraw, fn) \ + (void)(fn)((hwnd), WM_SETFONT, (WPARAM)(HFONT)(hfont), MAKELPARAM((UINT)(BOOL)(fRedraw), 0)) + +/* HFONT Cls_OnGetFont(HWND hwnd); */ +#define HANDLE_WM_GETFONT(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(UINT)(HFONT)(fn)(hwnd) +#define FORWARD_WM_GETFONT(hwnd, fn) \ + (HFONT)(UINT)(DWORD)(fn)((hwnd), WM_GETFONT, 0, 0L) + +/* void Cls_OnDrawItem(HWND hwnd, const DRAWITEMSTRUCT FAR* lpDrawItem); */ +#define HANDLE_WM_DRAWITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DRAWITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DRAWITEM(hwnd, lpDrawItem, fn) \ + (void)(fn)((hwnd), WM_DRAWITEM, 0, (LPARAM)(const DRAWITEMSTRUCT FAR*)(lpDrawItem)) + +/* void Cls_OnMeasureItem(HWND hwnd, MEASUREITEMSTRUCT FAR* lpMeasureItem); */ +#define HANDLE_WM_MEASUREITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (MEASUREITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_MEASUREITEM(hwnd, lpMeasureItem, fn) \ + (void)(fn)((hwnd), WM_MEASUREITEM, 0, (LPARAM)(MEASUREITEMSTRUCT FAR*)(lpMeasureItem)) + +/* void Cls_OnDeleteItem(HWND hwnd, const DELETEITEMSTRUCT FAR* lpDeleteItem) */ +#define HANDLE_WM_DELETEITEM(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (const DELETEITEMSTRUCT FAR*)(lParam)), 0L) +#define FORWARD_WM_DELETEITEM(hwnd, lpDeleteItem, fn) \ + (void)(fn)((hwnd), WM_DELETEITEM, 0, (LPARAM)(const DELETEITEMSTRUCT FAR*)(lpDeleteItem)) + +/* int Cls_OnCompareItem(HWND hwnd, const COMPAREITEMSTRUCT FAR* lpCompareItem); */ +#define HANDLE_WM_COMPAREITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (const COMPAREITEMSTRUCT FAR*)(lParam)) +#define FORWARD_WM_COMPAREITEM(hwnd, lpCompareItem, fn) \ + (int)(DWORD)(fn)((hwnd), WM_COMPAREITEM, 0, (LPARAM)(const COMPAREITEMSTRUCT FAR*)(lpCompareItem)) + +/* int Cls_OnVkeyToItem(HWND hwnd, UINT vk, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_VKEYTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_VKEYTOITEM(hwnd, vk, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_VKEYTOITEM, (WPARAM)(UINT)(vk), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* int Cls_OnCharToItem(HWND hwnd, UINT ch, HWND hwndListbox, int iCaret); */ +#define HANDLE_WM_CHARTOITEM(hwnd, wParam, lParam, fn) \ + (LRESULT)(DWORD)(int)(fn)((hwnd), (UINT)(wParam), (HWND)LOWORD(lParam), (int)HIWORD(lParam)) +#define FORWARD_WM_CHARTOITEM(hwnd, ch, hwndListBox, iCaret, fn) \ + (int)(DWORD)(fn)((hwnd), WM_CHARTOITEM, (WPARAM)(UINT)(ch), MAKELPARAM((UINT)(hwndListBox), (UINT)(iCaret))) + +/* void Cls_OnQueueSync(HWND hwnd); */ +#define HANDLE_WM_QUEUESYNC(hwnd, wParam, lParam, fn) \ + ((fn)(hwnd), 0L) +#define FORWARD_WM_QUEUESYNC(hwnd, fn) \ + (void)(fn)((hwnd), WM_QUEUESYNC, 0, 0L) + +/* void Cls_OnCommNotify(HWND hwnd, int cid, UINT flags); */ +#define HANDLE_WM_COMMNOTIFY(hwnd, wParam, lParam, fn) \ + ((fn)((hwnd), (int)(wParam), LOWORD(lParam)), 0L) +#define FORWARD_WM_COMMNOTIFY(hwnd, cid, flags, fn) \ + (void)(fn)((hwnd), WM_COMMNOTIFY, (WPARAM)(cid), MAKELPARAM((flags), 0)) + +/****** Static control message APIs ******************************************/ + +#define Static_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Static_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Static_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Static_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Static_SetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_SETICON, (WPARAM)(HICON)(hIcon), 0L)) +#define Static_GetIcon(hwndCtl, hIcon) ((HICON)(UINT)(DWORD)SendMessage((hwndCtl), STM_GETICON, 0, 0L)) + +/****** Button control message APIs ******************************************/ + +#define Button_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Button_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Button_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Button_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Button_GetCheck(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETCHECK, 0, 0L)) +#define Button_SetCheck(hwndCtl, check) ((void)SendMessage((hwndCtl), BM_SETCHECK, (WPARAM)(int)(check), 0L)) + +#define Button_GetState(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), BM_GETSTATE, 0, 0L)) +#define Button_SetState(hwndCtl, state) ((UINT)(DWORD)SendMessage((hwndCtl), BM_SETSTATE, (WPARAM)(int)(state), 0L)) + +#define Button_SetStyle(hwndCtl, style, fRedraw) ((void)SendMessage((hwndCtl), BM_SETSTYLE, (WPARAM)LOWORD(style), MAKELPARAM(((fRedraw) ? TRUE : FALSE), 0))) + +/****** Edit control message APIs ********************************************/ + +#define Edit_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define Edit_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define Edit_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define Edit_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define Edit_LimitText(hwndCtl, cchMax) ((void)SendMessage((hwndCtl), EM_LIMITTEXT, (WPARAM)(cchMax), 0L)) + +#define Edit_GetLineCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINECOUNT, 0, 0L)) +#define Edit_GetLine(hwndCtl, line, lpch, cchMax) ((*((int FAR*)(lpch)) = (cchMax)), ((int)(DWORD)SendMessage((hwndCtl), EM_GETLINE, (WPARAM)(int)(line), (LPARAM)(LPSTR)(lpch)))) + +#define Edit_GetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_GETRECT, 0, (LPARAM)(RECT FAR*)(lprc))) +#define Edit_SetRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECT, 0, (LPARAM)(const RECT FAR*)(lprc))) +#define Edit_SetRectNoPaint(hwndCtl, lprc) ((void)SendMessage((hwndCtl), EM_SETRECTNP, 0, (LPARAM)(const RECT FAR*)(lprc))) + +#define Edit_GetSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), EM_GETSEL, 0, 0L)) +#define Edit_SetSel(hwndCtl, ichStart, ichEnd) ((void)SendMessage((hwndCtl), EM_SETSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) +#define Edit_ReplaceSel(hwndCtl, lpszReplace) ((void)SendMessage((hwndCtl), EM_REPLACESEL, 0, (LPARAM)(LPCSTR)(lpszReplace))) + +#define Edit_GetModify(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_GETMODIFY, 0, 0L)) +#define Edit_SetModify(hwndCtl, fModified) ((void)SendMessage((hwndCtl), EM_SETMODIFY, (WPARAM)(UINT)(fModified), 0L)) + +#define Edit_LineFromChar(hwndCtl, ich) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEFROMCHAR, (WPARAM)(int)(ich), 0L)) +#define Edit_LineIndex(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINEINDEX, (WPARAM)(int)(line), 0L)) +#define Edit_LineLength(hwndCtl, line) ((int)(DWORD)SendMessage((hwndCtl), EM_LINELENGTH, (WPARAM)(int)(line), 0L)) + +#define Edit_Scroll(hwndCtl, dv, dh) ((void)SendMessage((hwndCtl), EM_LINESCROLL, 0, MAKELPARAM((dv), (dh)))) + +#define Edit_CanUndo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_CANUNDO, 0, 0L)) +#define Edit_Undo(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_UNDO, 0, 0L)) +#define Edit_EmptyUndoBuffer(hwndCtl) ((void)SendMessage((hwndCtl), EM_EMPTYUNDOBUFFER, 0, 0L)) + +#define Edit_SetPasswordChar(hwndCtl, ch) ((void)SendMessage((hwndCtl), EM_SETPASSWORDCHAR, (WPARAM)(UINT)(ch), 0L)) + +#define Edit_SetTabStops(hwndCtl, cTabs, lpTabs) ((void)SendMessage((hwndCtl), EM_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(const int FAR*)(lpTabs))) + +#define Edit_FmtLines(hwndCtl, fAddEOL) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_FMTLINES, (WPARAM)(BOOL)(fAddEOL), 0L)) + +#define Edit_GetHandle(hwndCtl) ((HLOCAL)(UINT)(DWORD)SendMessage((hwndCtl), EM_GETHANDLE, 0, 0L)) +#define Edit_SetHandle(hwndCtl, h) ((void)SendMessage((hwndCtl), EM_SETHANDLE, (WPARAM)(UINT)(HLOCAL)(h), 0L)) + +#if (WINVER >= 0x030a) +#define Edit_GetFirstVisibleLine(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), EM_GETFIRSTVISIBLELINE, 0, 0L)) + +#define Edit_SetReadOnly(hwndCtl, fReadOnly) ((BOOL)(DWORD)SendMessage((hwndCtl), EM_SETREADONLY, (WPARAM)(BOOL)(fReadOnly), 0L)) + +#define Edit_GetPasswordChar(hwndCtl) ((char)(DWORD)SendMessage((hwndCtl), EM_GETPASSWORDCHAR, 0, 0L)) + +#define Edit_SetWordBreakProc(hwndCtl, lpfnWordBreak) ((void)SendMessage((hwndCtl), EM_SETWORDBREAKPROC, 0, (LPARAM)(EDITWORDBREAKPROC)(lpfnWordBreak))) +#define Edit_GetWordBreakProc(hwndCtl) ((EDITWORDBREAKPROC)SendMessage((hwndCtl), EM_GETWORDBREAKPROC, 0, 0L)) +#endif /* WINVER >= 0x030a */ + +/****** ScrollBar control message APIs ***************************************/ + +/* NOTE: flags parameter is a collection of ESB_* values, NOT a boolean! */ +#define ScrollBar_Enable(hwndCtl, flags) EnableScrollBar((hwndCtl), SB_CTL, (flags)) + +#define ScrollBar_Show(hwndCtl, fShow) ShowWindow((hwndCtl), (fShow) ? SW_SHOWNORMAL : SW_HIDE) + +#define ScrollBar_SetPos(hwndCtl, pos, fRedraw) SetScrollPos((hwndCtl), SB_CTL, (pos), (fRedraw)) +#define ScrollBar_GetPos(hwndCtl) GetScrollPos((hwndCtl), SB_CTL) + +#define ScrollBar_SetRange(hwndCtl, posMin, posMax, fRedraw) SetScrollRange((hwndCtl), SB_CTL, (posMin), (posMax), (fRedraw)) +#define ScrollBar_GetRange(hwndCtl, lpposMin, lpposMax) GetScrollRange((hwndCtl), SB_CTL, (lpposMin), (lpposMax)) + +/****** ListBox control message APIs *****************************************/ + +#define ListBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ListBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCOUNT, 0, 0L)) +#define ListBox_ResetContent(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_RESETCONTENT, 0, 0L)) + +#define ListBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ListBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ListBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), LB_ADDSTRING, 0, (LPARAM)(data))) +#define ListBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ListBox_GetTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ListBox_GetText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ListBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), LB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ListBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ListBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_SetSel(hwndCtl, fSelect, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETSEL, (WPARAM)(BOOL)(fSelect), MAKELPARAM((index), 0))) +#define ListBox_SelItemRange(hwndCtl, fSelect, first, last) ((int)(DWORD)SendMessage((hwndCtl), LB_SELITEMRANGE, (WPARAM)(BOOL)(fSelect), MAKELPARAM((first), (last)))) + +#define ListBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCURSEL, 0, 0L)) +#define ListBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ListBox_SelectString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ListBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), LB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ListBox_GetSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSEL, (WPARAM)(int)(index), 0L)) +#define ListBox_GetSelCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELCOUNT, 0, 0L)) +#define ListBox_GetTopIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETTOPINDEX, 0, 0L)) +#define ListBox_GetSelItems(hwndCtl, cItems, lpItems) ((int)(DWORD)SendMessage((hwndCtl), LB_GETSELITEMS, (WPARAM)(int)(cItems), (LPARAM)(int FAR*)(lpItems))) + +#define ListBox_SetTopIndex(hwndCtl, indexTop) ((int)(DWORD)SendMessage((hwndCtl), LB_SETTOPINDEX, (WPARAM)(int)(indexTop), 0L)) + +#define ListBox_SetColumnWidth(hwndCtl, cxColumn) ((void)SendMessage((hwndCtl), LB_SETCOLUMNWIDTH, (WPARAM)(int)(cxColumn), 0L)) +#define ListBox_GetHorizontalExtent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETHORIZONTALEXTENT, 0, 0L)) +#define ListBox_SetHorizontalExtent(hwndCtl, cxExtent) ((void)SendMessage((hwndCtl), LB_SETHORIZONTALEXTENT, (WPARAM)(int)(cxExtent), 0L)) + +#define ListBox_SetTabStops(hwndCtl, cTabs, lpTabs) ((BOOL)(DWORD)SendMessage((hwndCtl), LB_SETTABSTOPS, (WPARAM)(int)(cTabs), (LPARAM)(int FAR*)(lpTabs))) + +#define ListBox_GetItemRect(hwndCtl, index, lprc) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMRECT, (WPARAM)(int)(index), (LPARAM)(RECT FAR*)(lprc))) + +#define ListBox_SetCaretIndex(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_SETCARETINDEX, (WPARAM)(int)(index), 0L)) +#define ListBox_GetCaretIndex(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), LB_GETCARETINDEX, 0, 0L)) + + +#if (WINVER >= 0x030a) +#define ListBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), LB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ListBox_SetItemHeight(hwndCtl, index, cy) ((int)(DWORD)SendMessage((hwndCtl), LB_SETITEMHEIGHT, (WPARAM)(int)(index), MAKELPARAM((cy), 0))) +#define ListBox_GetItemHeight(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), LB_GETITEMHEIGHT, (WPARAM)(int)(index), 0L)) +#endif /* WINVER >= 0x030a */ + +#define ListBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), LB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +/****** ComboBox control message APIs ****************************************/ + +#define ComboBox_Enable(hwndCtl, fEnable) EnableWindow((hwndCtl), (fEnable)) + +#define ComboBox_GetText(hwndCtl, lpch, cchMax) GetWindowText((hwndCtl), (lpch), (cchMax)) +#define ComboBox_GetTextLength(hwndCtl) GetWindowTextLength(hwndCtl) +#define ComboBox_SetText(hwndCtl, lpsz) SetWindowText((hwndCtl), (lpsz)) + +#define ComboBox_LimitText(hwndCtl, cchLimit) ((int)(DWORD)SendMessage((hwndCtl), CB_LIMITTEXT, (WPARAM)(int)(cchLimit), 0L)) + +#define ComboBox_GetEditSel(hwndCtl) ((DWORD)SendMessage((hwndCtl), CB_GETEDITSEL, 0, 0L)) +#define ComboBox_SetEditSel(hwndCtl, ichStart, ichEnd) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEDITSEL, 0, MAKELPARAM((ichStart), (ichEnd)))) + +#define ComboBox_GetCount(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCOUNT, 0, 0L)) +#define ComboBox_ResetContent(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_RESETCONTENT, 0, 0L)) + +#define ComboBox_AddString(hwndCtl, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(LPCSTR)(lpsz))) +#define ComboBox_InsertString(hwndCtl, index, lpsz) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpsz))) + +#define ComboBox_AddItemData(hwndCtl, data) ((int)(DWORD)SendMessage((hwndCtl), CB_ADDSTRING, 0, (LPARAM)(data))) +#define ComboBox_InsertItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_INSERTSTRING, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_DeleteString(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_DELETESTRING, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetLBTextLen(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXTLEN, (WPARAM)(int)(index), 0L)) +#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer) ((int)(DWORD)SendMessage((hwndCtl), CB_GETLBTEXT, (WPARAM)(int)(index), (LPARAM)(LPCSTR)(lpszBuffer))) + +#define ComboBox_GetItemData(hwndCtl, index) ((LRESULT)(DWORD)SendMessage((hwndCtl), CB_GETITEMDATA, (WPARAM)(int)(index), 0L)) +#define ComboBox_SetItemData(hwndCtl, index, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMDATA, (WPARAM)(int)(index), (LPARAM)(data))) + +#define ComboBox_FindString(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) +#define ComboBox_FindItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_GetCurSel(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETCURSEL, 0, 0L)) +#define ComboBox_SetCurSel(hwndCtl, index) ((int)(DWORD)SendMessage((hwndCtl), CB_SETCURSEL, (WPARAM)(int)(index), 0L)) + +#define ComboBox_SelectString(hwndCtl, indexStart, lpszSelect) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszSelect))) +#define ComboBox_SelectItemData(hwndCtl, indexStart, data) ((int)(DWORD)SendMessage((hwndCtl), CB_SELECTSTRING, (WPARAM)(int)(indexStart), (LPARAM)(data))) + +#define ComboBox_Dir(hwndCtl, attrs, lpszFileSpec) ((int)(DWORD)SendMessage((hwndCtl), CB_DIR, (WPARAM)(UINT)(attrs), (LPARAM)(LPCSTR)(lpszFileSpec))) + +#define ComboBox_ShowDropdown(hwndCtl, fShow) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_SHOWDROPDOWN, (WPARAM)(BOOL)(fShow), 0L)) + +#if (WINVER >= 0x030a) +#define ComboBox_FindStringExact(hwndCtl, indexStart, lpszFind) ((int)(DWORD)SendMessage((hwndCtl), CB_FINDSTRINGEXACT, (WPARAM)(int)(indexStart), (LPARAM)(LPCSTR)(lpszFind))) + +#define ComboBox_GetDroppedState(hwndCtl) ((BOOL)(DWORD)SendMessage((hwndCtl), CB_GETDROPPEDSTATE, 0, 0L)) +#define ComboBox_GetDroppedControlRect(hwndCtl, lprc) ((void)SendMessage((hwndCtl), CB_GETDROPPEDCONTROLRECT, 0, (LPARAM)(RECT FAR*)(lprc))) + +#define ComboBox_GetItemHeight(hwndCtl) ((int)(DWORD)SendMessage((hwndCtl), CB_GETITEMHEIGHT, 0, 0L)) +#define ComboBox_SetItemHeight(hwndCtl, cyItem) ((int)(DWORD)SendMessage((hwndCtl), CB_SETITEMHEIGHT, (WPARAM)(int)(index), 0L)) + +#define ComboBox_GetExtendedUI(hwndCtl) ((UINT)(DWORD)SendMessage((hwndCtl), CB_GETEXTENDEDUI, 0, 0L)) +#define ComboBox_SetExtendedUI(hwndCtl, flags) ((int)(DWORD)SendMessage((hwndCtl), CB_SETEXTENDEDUI, (WPARAM)(UINT)(flags), 0L)) +#endif /* WINVER >= 0x030a */ + +#ifndef RC_INVOKED +#pragma pack() /* Revert to default packing */ +#endif /* RC_INVOKED */ + +#ifdef __cplusplus +} /* End of extern "C" { */ +#endif /* __cplusplus */ + +#endif /* !_INC_WINDOWSX */ diff --git a/private/oleauto/tools/win16/hdos/c800/include/winmem32.h b/private/oleauto/tools/win16/hdos/c800/include/winmem32.h new file mode 100644 index 000000000..f07941c7a --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/include/winmem32.h @@ -0,0 +1,32 @@ +/* + * Function protypes and general defines for WINMEM32 DLL + * Version 1.00 + * + * NOTE that WINDOWS.H must be included before this file. + * + */ + +/* + * + * The functions + * + */ +WORD FAR PASCAL GetWinMem32Version(void); +WORD FAR PASCAL Global32Alloc(DWORD, LPWORD, DWORD, WORD); +WORD FAR PASCAL Global32Realloc(WORD, DWORD, WORD); +WORD FAR PASCAL Global32Free(WORD, WORD); +WORD FAR PASCAL Global16PointerAlloc(WORD, DWORD, LPDWORD, DWORD, WORD); +WORD FAR PASCAL Global16PointerFree(WORD, DWORD, WORD); +WORD FAR PASCAL Global32CodeAlias(WORD, LPWORD, WORD); +WORD FAR PASCAL Global32CodeAliasFree(WORD, WORD, WORD); + +/* + * + * Error Codes + * + */ +#define WM32_Invalid_Func 0001 +#define WM32_Invalid_Flags 0002 +#define WM32_Invalid_Arg 0003 +#define WM32_Insufficient_Sels 0004 +#define WM32_Insufficient_Mem 0005 diff --git a/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm b/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm new file mode 100644 index 000000000..67db1564e --- /dev/null +++ b/private/oleauto/tools/win16/hdos/c800/lib/libentry.asm @@ -0,0 +1,91 @@ + page ,132 + title libentry - Windows dynamic link library entry routine +;*** +;libentry.asm - Windows dynamic link library entry routine +; +; Copyright (c) 1988-1992, Microsoft Corporation. All rights reserved. +; +;Purpose: +; +; This module generates a code segment called INIT_TEXT. +; It initialises the local heap if one exists and then calls +; the C routine LibMain() which should have the form: +; +; BOOL FAR PASCAL LibMain(HANDLE hModule, +; WORD wDataSeg, +; WORD cbHeap, +; LPSTR lpszCmdLine); +; +; The result of the call to LibMain is returned to Windows. +; LibMain should return TRUE if it completes initialisation +; successfully, FALSE if some error occurs. +; +; NOTES: +; +; (1) This module is not needed if you use the C 7.0 Win 3.x +; libraries; they perform this operation automatically. You may, +; however, need this module when using the "No C Runtime" build +; option. +; +; (2) The last parameter to LibMain is included for compatibility +; reasons. Applications that wish to modify this file and remove the +; parameter from LibMain may do so by simply removing the two +; "push" instructions below marked with "****". +; +;******************************************************************************* + + extrn LibMain:far ; the C routine to be called + extrn LocalInit:far ; Windows heap init routine + extrn __acrtused:abs ; Force in C segment definitions, etc. + + public LibEntry ; entry point for the DLL + +;INIT_TEXT segment byte public 'CODE' +; assume cs:INIT_TEXT +_TEXT segment byte public 'CODE' + assume cs:_TEXT + +LibEntry proc far + +ifndef _NOTWLO + ; Include the special startup code that makes WIN DLLs + ; compatible with WLO. This code MUST be the first sequence + ; in the DLL startup. + +; include convdll.inc +endif + + push di ; handle of the module instance + push ds ; library data segment + push cx ; heap size + push es ; **** command line ptr (always NULL) + push si ; **** + + ; if we have some heap then initialise it + jcxz callc ; jump if no heap specified + + ; call the Windows function LocalInit() to set up the heap + ; LocalInit((LPSTR)start, WORD cbHeap); + + push ds ; Heap segment + xor ax,ax + push ax ; Heap start offset in segment + push cx ; Heap end offset in segment + call LocalInit ; try to initialise it + or ax,ax ; did it do it ok ? + jz exit ; quit if it failed + + ; invoke the C routine to do any special initialisation + +callc: + call LibMain ; invoke the 'C' routine (result in AX) + +exit: + ret ; return the result + +LibEntry endp + +;INIT_TEXT ends +_TEXT ends + + end LibEntry |