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 GLOBALALLOC 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 GETMODULEFILENAME 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 FINDRESOURCE 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 manager GETVERSION GETMODULEHANDLE GETMODULEUSAGE GETMODULEFILENAME GETPROCADDRESS MAKEPROCINSTANCE FREEPROCINSTANCE GETINSTANCEDATA CATCH THROW GETCODEHANDLE LOADLIBRARY
Memory Manager GlobalAlloc GlobalCompact GlobalDiscard GlobalFree GlobalLock GlobalReAlloc GlobalSize GlobalUnlock GlobalFlags LocalAlloc LocalCompact LocalDiscard LocalFree LocalLock LocalFreeze LocalMelt LocalReAlloc LocalSize LocalUnlock LocalHandleDelta LockData UnlockData LocalFlags
Task Scheduler GetCurrentTask Yield SetPriority
Resource Manager AddFontResource RemoveFontResource LoadBitmap LoadCursor LoadIcon LoadMenu LoadString LoadAccelerators FindResource LoadResource AllocResource LockResource FreeResource AccessResource SizeofResource SetResourceHandler
String Translation AnsiUpper AnsiLower AnsiNext AnsiPrev
Atom Manager InitAtomTable AddAtom DeleteAtom FindAtom GetAtomName
Windows Initialization File GetProfileInt GetProfileString WriteProfileString
Debugging FatalExit
File I/O OpenFile GetTempFileName GetTempDrive
Registry RegOpenKey RegCreateKey RegCloseKey RegDeleteKey RegSetValue RegQueryValue RegEnumKey
2022/11/17 15:22 · prokushev · 0 Comments