Start by writing the spec file. This file will describe the interface as if it was a dll. See elsewhere for the details of the format of a spec file.
In the simple example we want a Wine builtin Dll that corresponds to the MyWin Dll. The spec file is libMyWin.spec and looks like this.
# # File: libMyWin.spec # # some sort of copyright # # Wine spec file for the libMyWin builtin library (a minimal wrapper around the # linux library libMyLinux) # # For further details of wine spec files see the Winelib documentation at # www.winehq.com name MyWin type win32 mode dll 2 stdcall _MyWinFunc@32 (long ptr ptr ptr ptr long long ptr) MyProxyWinFunc # End of fileNotice that the arguments are flagged as long even though they are smaller than that.
In the case of the ODBC example you can see this in the file odbc32.spec.