mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:54:10 +00:00
Remove a bunch of dummy and/or obsolete info from the Winelib
Developers Guide.
This commit is contained in:
parent
47c13f537c
commit
6a748376ef
|
@ -43,7 +43,6 @@ WINELIB_USER_SRCS = \
|
||||||
winelib-bindlls.sgml \
|
winelib-bindlls.sgml \
|
||||||
winelib-intro.sgml \
|
winelib-intro.sgml \
|
||||||
winelib-mfc.sgml \
|
winelib-mfc.sgml \
|
||||||
winelib-pkg.sgml \
|
|
||||||
winelib-porting.sgml \
|
winelib-porting.sgml \
|
||||||
winelib-toolkit.sgml
|
winelib-toolkit.sgml
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
of the functions etc. have been changed to protect the innocent).
|
of the functions etc. have been changed to protect the innocent).
|
||||||
A large Windows application includes a DLL that links to a third-party
|
A large Windows application includes a DLL that links to a third-party
|
||||||
DLL. For various reasons the third-party DLL does not work too well
|
DLL. For various reasons the third-party DLL does not work too well
|
||||||
under Wine. However the third-party DLL is also available for the
|
under Wine. However the third-party library is also available for the
|
||||||
Linux environment. Conveniently the DLL and Linux shared library
|
Linux environment. Conveniently the DLL and Linux shared library
|
||||||
export only a small number of functions and the application only uses
|
export only a small number of functions and the application only uses
|
||||||
one of those.
|
one of those.
|
||||||
|
@ -62,8 +62,7 @@
|
||||||
Specifically, the application calls a function:
|
Specifically, the application calls a function:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
signed short WINAPI MyWinFunc (unsigned short a, void *b, void *c,
|
signed short WINAPI MyWinFunc (unsigned short a, void *b, void *c,
|
||||||
unsigned long *d, void *e, unsigned char f, char g,
|
unsigned long *d, void *e, int f, char g, unsigned char *h);
|
||||||
unsigned char *h);
|
|
||||||
</programlisting>
|
</programlisting>
|
||||||
and the linux library exports a corresponding function:
|
and the linux library exports a corresponding function:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
|
@ -83,8 +82,7 @@ signed short MyLinuxFunc (unsigned short a, void *b, void *c,
|
||||||
<para>
|
<para>
|
||||||
In the simple example we want a Wine built-in Dll that corresponds to
|
In the simple example we want a Wine built-in Dll that corresponds to
|
||||||
the MyWin Dll. The spec file is <filename>MyWin.dll.spec</filename> and
|
the MyWin Dll. The spec file is <filename>MyWin.dll.spec</filename> and
|
||||||
looks something like this (depending on changes to the way that the
|
looks something like this:
|
||||||
specfile is formatted since this was written).
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
#
|
#
|
||||||
# File: MyWin.dll.spec
|
# File: MyWin.dll.spec
|
||||||
|
@ -102,10 +100,9 @@ signed short MyLinuxFunc (unsigned short a, void *b, void *c,
|
||||||
# End of file
|
# End of file
|
||||||
</programlisting>
|
</programlisting>
|
||||||
Notice that the arguments are flagged as long even though they are
|
Notice that the arguments are flagged as long even though they are
|
||||||
smaller than that.
|
smaller than that. With this example we will link directly to the
|
||||||
Notice also that we do not specify an initial function. With this
|
Linux shared library whereas with the ODBC example we will load the
|
||||||
example we will link directly to the Linux shared library whereas
|
Linux shared library dynamically.
|
||||||
with the ODBC example we will load the Linux shared library dynamically.
|
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
In the case of the ODBC example you can see this in the file
|
In the case of the ODBC example you can see this in the file
|
||||||
|
@ -113,23 +110,17 @@ signed short MyLinuxFunc (unsigned short a, void *b, void *c,
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="bindlls-cxx-apis">
|
|
||||||
<title id="bindlls-cxx-apis.title">How to deal with C++ APIs</title>
|
|
||||||
<para>
|
|
||||||
names are mangled, how to demangle them, how to call them
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
|
|
||||||
<sect1 id="bindlls-wrapper">
|
<sect1 id="bindlls-wrapper">
|
||||||
<title id="bindlls-wrapper.title">Writing the wrapper</title>
|
<title id="bindlls-wrapper.title">Writing the wrapper</title>
|
||||||
<para>
|
<para>
|
||||||
Firstly we will look at the simple example. The main complication of
|
Firstly we will look at the simple example. The main complication of
|
||||||
this case is the slightly different argument lists. The f parameter
|
this case is the slightly different argument lists. The f parameter
|
||||||
does not have to be passed to the Linux function and the d parameter
|
does not have to be passed to the Linux function and the d parameter
|
||||||
(theoretically) has to be converted between unsigned long * and
|
(theoretically) has to be converted between
|
||||||
unsigned short *. Doing this ensures that the "high" bits of the
|
<literal>unsigned long *i</literal> and <literal>unsigned short *</literal>.
|
||||||
returned value are set correctly. Also unlike with the ODBC example we
|
Doing this ensures that the "high" bits of the returned value are set
|
||||||
will link directly to the Linux Shared Library.
|
correctly. Also unlike with the ODBC example we will link directly to
|
||||||
|
the Linux Shared Library.
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/*
|
/*
|
||||||
* File: MyWin.c
|
* File: MyWin.c
|
||||||
|
@ -153,9 +144,6 @@ signed short MyLinuxFunc (unsigned short a, void *b, void *c,
|
||||||
#include < <3rd party linux header> >
|
#include < <3rd party linux header> >
|
||||||
#include <windef.h> /* Part of the Wine header files */
|
#include <windef.h> /* Part of the Wine header files */
|
||||||
|
|
||||||
signed short WINAPI MyProxyWinFunc (unsigned short a, void *b, void *c,
|
|
||||||
unsigned long *d, void *e, unsigned char f, char g,
|
|
||||||
unsigned char *h)
|
|
||||||
/* This declaration is as defined in the spec file. It is deliberately not
|
/* This declaration is as defined in the spec file. It is deliberately not
|
||||||
* specified in terms of <3rd party> types since we are messing about here
|
* specified in terms of <3rd party> types since we are messing about here
|
||||||
* between two operating systems (making it look like a Windows thing when
|
* between two operating systems (making it look like a Windows thing when
|
||||||
|
@ -163,6 +151,8 @@ signed short WINAPI MyProxyWinFunc (unsigned short a, void *b, void *c,
|
||||||
* inconsistencies.
|
* inconsistencies.
|
||||||
* For example the fourth argument needs care
|
* For example the fourth argument needs care
|
||||||
*/
|
*/
|
||||||
|
signed short WINAPI MyProxyWinFunc (unsigned short a, void *b, void *c,
|
||||||
|
unsigned long *d, void *e, int f, char g, unsigned char *h)
|
||||||
{
|
{
|
||||||
unsigned short d1;
|
unsigned short d1;
|
||||||
signed short ret;
|
signed short ret;
|
||||||
|
@ -282,22 +272,15 @@ signed short WINAPI MyProxyWinFunc (unsigned short a, void *b, void *c,
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="bindlls-advanced">
|
<sect1 id="bindlls-filenames">
|
||||||
<title id="binary-dlls-advanced.title">Advanced options</title>
|
<title id="binary-dlls-filenames.title">Converting filenames</title>
|
||||||
<para>
|
<para>
|
||||||
Here are a few more advanced options.
|
Suppose you want to convert incoming DOS format filenames to their
|
||||||
|
Unix equivalent. Of course there is no suitable function in the true
|
||||||
|
Microsoft Windows API, but wine provides a function for just this
|
||||||
|
task and exports it from its copy of the kernel32 DLL. The function
|
||||||
|
is <function>wine_get_unix_file_name</function> (defined in winbase.h).
|
||||||
</para>
|
</para>
|
||||||
<sect2 id="bindlls-adv-filenames">
|
|
||||||
<title id="binary-dlls-adv-filenames.title">Converting filenames</title>
|
|
||||||
<para>
|
|
||||||
Suppose you want to convert incoming DOS format filenames to their
|
|
||||||
Unix equivalent. Of course there is no suitable function in the true
|
|
||||||
Microsoft Windows API, but wine provides a function for just this
|
|
||||||
task and exports it from its copy of the kernel32 DLL. The function
|
|
||||||
is wine_get_unix_file_name (defined in winbase.h). Use the -ikernel32
|
|
||||||
option to winemaker to link to it.
|
|
||||||
</para>
|
|
||||||
</sect2>
|
|
||||||
</sect1>
|
</sect1>
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
|
|
@ -209,16 +209,6 @@
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="mfc-using">
|
|
||||||
<title id="mfc-using.title">Using the MFC</title>
|
|
||||||
<para>
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Specific winemaker options,
|
|
||||||
the configure options,
|
|
||||||
the initialization problem...
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
<chapter id="packaging">
|
|
||||||
<title id="packaging.title">Packaging your Winelib application</title>
|
|
||||||
<para>
|
|
||||||
Selecting which libraries to deliver,
|
|
||||||
how to avoid interference with other Winelib applications,
|
|
||||||
how to play nice with other Winelib applications
|
|
||||||
</para>
|
|
||||||
</chapter>
|
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
|
||||||
Local variables:
|
|
||||||
mode: sgml
|
|
||||||
sgml-parent-document:("winelib-user.sgml" "book" "chapter" "")
|
|
||||||
End:
|
|
||||||
-->
|
|
|
@ -149,31 +149,6 @@
|
||||||
</para>
|
</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 id="com-support">
|
|
||||||
<title id="com-support.title">VC's native COM support</title>
|
|
||||||
<para>
|
|
||||||
don't use it,
|
|
||||||
guide on how to replace it with normal C++ code (yes, how???):
|
|
||||||
extracting a .h and .lib from a COM DLL
|
|
||||||
Can '-fno-rtti' be of some use or even required?
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
|
|
||||||
<sect1 id="SEH">
|
|
||||||
<title id="SEH.title">SEH</title>
|
|
||||||
<para>
|
|
||||||
how to modify the syntax so that it works both with gcc's macros and Wine's macros,
|
|
||||||
is it even possible?
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
|
|
||||||
<sect1 id="others">
|
|
||||||
<title id="others.title">Others</title>
|
|
||||||
<para>
|
|
||||||
-fpermissive and -fno-for-scope,
|
|
||||||
maybe other options
|
|
||||||
</para>
|
|
||||||
</sect1>
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
<!entity toolkit SYSTEM "winelib-toolkit.sgml">
|
<!entity toolkit SYSTEM "winelib-toolkit.sgml">
|
||||||
<!entity mfc SYSTEM "winelib-mfc.sgml">
|
<!entity mfc SYSTEM "winelib-mfc.sgml">
|
||||||
<!entity bindlls SYSTEM "winelib-bindlls.sgml">
|
<!entity bindlls SYSTEM "winelib-bindlls.sgml">
|
||||||
<!entity packaging SYSTEM "winelib-pkg.sgml">
|
|
||||||
|
|
||||||
]>
|
]>
|
||||||
|
|
||||||
|
@ -35,6 +34,5 @@
|
||||||
&toolkit;
|
&toolkit;
|
||||||
&mfc;
|
&mfc;
|
||||||
&bindlls;
|
&bindlls;
|
||||||
&packaging;
|
|
||||||
|
|
||||||
</book>
|
</book>
|
||||||
|
|
Loading…
Reference in a new issue