Release 0.2.0
[wine/multimedia.git] / build-spec.txt
blob25dfed69e6f3cfa6445cfefe7bf5ed766e1644db
1 name    NAME
2 id      ID_NUMBER
3 length  NUMBER_OF_ORDINALS
5 ORDINAL VARTYPE EXPORTNAME (DATA [DATA [DATA [...]]])
7 ORDINAL FUNCTYPE EXPORTNAME([ARGTYPE [ARGTYPE [...]]])
8                  HANDLERNAME([ARGNUM [ARGNUM [...]]])
10 ORDINAL equate EXPORTNAME DATA
12 ORDINAL return EXPORTNAME ARGLENGTH RETVALUE
14 # COMMENT_TEXT
16 --------------------
17 General:
19     "name", "id" and "length" fields are mandatory.  Specific ordinal 
20 declarations are optional, but the default handler will print an
21 error message.  Lines whose first character is a '#' will be ignored
22 as comments.
24 Variable ordinals:
26     This type defines data storage at the ordinal specified.  You may
27 store items as bytes, 16-bit words, or 32-bit words.
28     "ORDINAL" is replaced by the ordinal number corresponding to the
29 variable.  "VARTYPE" should be "byte", "word" or "long" for 8, 16, or
30 32 bits respectively.  "EXPORTNAME" will be the name available for
31 dynamic linking.  "DATA" can be a decimal number or a hex number preceeded
32 by "0x".  The following example defines the variable "VariableA" at
33 ordinal 2 and containing 4 bytes:
35         2 byte VariableA -1 0xff 0 0
37 Function ordinals:
39     This type defines a function entry point.  The prototype defined
40 by "EXPORTNAME ([ARGTYPE [ARGTYPE [...]]])" specifies the name available
41 for dynamic linking and the format of the 16-bit stack.  By specifying
42 "FUNCTYPE", the loader can automatically determine which order the
43 parameters were pushed by the calling routine.  The prototype
44 specified by "HANDLERNAME([ARGNUM [ARGNUM [...]]])"  specifies to
45 the loader how to call the 32-bit library routine which will handle this
46 call.  Note that specifying "ARGNUM" as 1 means the leftmost argument
47 given to the function call, and not the first argument on the stack.
48 For "pascal" functions, "ARGNUM" equal to 1 specifies the last
49 argument on the stack.  If you do not specify any arguments to the
50 handler function, then address of the 16-bit argument stack is
51 passed to the handler function.
52     "ORDINAL" is replaced by the ordinal number corresponding to the
53 function.  "FUNCTYPE" should be "c" or "pascal" ("pascal" may be
54 shortened to "p").  "EXPORTNAME" will be the name available for
55 dynamic linking.  "ARGTYPE" should be "byte", "word", "long", "ptr",
56 "s_byte" (signed byte), "s_word" (signed word) or "s_long"
57 (signed long).  "HANDLERNAME" is the name of the actual function
58 that will process the request in 32-bit mode.  "ARGNUM" is the
59 original argument number.  The first argument is numbered "1".
61     This first example defines an entry point for the CreateWindow()
62 call (the ordinal 100 is just an example):
64         100 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
65                                 word word word ptr)
66                    WIN_CreateWindow(1 2 3 4 5 6 7 8 9 10 11)
68    This second example defines an entry point for the GetFocus()
69 call (the ordinal 100 is just an example):
71         100 pascal GetFocus() WIN_GetFocus()
73 Equate ordinals:
75     This type defines an ordinal as an absolute value.
76 "ORDINAL" is replaced by the ordinal number corresponding to the
77 variable.  "EXPORTNAME" will be the name available for dynamic linking.  
78 "DATA" can be a decimal number or a hex number preceeded by "0x".
80 Return ordinals:
82     This type defines a function entry point whose handler should do
83 nothing but return a value.
84     "ORDINAL" is replaced by the ordinal number corresponding to the
85 variable.  ARGLENGTH is the number of bytes that need to be removed
86 from the stack before returning to the caller.  RETVALUE is the
87 return value which will be passed back to the caller.