NW_NS_OPENCREATE

Defines the parameters for opening/creating a data stream in a specified name space

Service:Name Space
Defined In:nwnamspc.h

Structure

   typedef struct 
   { 
      nuint8    openCreateMode ; 
      nuint16   searchAttributes ; 
      nuint32   reserved ; 
      nuint32   createAttributes ; 
      nuint16   accessRights ; 
      nuint32   NetWareHandle ; 
      nuint8    openCreateAction ; 
   } NW_NS_OPENCREATE
   

Delphi Structure

   uses calwin32 
    
   NW_NS_OPENCREATE = packed Record 
      openCreateMode : nuint8; 
      searchAttributes : nuint16; 
      reserved : nuint32; 
      createAttributes : nuint32;
      accessRights : nuint16;
      NetWareHandle : nuint32; 
      openCreateAction : nuint8 
   End;
   

Fields

openCreateMode

Specifies whether to create, replace, or open an entry (directories can only be created). Open/Create modes use the OC_MODE_ constants listed below:

C Value

Delphi Value

Value Name

0x01

$01

OC_MODE_OPEN

0x02

$02

OC_MODE_TRUNCATE

0x02

$02

OC_MODE_REPLACE

0x08

$08

OC_MODE_CREATE

searchAttributes

Specifies the attributes to use in the search (see Section 20.8, Search Attributes Values).

reserved

Is reserved for future use.

createAttributes

Specifies the attributes to set in the DOS name space (see Section 20.2, Attribute Values).

accessRights

Specifies the desired access rights (see Section 20.1, Access Right Values).

NWHandle

Specifies a four-byte NetWare handle.

openCreateAction

Specifies the result of a successful open/create. Uses the OC_ACTION_ constants listed below:

C Value

Delphi Value

Value Name

0x01

$01

OC_ACTION_NONE

0x01

$01

OC_ACTION_OPEN

0x02

$02

OC_ACTION_CREATE

0x04

$04

OC_ACTION_TRUNCATE

0x04

$04

OC_ACTION_REPLACE

Remarks

To create a file, the accessRights field is used as an access rights mask and must be set to AR_READ and/or AR_WRITE. If neither are used, the NW_NS_OPENCREATE structure sets both. Use the AR constants listed below:

To create a directory, the accessRights field is used as an inherited rights mask and has the following bits:

0

Read Existing File Bit

1

Write Existing File Bit

2

Old Open Existing File Bit

3

Create New Entry Bit

4

Delete Existing Bit

5

Change Access Control Bit

6

See Files Bit

7

Modify Entry Bit

8

Supervisor Privileges Bit

9-15

not set