Obtains a resource list provided by the Resource Management Service (RMS), a network, or a local disk
#include <nwdp_res.h>
N_EXTERN_LIBRARY (nint) NWDPResListResource (
NWDPAccessorRef accessorRef,
NWDPResRef resRef,
NWDPResourceListTypeEnum resListType,
pnstr drivePathPtr,
nparam listInput,
NWDPResListCallback listCallback,
nparam callerDefinedParam);
(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 NWDPResListTypeEnum containing an enumeration of the resource type to list or specifies NWDPResListDrvFiles2 if set to NWDP_RES_LIST_PRN_DRV_FILES.
(IN) Points to a string containing the directory path of the new resource files (for example, A:\).
(IN) Specifies an input type based upon the resListType parameter value.
(IN) Specifies NWDPResListCallback receiving the list command results in formats based upon the value of the resListType parameter.
(IN) Specifies a user-defined parameter, containing application-specific data, that is passed to NWDPResListCallback.
If NWDPResListResourck is called to list resources on a diskette (such as information on a manufacturer-supplied printer driver diskette), the drivePathPtr parameter must point to a string containing the drive path. When listing printer drivers ( resListType contains NWDP_RES_LIST_PRN_DRV_TYPES), if the drivePathPtr contains a file path (for example, A:\oemsetup.inf) then only the printer types in the specified .INF file are listed.
When calling NWDPResListResource to list resources in the RMS data storage area, the drivePathPtr must be set to NULL.
For the resRef parameter, the following functions generate a resource reference:
The listInput parameter value is based on the following resListType parameter value:
resListType | listInput |
---|---|
NWDP_RES_LIST_PRN_DRV_TYPES |
NWDPResOsTypeEnum: NWDP_RES_OS_WIN_95 NWDP_RES_OS_WIN_NT |
NWDP_RES_LIST_PRN_DEF_TYPES |
Points to Unicode string (pnstr16) containing the name of a subdirectory in the printer definition section of the Resource Manager storage area. For example, when accessing the Novell printer definition files, the Unicode string "novell" is passed in the listInput parameter. This string is used to generate a path into the correct area for the files (for example, \NDPS\RESDIR\PRNDEF\NOVELL). |
NWDP_RES_LIST_BANNER_PAGE _FILES |
NWDPResBannerTypeEnum: NWDP_RES_BANNER_ALL NWDP_RES_BANNER_PCL NWDP_RES_BANNER_PS NWDP_RES_BANNER_TXT |
NWDP_RES_LIST_FONT_TYPES |
Points to the NWDPResListFontTypes structure |
NWDP_RES_LIST_PRN_DRV_FILES |
Points to the NWDPResListDrvFiles (obselete 9/98) structure |
NWDP_RES_LIST_PRN_DEF_FILE |
Points to the NWDPResListDefFiles structure |
NWDP_RES_LIST_FONT_FILES |
Points to the NWDPResListFontFiles structure |
The return data format is NWDPResListCallbackItem.
The callerDefinedParam parameter contains a list box handle in which data is inserted.
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 NWDPResListResource returns N_FAILURE, the NWDPLibErrorMac (accessorRef) contains the following: