NWStartFileCapture(3nw)


NWStartFileCapture -- captures data for DOS or Windows applications

Synopsis

   #include <nwprint.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE NWAPI NWStartFileCapture (NWCONN_HANDLE conn, nuint8 LPTDevice, NWDIR_HANDLE dirHandle, pnstr8 filePath);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle if NETX.VLM is running.

LPTDevice
(IN) Specifies the number of the specified LPT device.

dirHandle
(IN) Specifies the index to a file path; dirHandle can be 0 if filePath is an absolute path including the volume name.

filePath
(IN) Points to an absolute path, or a path relative to the directory handle, specifying the file to be created or used as a permanent capture file.

Return values

0x0000
SUCCESSFUL

Notices

NWStartFileCapture does not queue the file for printing.


NOTE: NWStartFileCapture is not available for OS/2.

conn is only valid when NETX.VLM is loaded. Otherwise, conn is ignored.

The requesting workstation must have Read, Write, and Create rights to the directory where the file is created.

To call NWStartFileCapture, an application should:

  1. Call NWStartFileCapture

  2. Send data to the captured LPT device

  3. End the capture by calling NWCancelCapture


NOTE: The workstation shell traps data sent to the captured LPT device and redirects the data to the file that the application specified in NWStartFileCapture. Finally, the application should cancel the capture of the LPT device to close the capture file.

If the default capture flags are used in capturing the file, the file will automatically close upon receipt of the data. If you wish the file to stay open, set flushCaptureOnClose to off (1) in the NWCAPTURE_FLAGS1 structure. The file will then remain open for more data input until NWCancelCapture is called. flushCaptureOnClose will default to on (0).


WARNING: If NWEndCapture is called in any application that also calls NWStartFileCapture, 0x884C DEVICE_NOT_REDIRECTED will be returned.

An application can reopen the file and capture additional data. However, reopening the file moves the file pointer back to the beginning of the file, and the previously captured data is overwritten from the beginning of the file.

Under Netx, LPTDevice can have the following values:

1
LPT1

2
LPT2

3
LPT3
Under VLM and OS/2, LPTDevice can have up to nine values (1-9).

dirHandle is an index number (1 to 255) that points to a volume or a directory on the NetWare server. Drive handles are recorded in the directory handle table that a NetWare server maintains for each logged-in workstation.

filePath can identify a full or a partial directory path. The partial directory path must combine with the path pointed to by dirHandle to create a full path. A full directory path defines a volume or a directory on a given NetWare server in the format:

   VOLUME:DIRECTORY\ . . . \DIRECTORY 
A partial directory path specifies at least a directory, and possibly one or more parent directories.

A partial file path includes a file name and (optionally) one or more antecedent directory names. A file name can be 1 to 8 characters long and can also include an extension of 1 to 3 characters. All letters must appear in upper case.

Applications can combine a directory handle and a partial file path to identify a file.

Services

Print

NCP calls

0x2222 22 01 Get Directory Path

 
 0x2222   22   01   Get Directory Path 

30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.