The IResourceId class binds a numeric resource identifier with an IResourceLibrary object used to load the resource. Typically, you do not specify the resource library so that the IResourceId object binds to the user resource library it obtains by calling IApplication::current().userResourceLibrary. Classes in the Open Class Library that load a resource typically accept an IResourceId as input to describe the resources.
Constructors & DestructorYou can construct, copy, and destruct objects of this class. You cannot assign objects of this class because its assignment operator is private. You can construct objects of this class by providing a resource identifier, a resource identifier and a reference to an IResourceLibrary, or a resource identifier and a reference to an IDynamicLinkLibrary. You can also construct or initialize an object of this class from another IResourceId object.
![]() |
Constructs an IResourceId object.
public:
IResourceId(const IResourceId& resourceId)
Creates an IResourceId object using a reference to an existing IResourceId. This is commonly known as a copy constructor.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IResourceId(unsigned long resourceId)
Identifies a resource in the default library for application-supplied resources. The constructor uses the resource library returned by a call to ICurrentApplication::userResourceLibrary.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
public:
IResourceId( unsigned long resourceId, const IResourceLibrary& resourceLibrary )
Creates an IResourceId object that binds the resource identifier with a reference to an IResourceLibrary. Use this ctor if the resource library is not the one returned by ICurrentApplication::userResourceLibrary.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
DiagnosticsUse these members for diagnostic purposes. They return an IString representation of an object of this class.
![]() |
public:
IString asDebugInfo() const
Provides debugging information about the class object. It returns a string that contains the resource identifier as well as the results of a call to IResourceLibrary::asDebugInfo for its resource library.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
IString asString() const
Provides textual information about the class object. It returns the resource identifier.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
ResourcesUse these members to get the resource identifier or a reference to the resource library object for this class.
![]() |
public:
unsigned long id() const
Returns the identifier used for the resource.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
operator unsigned long() const
Returns the identifier used for the resource. Using this operator is the same as calling IResourceId::id.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |
![]() |
public:
const IResourceLibrary& resourceLibrary() const
Returns a const reference to the resource library.
| Windows | OS/2 | AIX |
| Yes | Yes | Yes |