Jump to content

RMCreateSysName: Difference between revisions

From EDM2
Created page with "This rmcall service obtains a system name handle and allows a driver to register a system name with the Resource Manager and associate it with a logical device. A system-name ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This rmcall service obtains a system name handle and allows a driver to register a system name with the Resource Manager and associate it with a logical device. A system-name handle (HSYSNAME) is returned by this service to identify the system name.
This rmcall service obtains a system name handle and allows a driver to register a system name with the Resource Manager and associate it with a logical device. A system-name handle (HSYSNAME) is returned by this service to identify the system name.


Information about the system name being registered is passed in a SYSNAMESTRUCT.  
Information about the system name being registered is passed in a SYSNAMESTRUCT.


==Syntax==
==Syntax==
  RMCreateSysName(hDriver, hSysName, hLDevParent, SysNameStruct);
  RMCreateSysName(hDriver, hSysName, hLDevParent, SysNameStruct)
   
   
==Parameters==
==Parameters==
; hDriver (HDRIVER) - input : Driver handle of the device driver creating this adapter.  
;hDriver (HDRIVER) - input : Driver handle of the device driver creating this adapter.
 
;hSysName (PSYSNAME) - output : Pointer to variable to receive the returned system-name handle.
; hSysName (PSYSNAME) - output : Pointer to variable to receive the returned system-name handle.  
;hLDevParent (HLDEV) - input : Handle of the logical device with which the system name is associated, such as the parent of the system name.
 
;SysNameStruct (PSYSNAMESTRUCT) - output : Pointer to the SYSNAMESTRUCT structure.
; hLDevParent (HLDEV) - input : Handle of the logical device with which the system name is associated, such as the parent of the system name.  
 
; SysNameStruct (PSYSNAMESTRUCT) - output : Pointer to the SYSNAMESTRUCT structure.


==Return Code==
==Return Code==
; rc (APIRET) - returns
; rc (APIRET) - returns
 
; RMRC_IRQ_ENTRY_ILLEGAL : A Resource Manager service was issued at interrupt time. The Resource Manager service request can be issued only at task time or INIT time.
 
; RMRC_BAD_DRIVERHANDLE : The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.
 
; RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.
; RMRC_BAD_DEVICEHANDLE : The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.


; RMRC_IRQ_ENTRY_ILLEGAL : A Resource Manager service was issued at interrupt time. The Resource Manager service request can be issued only at task time or INIT time.
; RMRC_BAD_DRIVERHANDLE : The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.
; RMRC_NULL_POINTER : A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.
; RMRC_BAD_DEVICEHANDLE : The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.
; RMRC_OUT_OF_MEMORY : The Resource Manager is out of memory.
; RMRC_OUT_OF_MEMORY : The Resource Manager is out of memory.


==Remarks==
==Remarks==
None.  
None.


==Example Code==
==Example Code==
Line 42: Line 36:
APIRET            rc;
APIRET            rc;


rc = RMCreateSysName(hDriver, hSysName, hLDevParent,
rc = RMCreateSysName(hDriver, hSysName, hLDevParent, SysNameStruct);
      SysNameStruct);
</PRE>
</PRE>


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

Latest revision as of 13:03, 3 April 2025

This rmcall service obtains a system name handle and allows a driver to register a system name with the Resource Manager and associate it with a logical device. A system-name handle (HSYSNAME) is returned by this service to identify the system name.

Information about the system name being registered is passed in a SYSNAMESTRUCT.

Syntax

RMCreateSysName(hDriver, hSysName, hLDevParent, SysNameStruct)

Parameters

hDriver (HDRIVER) - input
Driver handle of the device driver creating this adapter.
hSysName (PSYSNAME) - output
Pointer to variable to receive the returned system-name handle.
hLDevParent (HLDEV) - input
Handle of the logical device with which the system name is associated, such as the parent of the system name.
SysNameStruct (PSYSNAMESTRUCT) - output
Pointer to the SYSNAMESTRUCT structure.

Return Code

rc (APIRET) - returns
RMRC_IRQ_ENTRY_ILLEGAL
A Resource Manager service was issued at interrupt time. The Resource Manager service request can be issued only at task time or INIT time.
RMRC_BAD_DRIVERHANDLE
The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.
RMRC_NULL_POINTER
A Resource Manager service received a NULL value for a pointer that was expected to contain a valid 16:16 address.
RMRC_BAD_DEVICEHANDLE
The expected Resource Manager handles were not provided because the handle was not a valid Resource Manager handle or the handle did not point to the type of object the service required.
RMRC_OUT_OF_MEMORY
The Resource Manager is out of memory.

Remarks

None.

Example Code

C

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

HDRIVER           hDriver;
PSYSNAME          hSysName;
HLDEV             hLDevParent;
PSYSNAMESTRUCT    SysNameStruct;
APIRET            rc;

rc = RMCreateSysName(hDriver, hSysName, hLDevParent, SysNameStruct);