Wine, WineLib and "Programming Windows 95"
Last updated: 2001/4/1
Description
Demonstrates how to use the IMalloc COM interface. This programs has 10
lines which you can either allocate using malloc or IMalloc. To allocate
things with IMalloc you must first create an IMalloc object. This program
can also query the IUnknown, IMalloc and IMarshal interfaces to discover
whether they are supported or not.
Wine tests
- When querying whether an interface is supported
the result is displayed in a dialog box. This dialog box contains the
'error' icon whereas in Windows it does not.
Winelib tests
- 'caller.c' contains errors and will not compile as is (whether you
use gcc or Visual C++ 5). It passes a GUID instead of a pointer to the
GUID in several places. So I provided a patch to make it compile.
- Generates errors:
compobj.o: In function `DllGetClassObject':
~/wine/include/guiddef.h:57: undefined reference to `CLSID_ALLOCATOR'
then
caller.spec:12: warning: imalloc.dll imported but no symbols used
and
caller.o: In function `WndProc':
caller.c:74: undefined reference to `CreateAllocator'
Tested API
- GDI32
ExtTextOutA, GetBkColor, GetTextColor, GetTextMetricsA, SetBkColor, SetTextColor, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile, lstrcpyA, lstrlenA
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EnableMenuItem, EndPaint, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, MessageBoxA, PostQuitMessage, PtInRect, RegisterClassExA, SetRect, ShowWindow, TranslateMessage, UpdateWindow, wsprintfA
- imalloc
CreateAllocator
Last updated: 2001/2/28
Description
Same as caller but using the pubmem library.
Wine tests
- Since I did not register the pubmem library
this does not work (just as on Windows 95). So I need to register the
library and test again.
Winelib tests
Tested API
- GDI32
ExtTextOutA, GetBkColor, GetTextColor, GetTextMetricsA, SetBkColor, SetTextColor, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile, lstrcpyA, lstrlenA
- USER32
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EnableMenuItem, EndPaint, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, MessageBoxA, PostQuitMessage, PtInRect, RegisterClassExA, SetRect, ShowWindow, TranslateMessage, UpdateWindow, wsprintfA
- ole32
CoCreateInstance, CoInitialize, CoUninitialize
Last updated: 2001/2/4
Description
This library demonstrates how to implement an OLE/COM object by
implementing the IMalloc interface.
Wine tests
- This is a DLL. I cannot test it on its own.
See caller.
Winelib tests
Tested API
- KERNEL32
CloseHandle, DisableThreadLibraryCalls, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCompact, HeapCreate, HeapDestroy, HeapFree, HeapReAlloc, HeapSize, HeapWalk, LoadLibraryA, SetFilePointer, SetHandleCount, SetStdHandle, WideCharToMultiByte, WriteFile
Last updated: 2001/2/28
Description
Same as imalloc but with a public server component.
Wine tests
- This is a DLL. I cannot test it on its own.
See callpub.
Winelib tests
Tested API
- KERNEL32
CloseHandle, DisableThreadLibraryCalls, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCompact, HeapCreate, HeapDestroy, HeapFree, HeapReAlloc, HeapSize, HeapWalk, LoadLibraryA, SetFilePointer, SetHandleCount, SetStdHandle, WideCharToMultiByte, WriteFile