Talk:Control Program Functions: Difference between revisions
Appearance
Created page with "~~~~~ I'm still not sure to included this on the CPI page. Not sure if this is legacy that was depreciated. ===National Language Support=== This are from the NLS.DLL compone..." |
No edit summary |
||
Line 13: | Line 13: | ||
* [[OS2 API:CPI:Dos32SubFreeMem|Dos32SubFreeMem]] | * [[OS2 API:CPI:Dos32SubFreeMem|Dos32SubFreeMem]] | ||
* [[OS2 API:CPI:Dos32SubUnSetMem|Dos32SubUnSetMem]] | * [[OS2 API:CPI:Dos32SubUnSetMem|Dos32SubUnSetMem]] | ||
[[User:Martini|Martini]] ([[User talk:Martini|talk]]) 22:31, 8 June 2016 (CEST)I got this suggestion | |||
<Pre> | |||
Hi, | |||
Just a suggestion. When documenting APIs, I recommend you follow the lead | |||
of the IBM "Control Program Guide and Reference" and document the 32-bit | |||
APIs with the names that will be used by developers, not the internal | |||
names that you find in the DLLs. | |||
When IBM implemented the 32-bit version of OS/2, the 16-bit version | |||
already existed. To allow the APIs to co-exist, all the 32-bit versions, | |||
TTBOMK, include a 32 in the internal name (i.e. Dos32Open). The external | |||
name used by developers is still DosOpen and the linker takes care of | |||
translating DosOpen to Dos32Open. | |||
In most cases, the prototypes for the 32-bit and 16-bit versions of an API | |||
are identical. The sizes of the parameters might differ, but in many | |||
cases the compiler takes care of the messy details making sure that the | |||
passed parameters are the right size. In the cases where the parameters | |||
differ, you want to show both prototypes. | |||
Also, you will find that developers just starting on a new platform will | |||
need to learn the names of the .lib files needed to link their | |||
applications. The .dll name is typically not enough because many DLLs | |||
contain only ordinals and the LIB files define the API name to ordinal | |||
conversion. | |||
</PRE> |
Revision as of 22:31, 8 June 2016
17:04, 7 June 2016 (CEST) I'm still not sure to included this on the CPI page. Not sure if this is legacy that was depreciated.
National Language Support
This are from the NLS.DLL component
Memory Suballocation
Martini (talk) 22:31, 8 June 2016 (CEST)I got this suggestion
Hi, Just a suggestion. When documenting APIs, I recommend you follow the lead of the IBM "Control Program Guide and Reference" and document the 32-bit APIs with the names that will be used by developers, not the internal names that you find in the DLLs. When IBM implemented the 32-bit version of OS/2, the 16-bit version already existed. To allow the APIs to co-exist, all the 32-bit versions, TTBOMK, include a 32 in the internal name (i.e. Dos32Open). The external name used by developers is still DosOpen and the linker takes care of translating DosOpen to Dos32Open. In most cases, the prototypes for the 32-bit and 16-bit versions of an API are identical. The sizes of the parameters might differ, but in many cases the compiler takes care of the messy details making sure that the passed parameters are the right size. In the cases where the parameters differ, you want to show both prototypes. Also, you will find that developers just starting on a new platform will need to learn the names of the .lib files needed to link their applications. The .dll name is typically not enough because many DLLs contain only ordinals and the LIB files define the API name to ordinal conversion.