Added missing WINAPI for SHValidateUNC.
[wine/dcerpc.git] / tools / build-spec.txt
blob415fcaa0216ff2abbb12c1108139c8a6abbad95f
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 return EXPORTNAME ARGLENGTH RETVALUE
18 ORDINAL extern EXPORTNAME SYMBOLNAME
20 ORDINAL forward EXPORTNAME SYMBOLNAME
22 # COMMENT_TEXT
24 --------------------
25 General:
26 ========
28     "name" and "type" fields are mandatory.  Specific ordinal
29 declarations are optional, but the default handler will print an error
30 message.
32 "base" gives the offset of the first ordinal; default is 0.
34 "heap" is the size of the module local heap (only valid for Win16
35 modules); default is no local heap.
37 "file" gives the name of the Windows file that is replaced by the
38 builtin. <name>.DLL is assumed if none is given. (This is important
39 for kernel, which lives in the Windows file KRNL386.EXE).
41 "import" names a module that this one depends on (only for Win32
42 modules at the present). The import declaration can be present several
43 times.
45 Lines whose first character is a '#' will be ignored as comments.
48 Variable ordinals:
49 ==================
51     This type defines data storage at the ordinal specified.  You may
52 store items as bytes, 16-bit words, or 32-bit words.
53     "ORDINAL" is replaced by the ordinal number corresponding to the
54 variable.  "VARTYPE" should be "byte", "word" or "long" for 8, 16, or
55 32 bits respectively.  "EXPORTNAME" will be the name available for
56 dynamic linking.  "DATA" can be a decimal number or a hex number preceeded
57 by "0x".  The following example defines the variable "VariableA" at
58 ordinal 2 and containing 4 bytes:
60         2 byte VariableA(-1 0xff 0 0)
62 Function ordinals:
63 ==================
65     This type defines a function entry point.  The prototype defined by
66 "EXPORTNAME ([ARGTYPE [ARGTYPE [...]]])" specifies the name available for
67 dynamic linking and the format of the arguments. "ORDINAL" is replaced
68 by the ordinal number corresponding to the function.
70 "FUNCTYPE" should be one of:
71 - "pascal16" for a Win16 function returning a 16-bit value
72 - "pascal" for a Win16 function returning a 32-bit value
73 - "register" for a function using CPU register to pass arguments
74 - "stdcall" for a normal Win32 function
75 - "cdecl" for a Win32 function using the C calling convention
76 - "varargs" for a Win32 function taking a variable number of arguments
78 "ARGTYPE" should be one of:
79 - "word"
80 - "long"
81 - "ptr" (linear pointer)
82 - "str" (linear pointer to a null-terminated string)
83 - "s_word" (signed word)
84 - "segptr" (segmented pointer).
85 - "segstr" (segmented pointer to a null-terminated string)
87 Only "ptr", "str" and "long" are valid for Win32 functions.
89 "HANDLERNAME" is the name of the actual Wine function that will
90 process the request in 32-bit mode.
92     This first example defines an entry point for the CreateWindow()
93 call (the ordinal 100 is just an example):
95         100 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
96                                 word word word ptr)
97                    WIN_CreateWindow
99    This second example defines an entry point for the GetFocus()
100 call (the ordinal 100 is just an example):
102         100 pascal GetFocus() WIN_GetFocus()
104 To declare a function using a variable number of arguments in Win16,
105 specify the function as taking no arguments. The arguments are then
106 available with CURRENT_STACK16->args. In Win32, specify the function
107 as 'varargs' and declare it with a '...' parameter in the C file.  See
108 the wsprintf* functions in user.spec and user32.spec for an example.
110 Stub ordinals:
111 ==============
113     This type defines a stub function. It makes the name and ordinal
114 available for dynamic linking, but will terminate execution with an
115 error message if the function is ever called.
117 Equate ordinals:
118 ================
120     This type defines an ordinal as an absolute value.
121 "ORDINAL" is replaced by the ordinal number corresponding to the
122 variable.  "EXPORTNAME" will be the name available for dynamic linking.  
123 "DATA" can be a decimal number or a hex number preceeded by "0x".
125 Return ordinals:
126 ================
128     This type defines a function entry point whose handler should do
129 nothing but return a value.
130     "ORDINAL" is replaced by the ordinal number corresponding to the
131 variable.  ARGLENGTH is the number of bytes that need to be removed
132 from the stack before returning to the caller.  RETVALUE is the
133 return value which will be passed back to the caller.
135 Extern ordinals:
136 ================
138     This type defines an entry that simply maps to a Wine symbol
139 (variable or function); "EXPORTNAME" will point to the symbol
140 "SYMBOLNAME" that must be defined in C code. This type only works with
141 Win32.
143 Forwarded ordinals:
144 ===================
146     This type defines an entry that is forwarded to another entry
147 point (kind of a symbolic link). "EXPORTNAME" will forward to the
148 entry point "SYMBOLNAME" that must be of the form "DLL.Function". This 
149 type only works with Win32.