en:docs:fapi:dosreallochuge

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:dosreallochuge [2021/08/20 07:08] prokusheven:docs:fapi:dosreallochuge [2021/09/18 14:45] (current) prokushev
Line 5: Line 5:
 This call changes the size of memory originally allocated by DosAllocHuge. This call changes the size of memory originally allocated by DosAllocHuge.
  
-==Syntax== +===== Syntax ===== 
- DosReallocHuge (NumSeg, Size, Selector)+<code c> 
 +DosReallocHuge (NumSeg, Size, Selector) 
 +</code>
  
-==Parameters== +===== Parameters ===== 
-;NumSeg (USHORT) - input : Number of 65536 byte segments requested. + 
-;Size (USHORT) - input : Number of bytes requested in the last non-65536 byte segment. A value of 0 indicates none. +  NumSeg ([[USHORT]]) - input : Number of 65536 byte segments requested. 
-;Selector (SEL) - input : Selector returned on a previous DosAllocHuge.+  Size ([[USHORT]]) - input : Number of bytes requested in the last non-65536 byte segment. A value of 0 indicates none. 
 +  Selector ([[SEL]]) - input : Selector returned on a previous DosAllocHuge. 
 + 
 +===== Return Code ===== 
 + 
 +rc ([[USHOR]]T) - return
  
-==Return Code== 
- rc (USHORT) - return 
 Return code descriptions are: Return code descriptions are:
-* 0         NO_ERRORç 
-* 8         ERROR_NOT_ENOUGH_MEMORY 
-* 87        ERROR_INVALID_PARAMETER 
  
-==Remarks==+  * 0         NO_ERRORç 
 +  * 8         ERROR_NOT_ENOUGH_MEMORY 
 +  * 87        ERROR_INVALID_PARAMETER 
 + 
 +===== Remarks ===== 
 DosReallocHuge is called to change the size of unshared or shared huge memory allocated by DosAllocHuge. The selector used for this call must be the one returned by the DosAllocHuge request. DosReallocHuge is called to change the size of unshared or shared huge memory allocated by DosAllocHuge. The selector used for this call must be the one returned by the DosAllocHuge request.
  
Line 29: Line 36:
 '''Note:''' This request may be issued from privilege level 2 or 3. However, only a privilege level 3 huge segment is valid. '''Note:''' This request may be issued from privilege level 2 or 3. However, only a privilege level 3 huge segment is valid.
  
-===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 DosReallocHuge when coding for the DOS mode: Some options operate differently in the DOS mode than in the OS/2 mode. Therefore, the following restriction applies to DosReallocHuge when coding for the DOS mode:
  
 The requested Size value is rounded up to the next paragraph (16-byte).  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 47: Line 57:
  
 USHORT           rc;            /* return code */ USHORT           rc;            /* return code */
-</PRE>+</code> 
 + 
 +==== MASM Binding ====
  
-===MASM Binding=== +<code asm>
-<PRE>+
 EXTRN  DosReallocHuge:FAR EXTRN  DosReallocHuge:FAR
 INCL_DOSMEMMGR      EQU 1 INCL_DOSMEMMGR      EQU 1
Line 60: Line 71:
  
 Returns WORD Returns WORD
-</PRE>+</code>
  
  
  
-====== Note ======+===== Note =====
  
 Text based on [[http://www.edm2.com/index.php/DosReallocHuge]] Text based on [[http://www.edm2.com/index.php/DosReallocHuge]]