NWDPResAddResourceFile2

Adds a resource file to the Resource Management Service (RMS) data area

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


Syntax

#include <nwdp_res.h>  

N_EXTERN_LIBRARY (nint) NWDPResAddResourceFile2 (
NWDPAccessorRef accessorRef,
NWDPResRef resRef,
NWDPResourceTypeEnum resType,
pnstr localDirPtr,
nparam addInput
pnstr optionalAnotationStrPtr);


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.


localDirPtr

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


addInput

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


optionalAnotationStrPtr

(IN) Specifies the string to be added to the names of all drivers which can be installed using the specified .INF file.


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

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:

0x01000004L NWDP_EC_STDIO
0x01100001L NWDP_EC_RESMAN_RESULT


See Also

NWDPResCreateRefBasedOnAddr
NWDPResCreateRefBasedOnFQN
NWDPResCreateRefBasedOnSrsSAP