7 [mode dll|cuiexe|guiexe]
13 ORDINAL VARTYPE EXPORTNAME (DATA [DATA [DATA [...]]])
15 ORDINAL FUNCTYPE EXPORTNAME([ARGTYPE [ARGTYPE [...]]]) HANDLERNAME
17 ORDINAL stub EXPORTNAME
19 ORDINAL equate EXPORTNAME DATA
21 ORDINAL extern EXPORTNAME SYMBOLNAME
23 ORDINAL forward EXPORTNAME SYMBOLNAME
31 "name" and "type" fields are mandatory. Specific ordinal
32 declarations are optional, but the default handler will print an error
35 "mode" specifies whether it is the spec file for a dll or the main exe.
36 This is only valid for Win32 spec files.
38 "heap" is the size of the module local heap (only valid for Win16
39 modules); default is no local heap.
41 "file" gives the name of the Windows file that is replaced by the
42 builtin. <name>.DLL is assumed if none is given. (This is important
43 for kernel, which lives in the Windows file KRNL386.EXE).
45 "init" specifies a function which will be called when this dll
46 is loaded. This is only valid for Win32 modules.
48 "import" names a module that this one depends on (only for Win32
49 modules at the present). The import declaration can be present several
52 "rsrc" specifies the prefix for the resource directory name.
54 Lines whose first character is a '#' will be ignored as comments.
60 This type defines data storage at the ordinal specified. You may
61 store items as bytes, 16-bit words, or 32-bit words.
62 "ORDINAL" is replaced by the ordinal number corresponding to the
63 variable. "VARTYPE" should be "byte", "word" or "long" for 8, 16, or
64 32 bits respectively. "EXPORTNAME" will be the name available for
65 dynamic linking. "DATA" can be a decimal number or a hex number preceeded
66 by "0x". The following example defines the variable "VariableA" at
67 ordinal 2 and containing 4 bytes:
69 2 byte VariableA(-1 0xff 0 0)
74 This type defines a function entry point. The prototype defined by
75 "EXPORTNAME ([ARGTYPE [ARGTYPE [...]]])" specifies the name available for
76 dynamic linking and the format of the arguments. "ORDINAL" is replaced
77 by the ordinal number corresponding to the function, or "@" for
78 automatic ordinal allocation (Win32 only).
80 "FUNCTYPE" should be one of:
81 - "pascal16" for a Win16 function returning a 16-bit value
82 - "pascal" for a Win16 function returning a 32-bit value
83 - "register" for a function using CPU register to pass arguments
84 - "interrupt" for a Win16 interrupt handler routine
85 - "stdcall" for a normal Win32 function
86 - "cdecl" for a Win32 function using the C calling convention
87 - "varargs" for a Win32 function taking a variable number of arguments
89 "ARGTYPE" should be one of:
92 - "ptr" (linear pointer)
93 - "str" (linear pointer to a null-terminated string)
94 - "s_word" (signed word)
95 - "segptr" (segmented pointer).
96 - "segstr" (segmented pointer to a null-terminated string)
98 Only "ptr", "str" and "long" are valid for Win32 functions.
100 "HANDLERNAME" is the name of the actual Wine function that will
101 process the request in 32-bit mode.
103 This first example defines an entry point for the CreateWindow()
104 call (the ordinal 100 is just an example):
106 100 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
110 This second example defines an entry point for the GetFocus()
111 call (the ordinal 100 is just an example):
113 100 pascal GetFocus() WIN_GetFocus()
115 To declare a function using a variable number of arguments in Win16,
116 specify the function as taking no arguments. The arguments are then
117 available with CURRENT_STACK16->args. In Win32, specify the function
118 as 'varargs' and declare it with a '...' parameter in the C file. See
119 the wsprintf* functions in user.spec and user32.spec for an example.
124 This type defines a stub function. It makes the name and ordinal
125 available for dynamic linking, but will terminate execution with an
126 error message if the function is ever called.
131 This type defines an ordinal as an absolute value.
132 "ORDINAL" is replaced by the ordinal number corresponding to the
133 variable. "EXPORTNAME" will be the name available for dynamic linking.
134 "DATA" can be a decimal number or a hex number preceeded by "0x".
139 This type defines an entry that simply maps to a Wine symbol
140 (variable or function); "EXPORTNAME" will point to the symbol
141 "SYMBOLNAME" that must be defined in C code. This type only works with
147 This type defines an entry that is forwarded to another entry
148 point (kind of a symbolic link). "EXPORTNAME" will forward to the
149 entry point "SYMBOLNAME" that must be of the form "DLL.Function". This
150 type only works with Win32.