Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:docs:fapi:dosreallocseg [2020/12/05 10:44] – prokushev | en:docs:fapi:dosreallocseg [2021/09/18 14:47] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{logos:os2.gif? | + | {{page>en:templates:fapiint}} |
====== DosReallocSeg ====== | ====== DosReallocSeg ====== | ||
Line 5: | Line 5: | ||
This call reallocates a segment after discard or changes the size of a segment already allocated. | This call reallocates a segment after discard or changes the size of a segment already allocated. | ||
- | ==Syntax== | + | ====== Syntax |
- | | + | <code c> |
+ | DosReallocSeg (Size, Selector) | ||
+ | </ | ||
- | ==Parameters== | + | ====== Parameters ====== |
- | ;Size (USHORT) - input : New requested segment size (in bytes). A value of 0 indicates 65536 bytes. | + | |
- | ;Selector (SEL) - input : Segment to be resized. | + | |
+ | | ||
+ | |||
+ | ====== Return Code ====== | ||
+ | |||
+ | rc ([[USHORT]]) - return | ||
- | ==Return Code== | ||
- | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
- | * 0 NO_ERROR | ||
- | * 5 ERROR_ACCESS_DENIED | ||
- | * 8 ERROR_NOT_ENOUGH_MEMORY | ||
- | ==Remarks== | + | * 0 NO_ERROR |
+ | * 5 ERROR_ACCESS_DENIED | ||
+ | * 8 ERROR_NOT_ENOUGH_MEMORY | ||
+ | |||
+ | ====== Remarks ====== | ||
DosReallocSeg is called to change the size of an unshared or shared segment allocated with a [[DosAllocSeg]] request. | DosReallocSeg is called to change the size of an unshared or shared segment allocated with a [[DosAllocSeg]] request. | ||
Line 30: | Line 37: | ||
To change the size of huge memory allocated by DosAllocHuge, | To change the size of huge memory allocated by DosAllocHuge, | ||
- | ===Family API Considerations=== | + | ===== Family API Considerations ===== |
Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosReallocSeg when coding for the DOS mode. The requested Size value is rounded up to the next paragraph (16-byte). | Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosReallocSeg when coding for the DOS mode. The requested Size value is rounded up to the next paragraph (16-byte). | ||
- | ==Example Code== | + | ====== Bindings ====== |
- | === C Binding=== | + | |
- | <PRE> | + | ===== C Binding ===== |
+ | |||
+ | <code c> | ||
#define INCL_DOSMEMMGR | #define INCL_DOSMEMMGR | ||
Line 43: | Line 53: | ||
USHORT | USHORT | ||
- | </PRE> | + | </code> |
- | ===MASM Binding=== | + | ===== MASM Binding ===== |
- | <PRE> | + | |
+ | <code asm> | ||
EXTRN DosReallocSeg: | EXTRN DosReallocSeg: | ||
INCL_DOSMEMMGR | INCL_DOSMEMMGR | ||
Line 54: | Line 65: | ||
Returns WORD | Returns WORD | ||
- | </PRE> | + | </code> |
- | ====== Note ====== | + | ===== Note ===== |
Text based on [[http:// | Text based on [[http:// |