Sweden-Number/tools/winebuild
Alexandre Julliard e296bf3717 Renamed CallTo16* functions to wine_call_to_16* and export them from
kernel32.spec.
2000-11-29 19:39:30 +00:00
..
.cvsignore Split the build program in several files. 2000-06-23 20:15:35 +00:00
Makefile.in Build ntdll as a real dll, including everything that was previously in 2000-10-31 00:20:51 +00:00
README Added entry point flags -noimport, -norelay, -ret64 and -i386. 2000-11-26 04:31:48 +00:00
build.h Added entry point flags -noimport, -norelay, -ret64 and -i386. 2000-11-26 04:31:48 +00:00
import.c The __wine_call_from_16_ calls in the import table should use a valid 2000-11-26 04:02:09 +00:00
main.c Set debugging option based on NO_TRACE_MSGS define. Only output 32-bit 2000-11-27 23:48:08 +00:00
parser.c The init function can be called main. 2000-11-27 01:33:55 +00:00
relay.c Renamed CallTo16* functions to wine_call_to_16* and export them from 2000-11-29 19:39:30 +00:00
res16.c Added checking for mmap. 2000-11-25 23:54:12 +00:00
res32.c Added checking for mmap. 2000-11-25 23:54:12 +00:00
spec16.c Renamed CallTo16* functions to wine_call_to_16* and export them from 2000-11-29 19:39:30 +00:00
spec32.c Set debugging option based on NO_TRACE_MSGS define. Only output 32-bit 2000-11-27 23:48:08 +00:00
utils.c Added support for loading .res files for 16-bit resources. 2000-10-25 20:33:58 +00:00

README

			Spec file format
			----------------

name	NAME
type    win16|win32
[file   WINFILENAME]
[mode	dll|cuiexe|guiexe]
[heap   SIZE]
[init	FUNCTION]
[import DLL]
[rsrc	RESFILE]

ORDINAL FUNCTYPE [FLAGS] EXPORTNAME([ARGTYPE [ARGTYPE [...]]]) HANDLERNAME

ORDINAL variable [FLAGS] EXPORTNAME (DATA [DATA [DATA [...]]])

ORDINAL stub [FLAGS] EXPORTNAME

ORDINAL equate [FLAGS] EXPORTNAME DATA

ORDINAL extern [FLAGS] EXPORTNAME SYMBOLNAME

ORDINAL forward [FLAGS] EXPORTNAME SYMBOLNAME

# COMMENT_TEXT

--------------------
General:
========

    "name" and "type" fields are mandatory.  Specific ordinal
declarations are optional, but the default handler will print an error
message.

"mode" specifies whether it is the spec file for a dll or the main exe.
This is only valid for Win32 spec files.

"heap" is the size of the module local heap (only valid for Win16
modules); default is no local heap.

"file" gives the name of the Windows file that is replaced by the
builtin. <name>.DLL is assumed if none is given. (This is important
for kernel, which lives in the Windows file KRNL386.EXE).

"init" specifies a function which will be called when this dll
is loaded. This is only valid for Win32 modules.

"import" names a module that this one depends on (only for Win32
modules at the present). The import declaration can be present several
times.

"rsrc" specifies the path of the compiled resource file.

"ORDINAL" specified the ordinal number corresponding to the entry
point, or "@" for automatic ordinal allocation (Win32 only).

"FLAGS" is a series of optional flags, preceded by a '-' character.
The supported flags are:
  "-noimport": the entry point is not made available for importing
               from winelib applications (Win32 only).
  "-norelay":  the entry point is not displayed in relay debugging
               traces (Win32 only).
  "-ret64":    the function returns a 64-bit value (Win32 only).
  "-i386":     the entry point is only available on i386 platforms.

Lines whose first character is a '#' will be ignored as comments.


Variable ordinals:
==================

    This type defines data storage as 32-bit words at the ordinal specified.
"EXPORTNAME" will be the name available for dynamic linking.  "DATA"
can be a decimal number or a hex number preceeded by "0x".  The
following example defines the variable "VariableA" at ordinal 2 and
containing 4 ints:

	2 variable VariableA(-1 0xff 0 0)

Function ordinals:
==================

    This type defines a function entry point.  The prototype defined by
"EXPORTNAME ([ARGTYPE [ARGTYPE [...]]])" specifies the name available for
dynamic linking and the format of the arguments. "@" can be used
instead of "EXPORTNAME" for ordinal-only exports.

"FUNCTYPE" should be one of:
- "pascal16" for a Win16 function returning a 16-bit value
- "pascal" for a Win16 function returning a 32-bit value
- "register" for a function using CPU register to pass arguments
- "interrupt" for a Win16 interrupt handler routine
- "stdcall" for a normal Win32 function
- "cdecl" for a Win32 function using the C calling convention
- "varargs" for a Win32 function taking a variable number of arguments

"ARGTYPE" should be one of:
- "word"   (16-bit unsigned value)
- "s_word" (16-bit signed word)
- "long"   (32-bit value)
- "double" (64-bit value)
- "ptr"    (linear pointer)
- "str"    (linear pointer to a null-terminated ASCII string)
- "wstr"   (linear pointer to a null-terminated Unicode string)
- "segptr" (segmented pointer)
- "segstr" (segmented pointer to a null-terminated ASCII string)

Only "ptr", "str", "wstr", "long" and "double" are valid for Win32 functions.

"HANDLERNAME" is the name of the actual Wine function that will
process the request in 32-bit mode.

    This first example defines an entry point for the CreateWindow()
call (the ordinal 100 is just an example):

	100 pascal CreateWindow(ptr ptr long s_word s_word s_word s_word
				word word word ptr)
		   WIN_CreateWindow

   This second example defines an entry point for the GetFocus()
call (the ordinal 100 is just an example):

	100 pascal GetFocus() WIN_GetFocus()

To declare a function using a variable number of arguments in Win16,
specify the function as taking no arguments. The arguments are then
available with CURRENT_STACK16->args. In Win32, specify the function
as 'varargs' and declare it with a '...' parameter in the C file.  See
the wsprintf* functions in user.spec and user32.spec for an example.

Stub ordinals:
==============

    This type defines a stub function. It makes the name and ordinal
available for dynamic linking, but will terminate execution with an
error message if the function is ever called.

Equate ordinals:
================

    This type defines an ordinal as an absolute value.
"EXPORTNAME" will be the name available for dynamic linking.  
"DATA" can be a decimal number or a hex number preceeded by "0x".

Extern ordinals:
================

    This type defines an entry that simply maps to a Wine symbol
(variable or function); "EXPORTNAME" will point to the symbol
"SYMBOLNAME" that must be defined in C code. This type only works with
Win32.

Forwarded ordinals:
===================

    This type defines an entry that is forwarded to another entry
point (kind of a symbolic link). "EXPORTNAME" will forward to the
entry point "SYMBOLNAME" that must be of the form "DLL.Function". This 
type only works with Win32.