Adds a resource file to the Resource Management Service (RMS) data area
#include <nwdp_res.h>
N_EXTERN_LIBRARY (nint) NWDPResAddResourceFile2 (
NWDPAccessorRef accessorRef,
NWDPResRef resRef,
NWDPResourceTypeEnum resType,
pnstr localDirPtr,
nparam addInput
pnstr optionalAnotationStrPtr);
(IN) Specifies the NWDPAccessorData structure whose fields are accessed by using the provided error macros.
(IN) Specifies the reference to the resource manager.
(IN) Specifies the resource type.
(IN) Points to a string containing the directory path of the new resource files or resource index files (for example, A:\).
(IN) Specifies the type of input to add, based on the resType parameter value.
(IN) Specifies the string to be added to the names of all drivers which can be installed using the specified .INF file.
0x00000000 |
N_SUCCESS |
0xFFFFFFFE |
NWDP_RC_INVALID_ACCESSOR |
0xFFFFFFFF |
N_FAILURE |
For the resRef parameter, the following functions generate a resource reference:
For the resType parameter, the resource types include the following:
The addInput parameter value is based on the following resType parameter value:
| resType | addInput |
|---|---|
NWDP_RES_PRN_DRV |
Points to the NWDPResAddPrnDrvFile structure |
NWDP_RES_PRN_DEF |
Points to the NWDPResAddPrnDefFile structure |
NWDP_RES_BANNER_PAGE |
Points to Unicode string (pnstr16) containing a banner page filename |
NWDP_RES_FONT |
Points to the NWDPResAddFontFile structure |
If the value of the resType parameter is NWDP_RES_PRN_DRV or NWDP_RES_PRN_DEF and the filename in the respective addInput parameter is an index filename (*.inf or *.ndx), call NWDPResAddResourceFile2 to have all files referred to in the index file automatically added to the RMS data area.
When calling NWDPResAddResourceFile2 to add individual printer driver files to the RMS data area, the driver directory name variable in the NWDPResAddPrnDrvFile structure must contain the "new" Unicode string. The first call to the session creates a new directory. Subsequent calls to NWDPResAddResourceFile2 add files to this directory. The session is completed when the driver index file (.inf) is finally added.
If the accessorRef parameter returns NWDP_EC_RESMAN_RESULT, the otherError field in the accessorRef parameter contains an error code from the Resource Manager. This error code correlates to the enumeration values found in the nwdp_err.h file.
If NWDPResAddResourceFile2 returns N_FAILURE, the NWDPLibErrorMac (accessorRef) contains the following: