Noticing that you (Dimitry) have send in a few patch replacing Win16 calls by Win32 ones, I wish to point out that winapi_check can detect "illegal" calls from Win32 to Win16.
Just do winapi_check --cross-call-win32-win16
Unfortunately there is a bug in the CVS version of winapi_check (fixed in my tree) that makes this option output too many messages. However until it is updated just do "grep 'illegal call'" on the output.
The result this is included below. Note that some of the fixes in your (Dimitry's) patches is not included in the result below because they are Win16 functions calling Win16 functions.
I do not say this is nessary wrong, but are you (Dimitry) really sure this is how it should be?
Sure it probably runs a little faster, but then Win16 applications on a modern computer are likely to be _very_ fast, so it is really worth risking potential compabillity errors because of some probably irrelavant speed differences.
Not that functions like DeleteObject are likely to have such problems but still...
---8<--- controls/menu.c: user32: GetSystemMenu: illegal call to GetSubMenu16 (Win32 -> Win16) dlls/kernel/comm.c: kernel32: BuildCommDCBAndTimeoutsA: illegal call to BuildCommDCB16 (Win32 -> Win16) dlls/msvideo/msvideo_main.c: msvfw32: ICClose: illegal call to ICSendMessage16 (Win32 -> Win16) dlls/ole32/compobj.c: ole32: CLSIDFromProgID: illegal call to CLSIDFromProgID16 (Win32 -> Win16) dlls/ole32/compobj.c: ole32 & ole32: CLSIDFromString: illegal call to CLSIDFromString16 (Win32 -> Win16) dlls/ole32/storage.c: ole32: StgIsStorageFile: illegal call to StgIsStorageFile16 (Win32 -> Win16) dlls/shell32/shell.c: shell32: ExtractAssociatedIconA: illegal call to ExtractAssociatedIcon16 (Win32 -> Win16) dlls/winmm/mci.c: mmsystem & winmm: mciExecute: illegal call to mciSendString16 (Win32 -> Win16) dlls/winmm/mci.c: winmm: mciFreeCommandResource: illegal call to mciFreeCommandResource16 (Win32 -> Win16) dlls/winmm/mmsystem.c: winmm: mciGetErrorStringA: illegal call to mciGetErrorString16 (Win32 -> Win16) dlls/winmm/mmsystem.c: winmm: mmsystemGetVersion: illegal call to mmsystemGetVersion16 (Win32 -> Win16) files/profile.c: kernel32: GetPrivateProfileSectionNamesW: illegal call to GetPrivateProfileSectionNames16 (Win32 -> Win16) graphics/escape.c: gdi32: ExtEscape: illegal call to Escape16 (Win32 -> Win16) loader/module.c: kernel32: WIN32_GetProcAddress16: illegal call to GetProcAddress16 (Win32 -> Win16) loader/ne/module.c: kernel & kernel32: FreeLibrary16: illegal call to FreeModule16 (Win32 -> Win16) memory/global.c: kernel & kernel32: GlobalFix16: illegal call to GlobalHandleToSel16 (Win32 -> Win16) memory/global.c: kernel & kernel32: GlobalReAlloc16: illegal call to GlobalHandleToSel16 (Win32 -> Win16) memory/global.c: kernel & kernel32: GlobalWire16: illegal call to WIN16_GlobalLock16 (Win32 -> Win16) memory/global.c: kernel32: K32WOWGlobalLock16: illegal call to WIN16_GlobalLock16 (Win32 -> Win16) objects/clipping.c: gdi32: RectVisible: illegal call to RectVisible16 (Win32 -> Win16) objects/dc.c: gdi32: RestoreDC: illegal call to SetDCState16 (Win32 -> Win16) objects/metafile.c: gdi32: PlayMetaFileRecord: illegal call to PlayMetaFileRecord16 (Win32 -> Win16) objects/palette.c: gdi32: UpdateColors: illegal call to UpdateColors16 (Win32 -> Win16) windows/clipboard.c: user32: RegisterClipboardFormatA: illegal call to RegisterClipboardFormat16 (Win32 -> Win16) windows/cursoricon.c: user32: CreateCursor: illegal call to CreateCursorIconIndirect16 (Win32 -> Win16) windows/cursoricon.c: user32: CreateIcon: illegal call to CreateCursorIconIndirect16 (Win32 -> Win16) windows/cursoricon.c: user32: DestroyCursor: illegal call to CURSORICON_Destroy (Win32 -> Win16) windows/cursoricon.c: user32: DestroyIcon: illegal call to CURSORICON_Destroy (Win32 -> Win16) windows/cursoricon.c: user32: LookupIconIdFromDirectoryEx: illegal call to LookupIconIdFromDirectoryEx16 (Win32 -> Win16) windows/mdi.c: user32: DefFrameProcA: illegal call to DefFrameProc16 (Win32 -> Win16) windows/mdi.c: user32: DefFrameProcW: illegal call to DefFrameProc16 (Win32 -> Win16) windows/mdi.c: user32: DefMDIChildProcA: illegal call to DefMDIChildProc16 (Win32 -> Win16) windows/mdi.c: user32: ScrollChildren: illegal call to CalcChildScroll16 (Win32 -> Win16) windows/painting.c: user32: UserRealizePalette: illegal call to RealizePalette16 (Win32 -> Win16)