Added version information for Win98.
[wine.git] / tools / build-spec.txt
blobf7b5065baf4aecc2b4aa4bc8625f4a56e98db57c
1 name    NAME
2 type    win16|win32
3 [file   WINFILENAME]
4 [base   ORDINAL]
5 [heap   SIZE]
6 [import DLL]
8 ORDINAL VARTYPE EXPORTNAME (DATA [DATA [DATA [...]]])
10 ORDINAL FUNCTYPE EXPORTNAME([ARGTYPE [ARGTYPE [...]]]) HANDLERNAME
12 ORDINAL stub EXPORTNAME
14 ORDINAL equate EXPORTNAME DATA
16 ORDINAL extern EXPORTNAME SYMBOLNAME
18 ORDINAL forward EXPORTNAME SYMBOLNAME
20 # COMMENT_TEXT
22 --------------------
23 General:
24 ========
26     "name" and "type" fields are mandatory.  Specific ordinal
27 declarations are optional, but the default handler will print an error
28 message.
30 "base" gives the offset of the first ordinal; default is 0.
32 "heap" is the size of the module local heap (only valid for Win16
33 modules); default is no local heap.
35 "file" gives the name of the Windows file that is replaced by the
36 builtin. <name>.DLL is assumed if none is given. (This is important
37 for kernel, which lives in the Windows file KRNL386.EXE).
39 "import" names a module that this one depends on (only for Win32
40 modules at the present). The import declaration can be present several
41 times.
43 Lines whose first character is a '#' will be ignored as comments.
46 Variable ordinals:
47 ==================
49     This type defines data storage at the ordinal specified.  You may
50 store items as bytes, 16-bit words, or 32-bit words.
51     "ORDINAL" is replaced by the ordinal number corresponding to the
52 variable.  "VARTYPE" should be "byte", "word" or "long" for 8, 16, or
53 32 bits respectively.  "EXPORTNAME" will be the name available for
54 dynamic linking.  "DATA" can be a decimal number or a hex number preceeded
55 by "0x".  The following example defines the variable "VariableA" at
56 ordinal 2 and containing 4 bytes:
58         2 byte VariableA(-1 0xff 0 0)
60 Function ordinals:
61 ==================
63     This type defines a function entry point.  The prototype defined by
64 "EXPORTNAME ([ARGTYPE [ARGTYPE [...]]])" specifies the name available for
65 dynamic linking and the format of the arguments. "ORDINAL" is replaced
66 by the ordinal number corresponding to the function.
68 "FUNCTYPE" should be one of:
69 - "pascal16" for a Win16 function returning a 16-bit value
70 - "pascal" for a Win16 function returning a 32-bit value
71 - "register" for a function using CPU register to pass arguments
72 - "stdcall" for a normal Win32 function
73 - "cdecl" for a Win32 function using the C calling convention
74 - "varargs" for a Win32 function taking a variable number of arguments
76 "ARGTYPE" should be one of:
77 - "word"
78 - "long"
79 - "ptr" (linear pointer)
80 - "str" (linear pointer to a null-terminated string)
81 - "s_word" (signed word)
82 - "segptr" (segmented pointer).
83 - "segstr" (segmented pointer to a null-terminated string)
85 Only "ptr", "str" and "long" are valid for Win32 functions.
87 "HANDLERNAME" is the name of the actual Wine function that will
88 process the request in 32-bit mode.
90     This first example defines an entry point for the CreateWindow()
91 call (the ordinal 100 is just an example):
93         100 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
94                                 word word word ptr)
95                    WIN_CreateWindow
97    This second example defines an entry point for the GetFocus()
98 call (the ordinal 100 is just an example):
100         100 pascal GetFocus() WIN_GetFocus()
102 To declare a function using a variable number of arguments in Win16,
103 specify the function as taking no arguments. The arguments are then
104 available with CURRENT_STACK16->args. In Win32, specify the function
105 as 'varargs' and declare it with a '...' parameter in the C file.  See
106 the wsprintf* functions in user.spec and user32.spec for an example.
108 Stub ordinals:
109 ==============
111     This type defines a stub function. It makes the name and ordinal
112 available for dynamic linking, but will terminate execution with an
113 error message if the function is ever called.
115 Equate ordinals:
116 ================
118     This type defines an ordinal as an absolute value.
119 "ORDINAL" is replaced by the ordinal number corresponding to the
120 variable.  "EXPORTNAME" will be the name available for dynamic linking.  
121 "DATA" can be a decimal number or a hex number preceeded by "0x".
123 Extern ordinals:
124 ================
126     This type defines an entry that simply maps to a Wine symbol
127 (variable or function); "EXPORTNAME" will point to the symbol
128 "SYMBOLNAME" that must be defined in C code. This type only works with
129 Win32.
131 Forwarded ordinals:
132 ===================
134     This type defines an entry that is forwarded to another entry
135 point (kind of a symbolic link). "EXPORTNAME" will forward to the
136 entry point "SYMBOLNAME" that must be of the form "DLL.Function". This 
137 type only works with Win32.