Obtains a file from the Resource Management Service (RMS) data area or from a local disk
#include <nwdp_res.h>
N_EXTERN_LIBRARY (nint) NWDPResGetResourceFile (
NWDPAccessorRef accessorRef,
NWDPResRef resRef,
NWDPResourceTypeEnum resType,
pnstr localSrcDirPtr,
pnstr localDestDirPtr,
nparam getInput,
time_t *fileTimePtr);
(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 (NWDPResGetPrnDrvFile if equal to NWDP_RES_PRN_DRV).
(IN) Points to a string containing the directory path of the new resource files or resource index files (for example, A:\).
(IN) Points to a string containing the directory path of the resource file (for example, C:\WINDOWS\SYSTEM).
(IN) Specifies the input type based on the value of the resType parameter.
(OUT) Points to the number of seconds elapsed since 1970 for the current time stamp of the file (in hexadecimal format).
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:
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.
The getInput parameter value is based on the following resType parameter value:
resType | getInput |
---|---|
NWDP_RES_PRN_DRV |
Points to NWDPResGetPrnDrvFile structure |
NWDP_RES_PRN_DEF |
Points to NWDPResGetPrnDefFile structure |
NWDP_RES_BANNER_PAGE |
Points to Unicode string (pnstr16) containing banner page filename |
NWDP_RES_FONT |
Points to NWDPResGetFontFile structure |
If NWDPResGetResourceFile returns N_FAILURE, the NWDPLibErrorMac (accessorRef) contains the following: