en:docs:fapi:dosreallocseg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:docs:fapi:dosreallocseg [2021/08/20 07:09] prokusheven:docs:fapi:dosreallocseg [2021/09/18 14:47] (current) prokushev
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 ====== 
- DosReallocSeg (Size, Selector)+<code c> 
 +DosReallocSeg (Size, Selector) 
 +</code>
  
-==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.+  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, see DosReallocHuge. To change the size of huge memory allocated by DosAllocHuge, see DosReallocHuge.
  
-===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           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE+</code
-===MASM Binding=== +===== MASM Binding ===== 
-<PRE>+ 
 +<code asm>
 EXTRN  DosReallocSeg:FAR EXTRN  DosReallocSeg:FAR
 INCL_DOSMEMMGR      EQU 1 INCL_DOSMEMMGR      EQU 1
Line 54: Line 65:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
  
  
-====== Note ======+===== Note =====
  
 Text based on [[http://www.edm2.com/index.php/DosReallocSeg]] Text based on [[http://www.edm2.com/index.php/DosReallocSeg]]