en:docs:win16:modules:kernel

This is an old revision of the document!


This is part of Win16 API which allow to create versions of program from one source code to run under OS/2 and Win16. Under OS/2 program can be running under Win-OS/2 if program is Windows NE executable, and with help on Windows Libraries for OS/2, if it is OS/2 NE executable. Here is a WLO to OS/2 API mapping draft

2021/09/01 04:23 · prokushev · 0 Comments

Note minimal checked windows version is 1.03

Ordinal Name Description Status Version ECMA-234
Real Std Enh
001 FatalExit Display the current state of Windows and prompts for instructions on how to proceed 1.03 Yes
002 ExitKernel
003 GetVersion Return the current version of Windows 1.03 Yes
004 LocalInit Initialize local heap Yes
005 LocalAlloc Allocate wBytes bytes of memory from the local heap 1.03 Yes
006 LocalRealloc Reallocate the local memory block 1.03 Yes
007 LocalFree Free the local memory block 1.03 Yes
008 LocalLock Lock the local memory block 1.03 Yes
009 LocalUnlock Unlock the local memory block 1.03 Yes
010 LocalSize Retrieve the current size, in bytes, of the local memory block 1.03 Yes
011 LocalHandle Yes
012 LocalFlags Return information about the specified local memory block 1.03 Yes
013 LocalCompact Generate free bytes of memory by compacting, if necessary, the module's local heap 1.03 Yes
014 LocalNotify
015 GlocalAlloc Allocate memory from the global heap 1.03 Yes
016 GlobalRealloc Reallocate the global memory block 1.03 Yes
017 GlobalFree Free the global memory block 1.03 Yes
018 GlobalLock Retrieve the absolute memory address of the global memory block 1.03 Yes
019 GlobalUnlock Unlock the global memory block 1.03 Yes
020 GlobalSize Retrieve the current size, in bytes, of the global memory block 1.03 Yes
021 GlobalHandle Yes
022 GlobalFlags Return information1 about the specified global memory block 1.03 Yes
023 LockSegment
024 UnlockSegment
025 GlobalCompact Generate free bytes of global memory by compacting, if necessary, the system's global heap 1.03 Yes
026 GlobalFreeAll
027 ???
028 GlobalMasterHandle
029 Yield halts the current task and starts any waiting task 1.03 Yes
030 WaitEvent
031 PostEvent
032 SetPriority
033 LockCurrentTask
034 SetTaskQueue
035 GetTaskQueue
036 GetCurrentTask Return the handle of the currently executing task 1.03 Yes
037 GetCurrentPDB Return current PDB
038 SetTaskSignalProc
039 ???
040 ???
041 EnableDOS
042 DisableDOS
043 ???
044 ???
045 LoadModule Load module Yes
046 FreeModule Release module Yes
047 GetModuleHandle Retrieve the module handle of the specified module 1.03 Yes
048 GetModuleUsage Return the reference count of a given module 1.03 Yes
049 GetModuleName Retrieve the name of the executable file from which the specified module was loaded 1.03 Yes
050 GetProcAddress Retrieve the memory address of the function whose name 1.03 Yes
051 MakeProcInstance Bind the data segment of the module instance specified to the function pointed 1.03 Yes
052 FreeProcInstance Frees the function specified from the data segment 1.03 Yes
053 CallProcInstance
054 GetInstanceData Copy data from a previous instance of an application into the data area of the current instance 1.03 Yes
055 Catch Catch the current execution environment and copy it the the buffer 1.03 Yes
056 Throw Restore the execution environment to the values saved in the buffer 1.03 Yes
057 GetProfileInt Retrieve the value of an integer key from the the Windows initialization file 1.03 Yes
058 GetProfileString Copy a character string from the user profile into the buffer 1.03 Yes
059 WriteProfileString Copy the character string into the Windows initialization file 1.03 Yes
060 FindeResource Determine the location of a resource in the specified resource file 1.03 Yes
061 LoadResource Load a resource from the executable file associated with the module 1.03 Yes
062 LockResource Retrieve the absolute memory address of the loaded resource 1.03 Yes
063 FreeResource Remove a loaded resource from memory by freeing the allocated memory occupied by that resource 1.03 Yes
064 ACCESSRESOURCE Open the specified resource file and moves the file pointer to the beginning of the specified resource 1.03
065 SIZEOFRESOURCE Supply the size in bytes of the specified resource 1.03 Yes
066 ALLOCRESOURCE Allocate uninitialized memory for the passed resource 1.03 Yes
067 SETRESOURCEHANDLER Set up a function to load resources 1.03 Yes
068 INITATOMTABLE Initialize an atom hash table and set its size 1.03
069 FINDATOM Search the atom table for the character string 1.03
070 ADDATOM Add the character string to the atom table 1.03
071 DELETEATOM Delete an atom 1.03
072 GETATOMNAME Retrieve a copy of the character string associated with atom 1.03
073 GETATOMHANDLE
074 OPENFILE Create, open, reopen, or delete a file 1.03 Yes
075 OpenPathname
076 DeletePathname
077 AnsiNext Move to the next character in a string 1.03 Yes
078 AnsiPrev Move to the previous character in a string 1.03 Yes
079 AnsiUpper Convert a string or a character to upper case 1.03 Yes
080 AnsiLower Convert the given string to lower case 1.03 Yes
081 _LCLOSE Close the file described by the file handle Yes
082 _LREAD Read a specified number of bytes from a file into memory Yes
083 _LCREAT Create and open a file, described by FileName, for reading and/or writing Yes
084 _LLSEEK Move the current file position pointer of the file Yes
085 _LOPEN Open a file Yes
086 _LWRITE Write a specified number of bytes of memory to a file Yes
087 LSTRCMP Compare two strings Yes
088 LSTRCPY Copy the contents from one string to another Yes
089 LSTRCAT Concatecate the contents of two strings Yes
090 LSTRLEN Determines the length of the string Yes
091 INITTASK
092 GETTEMPDRIVE Return a letter specifying the optimal drive for a temporary file 1.03 Yes
093 GETCODEHANDLE Return the handle of the code segment containing the function pointed 1.03
094 DEFINEHANDLETABLE
095 LOADLIBRARY Load the library module contained in the specified file and returns a handle to the loaded module 1.03 Yes
096 FREELIBRARY Free memory occuped by library when module reference count equal to zero 1.03 Yes
097 GETTEMPFILENAME Create a temporary filename 1.03 Yes
098 GetLastDiskChange
099 GetLpErrMode
100 VALIDATECODESEGMENTS
101 NoHookDosCall
102 DOS3CALL
103 NETBIOSCALL
104 GETCODEINFO
105 GetExeVersion
106 SETSWAPAREASIZE
107 SETERRORMODE Yes
108 SWITCHSTACKTO
109 SWITCHSTACKBACK
110 PatchCodeHandle
111 GLOBALWIRE
112 GLOBALUNWIRE
113 __AHSHIFT
114 __AHINCR
115 OUTPUTDEBUGSTRING Yes
116 InitLib
117 OldYield
118 GetTaskQueueDS
119 GetTaskQueueES
120 UndefDynLink
121 LOCALSHRINK Yes
122 IsTaskLocked
123 KbdRst
124 EnableKernel
125 DisableKernel
126 MemoryFreed
127 GETPRIVATEPROFILEINT Yes
128 GETPRIVATEPROFILESTRING Yes
129 WRITEPRIVATEPROFILESTRING Yes
130 FILECDR
131 GETDOSENVIRONMENT
132 GETWINFLAGS Yes
133 GetExePtr
134 GETWINDOWSDIRECTORY Yes
135 GETSYSTEMDIRECTORY Yes
136 GETDRIVETYPE Yes
137 FATALAPPEXIT Yes
138 GETHEAPSPACES
139 DoSignal
140 SetSigHandler
141 InitTask1
142 ???
143 ???
144 ???
145 ???
146 ???
147 ???
148 ???
149 ???
150 DIRECTEDYIELD Yes
151 WinOldApCall
152 GETNUMTASKS Yes
153 ???
154 GLOBALNOTIFY Yes
155 GetTaskDS
156 LIMITEMSPAGES
157 GetCurPID
158 IsWinOldApTask
159 GlobalHandleNoRip
160 EMSCopy
161 LocalCountFree
162 LocalHeapSize
163 GLOBALLRUOLDEST Yes
164 GLOBALLRUNEWEST Yes
165 A20Proc
166 WINEXEC Yes
167 GetExpWinVer
168 DirectResAlloc
169 GETFREESPACE Yes
170 ALLOCCSTODSALIAS
171 ALLOCDSTOCSALIAS
172 AllocAlias
173 __ROMBIOS
174 __A000H
175 ALLOCSELECTOR
176 FREESELECTOR
177 PRESTOCHANGOSELECTOR
178 ???
179 ???
180 ???
181 ???
182 ???
183 ???
184 GLOBALDOSALLOC
185 GLOBALDOSFREE
186 GETSELECTORBASE
187 SETSELECTORBASE
188 GETSELECTORLIMIT
189 SETSELECTORLIMIT
190 ???
191 GLOBALPAGELOCK
192 GLOBALPAGEUNLOCK
193 ???
194 ???
195 ???
196 SELECTORACCESSRIGHTS
197 GLOBALFIX Yes
198 GLOBALUNFIX Yes
199 SETHANDLECOUNT Yes
200 VALIDATEFREESPACES
201 ???
202 ???
203 DEBUGBREAK
204 SWAPRECORDING
205 ???
206 ALLOCSELECTORARRAY
207 ISDBCSLEADBYTE Yes
310 LOCALHANDLEDELTA Set the number of handle table entries to be allocated when the local heap manager runs out of handle table 1.03
320 ISTASK Yes
323 ISROMMODULE
324 LOGERROR
325 LOGPARAMERROR
326 ISROMFILE
334 ISBADREADPTR Yes
335 ISBADWRITEPTR Yes
336 ISBADCODEPTR Yes
337 ISBADSTRINGPTR Yes
347 ISBADHUGEWRITEPTR Yes
348 HMEMCPY
349 _HREAD
350 _HWRITE
353 LSTRCPYN Yes
354 GETAPPCOMPATFLAGS
355 GETWINDEBUGINFO
356 SETWINDEBUGINFO

Not found in exports (check other module later): GlobalDiscard 1.03 LocalDiscard 1.03 LocalFreeze 1.03 LocalMelt 1.03 LockData 1.03 UnLockData 1.03 SetPriority 1.03 AddFontResource 1.03 RemoveFontResource 1.03 LoadBitmap 1.03 LoadCursor 1.03 LoadIcon 1.03 LoadMenu 1.03 LoadString 1.03 LoadAccelerators 1.03 AnsiToOem 1.03 OemToAnsi 1.03 MAKEINTATOM 1.03 (Macro?)

Group Functions
Module Management GetVersion GetModuleHandle GetModuleUsage GetModuleFileName GetProcAddress MakeProcInstance FreeProcInstance GetInstanceData Catch Throw GetCodeHandle LoadLibrary FreeLibrary
Global Memory Management GlobalAlloc GlobalCompact GlobalDiscard GlobalFree GlobalLock GlobalReAlloc GlobalSize GlobalUnlock GlobalFlags
Local Memory Management LocalInit LocalAlloc LocalCompact LocalDiscard LocalFree LocalLock LocalFreeze LocalMelt LocalReAlloc LocalSize LocalUnlock LocalHandleDelta LockData UnlockData LocalFlags
Task Scheduling GetCurrentTask Yield SetPriority
Resource Management AddFontResource RemoveFontResource LoadBitmap LoadCursor LoadIcon LoadMenu LoadString LoadAccelerators FindResource LoadResource AllocResource LockResource FreeResource AccessResource SizeofResource SetResourceHandler
String Manipulation AnsiUpper AnsiLower AnsiNext AnsiPrev AnsiUpperBuff AnsiLowerBuff lstrcmp lstrcmpi IsCharAlpha IsCharAlphaNumeric IsCharUpper IsCharLower _wsprintf wvsprintf
Atom Management InitAtomTable AddAtom DeleteAtom FindAtom GetAtomName GlobalAddAtom GlobalDeleteAtom GlobalFindAtom GlobalGetAtomName
Initialization Files GetProfileInt GetProfileString WriteProfileString
Debugging FatalExit
File Input/Output _lopen _lcreat _llseek _lread _lwrite _lclose OpenFile GetTempFileName GetTempDrive
Registry RegOpenKey RegCreateKey RegCloseKey RegDeleteKey RegSetValue RegQueryValue RegEnumKey
Window Management CreateWindow CreateWindowEx DestroyWindow ShowWindow CloseWindow OpenIcon MoveWindow SetWindowPos BringWindowToTop GetWindow GetParent SetParent GetNextWindow GetTopWindow GetWindowRect GetClientRect AdjustWindowRect AdjustWindowRectEx EnableWindow IsWindowEnabled IsWindowVisible IsIconic IsZoomed IsWindow IsChild FindWindow EnumWindows EnumChildWindows EnumTaskWindows GetDesktopWindow GetDesktopHwnd WindowFromPoint ChildWindowFromPoint GetWindowText SetWindowText GetWindowTextLength GetClassName GetWindowLong SetWindowLong GetWindowWord SetWindowWord GetWindowTask GetWindowPlacement SetWindowPlacement ArrangeIconicWindows CascadeChildWindows TileChildWindows ShowOwnedPopups AnyPopup GetLastActivePopup SetActiveWindow GetActiveWindow SetFocus GetFocus SetCapture GetCapture ReleaseCapture SetSysModalWindow GetSysModalWindow LockWindowUpdate RedrawWindow UpdateWindow InvalidateRect InvalidateRgn ValidateRect ValidateRgn GetUpdateRect GetUpdateRgn ExcludeUpdateRgn BeginDeferWindowPos DeferWindowPos EndDeferWindowPos FlashWindow
Message Handling GetMessage PeekMessage PostMessage PostAppMessage SendMessage ReplyMessage InSendMessage WaitMessage TranslateMessage DispatchMessage GetMessagePos GetMessageTime GetMessageExtraInfo PostQuitMessage RegisterWindowMessage SetMessageQueue GetQueueStatus GetInputState QuerySendMessage
Painting and Drawing BeginPaint EndPaint GetDC GetDCEx GetWindowDC ReleaseDC DrawText GrayString TabbedTextOut GetTabbedTextExtent FillRect InvertRect FrameRect DrawFocusRect DrawIcon ScrollDC ScrollWindow ScrollWindowEx FillWindow PaintRect GetControlBrush
Menus CreateMenu CreatePopupMenu DestroyMenu GetMenu SetMenu GetSystemMenu GetSubMenu AppendMenu InsertMenu ModifyMenu DeleteMenu RemoveMenu ChangeMenu CheckMenuItem EnableMenuItem HiliteMenuItem GetMenuState GetMenuString GetMenuItemCount GetMenuItemID DrawMenuBar TrackPopupMenu GetMenuCheckMarkDimensions SetMenuItemBitmaps IsMenu
Clipboard OpenClipboard CloseClipboard EmptyClipboard GetClipboardOwner GetOpenClipboardWindow SetClipboardData GetClipboardData CountClipboardFormats EnumClipboardFormats RegisterClipboardFormat GetClipboardFormatName IsClipboardFormatAvailable GetPriorityClipboardFormat SetClipboardViewer GetClipboardViewer ChangeClipboardChain
Caret CreateCaret DestroyCaret SetCaretPos GetCaretPos HideCaret ShowCaret SetCaretBlinkTime GetCaretBlinkTime
Cursor and Icon SetCursor GetCursor SetCursorPos GetCursorPos ShowCursor ClipCursor GetClipCursor LoadCursor LoadIcon CreateCursor CreateIcon CopyCursor CopyIcon DestroyCursor DestroyIcon CreateCursorIconIndirect
Scroll Bars SetScrollPos GetScrollPos SetScrollRange GetScrollRange ShowScrollBar EnableScrollBar CalcChildScroll
Dialog Boxes DialogBox DialogBoxIndirect DialogBoxParam DialogBoxIndirectParam CreateDialog CreateDialogIndirect CreateDialogParam CreateDialogIndirectParam EndDialog GetDlgItem SetDlgItemText GetDlgItemText SetDlgItemInt GetDlgItemInt CheckDlgButton IsDlgButtonChecked CheckRadioButton SendDlgItemMessage GetNextDlgGroupItem GetNextDlgTabItem GetDlgCtrlID IsDialogMessage MapDialogRect GetDialogBaseUnits DefDlgProc DlgDirList DlgDirListComboBox DlgDirSelect DlgDirSelectEx DlgDirSelectComboBox DlgDirSelectComboBoxEx
Device Context Management GetDC GetDCEx GetWindowDC ReleaseDC SaveDC RestoreDC CreateDC CreateCompatibleDC DeleteDC ResetDC
Coordinates and Transformations SetMapMode GetMapMode SetWindowOrg GetWindowOrg SetWindowExt GetWindowExt SetViewportOrg GetViewportOrg SetViewportExt GetViewportExt OffsetWindowOrg OffsetViewportOrg ScaleWindowExt ScaleViewportExt DPtoLP LPtoDP
Drawing Functions SetPixel GetPixel MoveTo LineTo Polyline Polygon PolyPolygon Rectangle RoundRect Ellipse Arc Chord Pie FloodFill ExtFloodFill DrawFocusRect PatBlt BitBlt StretchBlt StretchDIBits SetDIBits GetDIBits SetDIBitsToDevice
Regions CreateRectRgn CreateRectRgnIndirect CreateRoundRectRgn CreateEllipticRgn CreateEllipticRgnIndirect CreatePolygonRgn CreatePolyPolygonRgn CombineRgn EqualRgn OffsetRgn FillRgn FrameRgn InvertRgn PaintRgn SelectClipRgn ExcludeClipRect IntersectClipRect OffsetClipRgn GetClipBox GetRgnBox PtInRegion RectInRegion SetRectRgn
Bitmaps CreateBitmap CreateBitmapIndirect CreateCompatibleBitmap CreateDiscardableBitmap CreateDIBitmap CreateDIBPatternBrush SetBitmapBits GetBitmapBits SetBitmapDimension GetBitmapDimension
Brushes and Pens CreateSolidBrush CreateHatchBrush CreatePatternBrush CreateBrushIndirect CreatePen CreatePenIndirect SetBrushOrg GetBrushOrg SelectObject GetObject DeleteObject GetStockObject UnrealizeObject
Fonts and Text CreateFont CreateFontIndirect CreateScalableFontResource AddFontResource RemoveFontResource EnumFonts EnumFontFamilies GetTextMetrics GetTextExtent GetTextFace GetCharWidth GetCharABCWidths GetOutlineTextMetrics GetGlyphOutline GetKerningPairs SetTextColor GetTextColor SetBkColor GetBkColor SetBkMode GetBkMode SetTextAlign GetTextAlign SetTextCharacterExtra GetTextCharacterExtra SetTextJustification TextOut ExtTextOut TabbedTextOut GetTabbedTextExtent
Metafiles CreateMetaFile CloseMetaFile DeleteMetaFile CopyMetaFile GetMetaFile GetMetaFileBits SetMetaFileBits PlayMetaFile PlayMetaFileRecord EnumMetaFile IsValidMetaFile
Printing StartDoc EndDoc StartPage EndPage SetAbortProc AbortDoc QueryAbort OpenJob CloseJob DeleteJob WriteSpool StartSpoolPage EndSpoolPage SpoolFile
Palettes CreatePalette SelectPalette RealizePalette GetPaletteEntries SetPaletteEntries ResizePalette AnimatePalette UpdateColors GetNearestPaletteIndex GetNearestColor SetSystemPaletteUse GetSystemPaletteUse GetSystemPaletteEntries
Device Capabilities GetDeviceCaps GetRasterizerCaps GetEnvironment SetEnvironment GetAspectRatioFilter Escape CreateIC
Miscellaneous GDI SetROP2 GetROP2 SetPolyFillMode GetPolyFillMode SetStretchBltMode GetStretchBltMode SetMapperFlags GetMapperFlags LineDDA MulDiv GetCurrentPosition GetBoundsRect SetBoundsRect FastWindowFrame
Timer SetTimer KillTimer GetTickCount GetTimerResolution GetCurrentTime
Hooks SetWindowsHook SetWindowsHookEx UnhookWindowsHook UnhookWindowsHookEx CallNextHookEx DefHookProc CallMsgFilter
Communications OpenComm CloseComm ReadComm WriteComm SetCommState GetCommState GetCommError TransmitCommChar SetCommEventMask GetCommEventMask SetCommBreak ClearCommBreak UngetCommChar BuildCommDCB EscapeCommFunction FlushComm EnableCommNotification
Networking (WNet) WNetErrorText WNetOpenJob WNetCloseJob WNetAbortJob WNetHoldJob WNetReleaseJob WNetCancelJob WNetSetJobCopies WNetWatchQueue WNetUnwatchQueue WNetLockQueueData WNetUnlockQueueData WNetGetConnection WNetGetCaps WNetDeviceMode WNetBrowseDialog WNetGetUser WNetAddConnection WNetCancelConnection WNetGetError WNetGetErrorText WNetEnable WNetDisable WNetRestoreConnection WNetWriteJob WNetConnectDialog WNetDisconnectDialog WNetConnectionDialog WNetViewQueueDialog WNetPropertyDialog WNetGetDirectoryType WNetDirectoryNotify WNetGetPropertyText
System Information GetSystemMetrics GetSysColor SetSysColors SystemParametersInfo GetFreeSystemResources GetSystemDebugState GetDoubleClickTime SetDoubleClickTime SwapMouseButton GetKeyState GetAsyncKeyState GetKeyboardState SetKeyboardState mouse_event GetMouseEventProc EnableHardwareInput IsUserIdle LockInput MessageBeep WinHelp
Window Classes RegisterClass RegisterClassEx UnregisterClass GetClassInfo GetClassInfoEx GetClassWord SetClassWord GetClassLong SetClassLong GetClassName
Window Properties SetProp GetProp RemoveProp EnumProps
MDI Support DefFrameProc DefMDIChildProc TranslateMDISysAccel
Drivers OpenDriver CloseDriver SendDriverMessage GetDriverModuleHandle GetDriverInfo GetNextDriver DefDriverProc
Miscellaneous InitApp ExitWindows ExitWindowsExec OLDEXITWINDOWS BEAR11 BEAR86 BEAR182 UserSeeUserDo OldSetDeskPattern SetRect SetRectEmpty CopyRect IsRectEmpty PtInRect OffsetRect InflateRect IntersectRect UnionRect EqualRect SubtractRect
2022/11/17 15:22 · prokushev · 0 Comments