Talk:Family API

Family API is subset of Legacy API which emulated via DOS interrupts in binded to OS/2 NE (New Executable) executable instead of standard stub.

Standard NE EXE contains stub which writes something like "This program requires OS/2"

For Family API BIND tool replaces such stub by "emulation library" and NE loader/linker.

So "binded" OS/2 exe file can be executed under DOS if OS/2 exe uses only Family API subset.

Such library named api.lib in old SDK.

32-bit LX executables doesn't work with Family API. Only old NE executables.

HX DOS extender uses similar approach to execute Windows NE executables under dos and Windows PE executables. Before OS/2 2.0 main exe format was NE. LE format is not widely used but can be found. LX is main format for OS/2 for now. Also PE format is used in SciTech SNAP drivers. So FAPI work only for NE formats. In current OS/2 some command line tools is family executables.

Personal Notes about FAPI
This is my current working file for FAPI analyse.

DosAllocHuge DosAllocSeg DosBeep DosBufReset DosCaseMap DosChdir DosChgFilePtr DosClose DosCreateCSAlias DosDelete DosDevConfig DosDevIOCtl DosDupHandle DosErrClass DosError DosExecPgm DosExit DosFileLocks DosFindClose DosFindFirst DosFindNext DosFreeSeg DosGetCollate DosGetCtryInfo DosGetDBCSEv DosGetDateTime DosGetEnv DosGetHugeShift DosGetMachineMode DosGetMessage DosGetVersion DosHoldSignal DosInsMessage DosMkdir DosMove DosNewSize DosOpen DosPutMessage DosQCurDir DosQCurDisk DosQFHandState DosQFileInfo DosQFileMode DosQFSinfo DosQVerify DosRead DosReallocHuge DosReallocSeg DosRmDir DosSelectDisk DosSetDateTime DosSetFHandState DosSetFileInfo DosSetFileMode DosSetFSinfo DosSetSigHandler DosSetVec DosSetVerify DosSleep DosSubAlloc DosSubFree DosSubSet DosWrite KbdCharin KbdFlushBuffer KbdGetStatus KbdPeek KbdSetStatus KbdStringin VioGetBuf VioGetCurPos VioGetCurType VioGetMode VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrLock VioScrollDn VioScrollLf VioScrollRt VioScrollUp VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTy

This functions documented in MS docs.

DosGetSpecChar is not FAPI, as I know.

DosCWait also can be FAPI function because it requires multitasking support..

some differences for various SDK version. 1.05 SDK requires INCL_DOSQUEUES define, but other SDK requires INCL_DOSMISC

some functions were not documented at all. For example, VioInit, KbdInit, MouInit. In OS/2 1.x such functions is present, but in OS/2 2.0+ no such api entries.