NWDPResGetResourceFile

Obtains a file from the Resource Management Service (RMS) data area or from a local disk

Local Servers: blocking
Remote Servers: blocking
NetWare Server: 4.11, 5.x
Platform: NLM, Windows 95, Windows 98
Service: Distributed Print


Syntax

#include <nwdp_res.h>  

N_EXTERN_LIBRARY (nint) NWDPResGetResourceFile (
NWDPAccessorRef accessorRef,
NWDPResRef resRef,
NWDPResourceTypeEnum resType,
pnstr localSrcDirPtr,
pnstr localDestDirPtr,
nparam getInput,
time_t *fileTimePtr);


Parameters

accessorRef

(IN) Specifies the NWDPAccessorData structure whose fields are accessed by using the provided error macros.


resRef

(IN) Specifies the reference to the resource manager.


resType

(IN) Specifies the resource type (NWDPResGetPrnDrvFile if equal to NWDP_RES_PRN_DRV).


localSrcDirPtr

(IN) Points to a string containing the directory path of the new resource files or resource index files (for example, A:\).


localDestDirPtr

(IN) Points to a string containing the directory path of the resource file (for example, C:\WINDOWS\SYSTEM).


getInput

(IN) Specifies the input type based on the value of the resType parameter.


fileTimePtr

(OUT) Points to the number of seconds elapsed since 1970 for the current time stamp of the file (in hexadecimal format).


Return Values

0x00000000

N_SUCCESS

0xFFFFFFFE

NWDP_RC_INVALID_ACCESSOR

0xFFFFFFFF

N_FAILURE


Remarks

For the resRef parameter, the following functions generate a resource reference:

NWDPResCreateRefBasedOnAddr
NWDPResCreateRefBasedOnFQN
NWDPResCreateRefBasedOnSrsSAP

For the resType parameter, the resource types include the following:

NWDP_RES_PRN_DRV
NWDP_RES_PRN_DEF
NWDP_RES_BANNER_PAGE
NWDP_RES_FONT

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:

0x01000004L NWDP_EC_STDIO
0x01100001L NWDP_EC_RESMAN_RESULT


See Also

NWDPResCreateRefBasedOnAddr
NWDPResCreateRefBasedOnFQN
NWDPResCreateRefBasedOnSrsSAP
NWDPResListResource