NWPSPdfReadModeFunction(3nw)


NWPSPdfReadModeFunction -- reads function strings associated with mode

Synopsis

   #include <nwps_pdf.h> 
   or 
   #include <nwpsrv.h> 
   

NWCCODE NWAPI NWPSPdfReadModeFunction (WORD connType, DWORD connID, char NWFAR *deviceName, char NWFAR *modeName, WORD funcOffset, WORD NWFAR *funcSize, BYTE NWFAR *funcString);

Description

The parameters are as follows:

connType
(IN) Specifies either NWPS_BINDERY_SERVICE, NWPS_BINDERY_SERVICE_PRE_40, or NWPS_DIRECTORY_SERVICE.

connID
(IN) Specifies the connection or context identifier.

deviceName
(IN) Points to the associated device name.

modeName
(IN) Points to the mode name.

funcOffset
(IN) Specifies the number of bytes to skip.

funcSize
(IN/OUT) Points to the buffer size of funcString upon input. Points to the actual number of bytes read upon output.

funcString
(OUT) Points to the buffer where the string is stored.

Return values

0x0000
Successful

-1
General Error

other values
Bindery or Directory Services Errors

Notices

On the first call,funcOffset should be set to zero; and funcSize should be set to the size of the buffer pointed to by funcString. On return, funcSize contains the actual number of bytes copied to funcString. A zero is returned if there is any data after the specified funcOffset (start point).

If funcSize's return value is less than the requested funcSize, there are no more bytes to get. If a call is made with funcOffset equal to or greater than the end of the list, an error code is returned.

Since the mode string can be up to 64K bytes, it is possible to read in segments. To read a segment, set funcOffset to the starting byte offset and set funcSize to the size of the funcString buffer.

If NWPSPdfReadModeFunction fails or runs out of memory, -1 is returned.

Services

Print Server

References

NWPSPdfAddModeFunction(3nw), NWPSPdfDeleteModeFunction(3nw), NWCCOpenConnByName(3nw), NWDSCreateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.