NWPSPdfManagedImportDevice(3nw)


NWPSPdfManagedImportDevice -- reports progress of import process by calling designated function

Synopsis

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

NWCCODE NWAPI NWPSPdfManagedImportDevice (WORD connType, DWORD connID, char NWPTR fileName, char NWPTR deviceName, NWPSImportManager importManagerFunc, void NWPTR importManagerParm1);

Description

The parameters are as follows:

connType
(IN) Specifies the type of server/network: NWPS_DIRECTORY_SERVICE, NWPS_BINDERY_SERVICE, or NWPS_BINDERY_SERVICE_PRE_40.

connID
(IN) Specifies the NetWare server connection ID.

fileName
(IN) Points to the name of the .PDF file.

deviceName
(IN/OUT) Points to the new device name or NULL. Its maximum length is NWPS_DEVI_NAME_SIZE + 1.

im
(IN) Specifies the manager function.

importManagerParm1
(IN) Points to the user's manager context variable.

Return values

0x0000
Successful

-1
General Error

other
Bindery or Directory Services Errors

Notices

NWPSPdfManagedImportDevice is an enhancement to NWPSPdfImportDevice, and is designed to report progress of the import process by calling a function designated by importManagerFunc.

Setting importManagerFunc and importManagerParm1 to NULL is the equivalent to calling NWPSPdfImportDevice.

During the import process, importManagerFunc is called repeatedly to indicate the number of total calls that will be made and the current call number. The typedef shown below describes the function whose address is passed in importManagerFunc. This typedef is for the managed import device calls.

   typedef NWCCODE (NWAPI *NWPSImportManager) 
      (void NWFAR   *importManagerParm1, 
      int            totalCallsToBeMade, 
      int            currentCallCount); 

importManagerParm1
(IN) User-specific data.

totalCallsToBeMade
(IN) Maximum number of calls to be made.

currentCallCount
(IN) Number of this function.
importManagerParm1 is intended to give context to the caller's import manager. totalCallsToBeMade and currentCallCount are for reporting progress. For example, percent complete could be calculated as follows:
   percentDone = 100 * currentCallCount/totalCallsToBeMade 
If the return code is non-zero, the import aborts, and the device remnants are deleted. This could be useful in implementing a cancel feature, which is done by checking, for example, a hotkey or mouse button for interruptions. However, when totalCallsToBeMade and currentCallCount are equal, the return code is ignored. This is the caller's opportunity to do screen cleanup, etc.

Services

Print Server

NCP calls

None

References

NWPSPdfImportDevice(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.