Jump to content

RMGetVersion: Difference between revisions

From EDM2
Created page with "This rminfo service gets the next boot and default snoop level for the system. RMSaveDetectedData must save the previous.dat file before the snoop levels can be returned. ==..."
 
No edit summary
 
Line 1: Line 1:
This rminfo service gets the next boot and default snoop level for the system. RMSaveDetectedData must save the previous.dat file before the snoop levels can be returned.  
This service is supported by rmcalls.lib. It returns the major and minor version of the Resource Manager.  


==Syntax==
==Syntax==
  RMGetSnoopLevel(SnoopLevel, SnoopFlags);
  RMGetVersion(pMajorVersion, pMinorVersion);
==Parameters==
==Parameters==
; SnoopLevel (USHORT) - input : Indicates the snoop level.
; pMajorVersion (PUSHORT) - output : The major version of Resource Manager.  
 
    SNP_NO_RISK
    SNP_LOW_RISK
    SNP_MEDIUM_RISK
    SNP_HIGH_RISK
    SNP_WARP_RISK
 
; SnoopFlags (USHORT) - input : Indicates how to use the snoop level.
 
:;SNP_FLG_DEFAULT : Sets snoop level to default.
:;SNP_FLG_NEXTBOOT : Sets snoop level for next boot only.


; pMinorVersion (PUSHORT) - output : The minor version of Resource Manager.
==Return Code==
==Return Code==
; rc (APIRET) - returns : On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.  
; rc (APIRET) - returns : On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.


Other possible return values follow:
    RMRC_BAD_FLAGS
    RMRC_NO_DETECTED_DATA
     RMRC_SUCCESS
     RMRC_SUCCESS
    RMRC_NULL_POINTER


==Remarks==
==Remarks==
If both SnoopFlags are set, the default level and the next boot level values are reset in the previous.dat file.  
None.  


==Example Code==
==Example Code==
Line 34: Line 22:
#include <rmcalls.h>
#include <rmcalls.h>


USHORT   SnoopLevel;
PUSHORT   pMajorVersion; /*  The major version of Resource Manager. */
USHORT   SnoopFlags;
PUSHORT   pMinorVersion; /*  The minor version of Resource Manager. */
APIRET   rc;
APIRET     rc;


rc = RMGetSnoopLevel(SnoopLevel, SnoopFlags);
rc = RMGetVersion(pMajorVersion, pMinorVersion);
</PRE>
</PRE>


[[Category:DevHlps]]
[[Category:DevHlps]]

Latest revision as of 18:37, 3 August 2018

This service is supported by rmcalls.lib. It returns the major and minor version of the Resource Manager.

Syntax

RMGetVersion(pMajorVersion, pMinorVersion);

Parameters

pMajorVersion (PUSHORT) - output
The major version of Resource Manager.
pMinorVersion (PUSHORT) - output
The minor version of Resource Manager.

Return Code

rc (APIRET) - returns
On systems where the Resource Manager driver is not installed, the library interface code will return RMRC_NOT_INSTALLED.
   RMRC_SUCCESS
   RMRC_NULL_POINTER

Remarks

None.

Example Code

C

#include <os2.h>
#include <rmcalls.h>

PUSHORT    pMajorVersion;  /*  The major version of Resource Manager. */
PUSHORT    pMinorVersion;  /*  The minor version of Resource Manager. */
APIRET     rc;

rc = RMGetVersion(pMajorVersion, pMinorVersion);