Wine, WineLib and "Programming Applications for Windows"
Table of contents
- General
- Introduction
- News
- Testing configuration
- Statistics
- Installation
- Wine notes
- Winelib notes
- Test Results
- API Index
French title |
Développer sous Windows 95 et Windows NT |
French ISBN |
84082-082-X (2nd edition) |
Original title |
The developper's guide to the Win32 API for Windows NT 3.5 and Windows 95
then renamed to: Advanced Windows
and then to: Programming Applications for Microsoft Windows
|
Original ISBN |
1-55615-677-4 |
Author |
Jeffrey Richter |
URL |
Programming Applications for Microsoft Windows
|
Buying online |
Barnes & Noble
|
Get the complete testing kit, including these pages, from:
PrgApps-0.2.0.tar.gz
(it's released under the X11 license)
- 0.2.0: Major update, now uses the winemaker-based wpbtk.
- Retested most examples with the latest Wine.
- The Winelib tests now use winemaker-based makefiles and
thus they can (finally) be used with the latest Wine.
- Winelib applications are now linked with Wine's msvcrt.dll which solves
most C library related compilation problems.
- 0.1.2: Finally tested some applications
- Removed the experimental SEH patch. So fewer applications compile.
The tests have been performed on my Linux box:
- Linux: Debian 2.2 (potato)
- Kernel: 2.2.17pre6
- Libc: glibc 2.2.1
- X Server: XFree86 3.3.x in 1600x1200x16
- Gcc version: 2.95.2
- G++ version: 2.95.2
- Wine version: Usually the CVS version as of the date indicated for
each test
- Windows version: Windows 98
I sometimes say that the values I get are different from what I get on
Windows. In that case the reference is a Windows 98 laptop running in
1024x768x16. Of course I ignored differences related to the resolution.
31 examples
20 have been tested (65%)
|
7 have Wine errors (35% of tested) |
1 have warnings (5% of tested) |
for a total of 9 errors |
for a total of 4 warnings |
6 have Winelib errors (19% of total) |
1 have warnings (3% of total) |
for a total of 6 errors |
for a total of 1 warnings |
27 executables |
21 Winelib executables (78%) |
4 libraries |
3 Winelib libraries (75%) |
35 C files |
28 compiled (80%) |
31 RC files |
31 compiled (100%) |
As you can see progress has been made since the last release, especially
concerning Winelib.
31 examples
20 have been tested (65%)
|
9 have Wine errors (45% of tested) |
1 have warnings (5% of tested) |
for a total of 10 errors |
for a total of 4 warnings |
16 have WineLib errors (52% of total) |
1 have warnings (3% of total) |
for a total of 17 errors |
for a total of 1 warnings |
27 executables |
10 WineLib executables (37%) |
4 libraries |
4 WineLib libraries (100%) |
35 C files |
27 compiled (77%) |
31 RC files |
31 compiled (100%) |
To install this testing kit follow these steps:
#Copy the contents of the CD to some directory.
mkdir PrgApps
cd PrgApps
cp -r /cdrom/* .
# The directories will be read-only, make them read-write
chmod u+w *.[0-9][0-9]
# Run winemaker as follows
winemaker --nogenerated-files .
# Uncompress the contents of the testing kit. Adapt to the version you got
tar xvfz ~/PrgApps-0.2.0.tar.gz
# Then complete the setup.
./generate --setup
# And prepare the compilation
./configure --with-wine=~/wine
# Make sure you have set up the environment correctly for using Wine
# Then recompile everything, keeping a log
make 2>&1 | tee make.log
To compile and perform the tests with Wine you will need to set up
the Wine environment (LD_LIBRARY_PATH and PATH) as you usually do when
you want to use Wine.
- No notes yet. The informal tests I have done seem to indicate that many
programs do not work. This is quite logical regarding the advanced nature
of these programs: asynchronous I/O, structured exception handling,
virtual memory manipulation, injecting a DLL into another process's
address space, ...
- The '#include' case issues are now taken care of by winemaker.
Likewise the 'afxres.h' vs. 'winres.h' problems have gone away.
- Most compilation/link problems related to the C
library have been solved now that we can link with msvcrt.dll (actually,
crtdll.dll can be used too).
- I removed my __try/__except/__finally SEH hacks so 6 files that used to
compile don't compile anymore. I'll try to make it work again, and better
one of these days. But it seems that the previous version just wasn't
very good.
- I added an include of 'windef.h' in 'advwin32.h' so that '__stdcall' is
defined properly.
- If you apply the patch in 'diff20000729-__try.txt' then you should be
able to compile the files that make use of the '__try' construct. If you
use '__try' + '_except' but not '__finally' then one needs to add
'__endtry' to the source (this is already done by the regular patches).
If the construct being used is '__try' + '__finally' then the source
does not need to be modified. In either case one must first include
'wine/exception.h' but this is already done by 'advwin32.h' (which I
patched). I'm not sure the 'diff20000729-__try.txt' can be integrated
into Wine as is. It would be nice to have these definitions straight
from 'windef.h' but this causes header dependency problems. It would
be nice not to have to add an '__endtry' but I'm not sure this can be
avoided.
- Chapter 5 - Exploring the virtual memory (Exploration de la mémoire virtuelle)
- Chapter 6 - Using the virtual memory in your own applications (Utiliser la mémoire virtuelle dans vos propres applications)
- Chapter 7 - Memory mapped files (Les fichier mappés en mémoire)
- Chapter 9 - Synhronizing threads (La synchronisation des threads)
- Chapter 10 - Windows messages and asynchronous input/output (Messages de Windows et entrées sorties asynchrones)
- Chapter 11 - Dynamically linked libraries (Bibliothèques de liens dynamiques)
- Chapter 12 - Thread local storage (Stockage local de thread)
- Chapter 13 - The filesystem and the file input/output (Systèmes de fichier entrées/sortie de fichier)
- Chapter 14 - Structures exception handling (Gestion structurée des exceptions)
- Chapter 16 - Going beyond the process boundaries (Dépasser les frontières du processus)
This is an inverted list of the APIs used by the examples. Click on one of the functions to find which of the sample programs invoke it.
- ADVAPI32
IsTextUnicode
- GDI32
GetStockObject, Rectangle, SelectObject
- KERNEL32
CloseHandle, CopyFileA, CreateEventA, CreateFileA, CreateFileMappingA, CreateMutexA, CreateProcessA, CreateRemoteThread, CreateSemaphoreA, DeleteCriticalSection, EnterCriticalSection, FindClose, FindCloseChangeNotification, FindFirstChangeNotificationA, FindFirstFileA, FindNextChangeNotification, FindNextFileA, GetCommandLineA, GetCurrentDirectoryA, GetCurrentProcess, GetCurrentProcessId, GetCurrentThreadId, GetDiskFreeSpaceA, GetDriveTypeA, GetExitCodeThread, GetFileSize, GetLastError, GetLogicalDriveStringsA, GetLogicalDrives, GetModuleFileNameA, GetModuleHandleA, GetProcAddress, GetProcessHeap, GetStartupInfoA, GetSystemInfo, GetThreadContext, GetTickCount, GetVersion, GetVolumeInformationA, GlobalAlloc, GlobalFree, GlobalMemoryStatus, HeapAlloc, HeapFree, HeapSize, InitializeCriticalSection, InterlockedDecrement, InterlockedIncrement, LeaveCriticalSection, MapViewOfFile, OpenFileMappingA, OpenProcess, RaiseException, ReadFile, ReadFileEx, ReadProcessMemory, ReleaseMutex, ReleaseSemaphore, ResetEvent, ResumeThread, SetCurrentDirectoryA, SetEndOfFile, SetEvent, SetFilePointer, SetLastError, SetPriorityClass, SetThreadPriority, Sleep, SleepEx, SuspendThread, TerminateThread, UnmapViewOfFile, VirtualAlloc, VirtualFree, VirtualProtectEx, VirtualQuery, VirtualQueryEx, WaitForMultipleObjects, WaitForSingleObject, WriteFileEx, WriteProcessMemory, lstrlenA
- MODULE
GetModuleUsage
- MSVCRT20
_XcptFilter, __getmainargs, __p__acmdln, __p__commode, __p__fmode, _beginthreadex, _controlfp, _except_handler3, _exit, _initterm, _strrev, _wcsrev, exit, malloc, memmove, rand, sprintf, sscanf, strchr, strncpy, strrchr, vsprintf, wcschr, wcscpy
- PMRSTSUB
SubclassProgManFrame, g_hHook
- SOMELIB
LoadResString
- USER32
AppendMenuA, AttachThreadInput, BeginPaint, BringWindowToTop, CallNextHookEx, CallWindowProcA, ClipCursor, CreateDialogParamA, DestroyWindow, DialogBoxParamA, DispatchMessageA, DrawMenuBar, EnableWindow, EndDialog, EndPaint, EnumWindows, FindWindowA, GetActiveWindow, GetCapture, GetClassNameA, GetClientRect, GetClipCursor, GetDesktopWindow, GetDialogBaseUnits, GetDlgCtrlID, GetDlgItem, GetDlgItemInt, GetDlgItemTextA, GetFocus, GetForegroundWindow, GetMenu, GetMessageA, GetScrollPos, GetScrollRange, GetTopWindow, GetWindow, GetWindowLongA, GetWindowRect, GetWindowTextA, GetWindowTextLengthA, GetWindowThreadProcessId, InvalidateRect, IsCharAlphaA, IsDialogMessageA, IsDlgButtonChecked, IsIconic, IsWindow, IsWindowVisible, KillTimer, LoadCursorA, LoadIconA, MapWindowPoints, MessageBoxA, MsgWaitForMultipleObjects, PeekMessageA, PostMessageA, PostQuitMessage, PostThreadMessageA, RegisterWindowMessageA, ReleaseCapture, RemoveMenu, SendMessageA, SetActiveWindow, SetCapture, SetClassLongA, SetCursor, SetDlgItemInt, SetDlgItemTextA, SetFocus, SetForegroundWindow, SetRect, SetScrollPos, SetScrollRange, SetTimer, SetWindowLongA, SetWindowPos, SetWindowTextA, SetWindowsHookExA, ShowCursor, ShowWindow, TranslateMessage, UnhookWindowsHookEx, wsprintfA
- comdlg32
GetOpenFileNameA