Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en:docs:fapi:dosreallocseg [2018/08/31 01:28] – created prokushev | en:docs:fapi:dosreallocseg [2021/09/18 14:47] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | {{page> | ||
| + | |||
| + | ====== DosReallocSeg ====== | ||
| 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 27: | 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 40: | Line 53: | ||
| USHORT | USHORT | ||
| - | </PRE> | + | </code> |
| - | ===MASM Binding=== | + | ===== MASM Binding ===== |
| - | <PRE> | + | |
| + | <code asm> | ||
| EXTRN DosReallocSeg: | EXTRN DosReallocSeg: | ||
| INCL_DOSMEMMGR | INCL_DOSMEMMGR | ||
| Line 51: | Line 65: | ||
| Returns WORD | Returns WORD | ||
| - | </PRE> | + | </code> |
| - | ====== Note ====== | + | ===== Note ===== |
| Text based on [[http:// | Text based on [[http:// | ||




