NWDSCreateContext(3nw)
NWDSCreateContext --
creates Directory context for client operations and initializes to default configuration
Synopsis
#include <nwnet.h>
or
#include <nwdsdc.h>
NWDSContextHandle N_API NWDSCreateContext
(void);
Return Values
- 0x0000 or higher
-
A handle to a newly-created context.
- 0xFEB8
-
ERR_CONTEXT_CREATION
Remarks
The maximum number of contexts that an application can create depends
upon the application's platform. The maximum number of contexts is 8 for
DOS, 24 for Windows, and 24 for OS/2. The maximum
contexts for NLM applications is limited only by the available
memory on the server.
If successful, NWDSCreateContext returns a handle for the
newly-created context. The range of values for this handle is from 0 to
the platfom's limit, minus one. For example, the range for DOS
is 0 to 7.
NWDSCreateContext can fail for the following reasons:
-
insufficient memory to create the context
-
maximum number of contexts exhausted (such as 8 for DOS)
-
Unicode tables were not initialized (see
NWInitUnicodeTables(3nw)).
The following list shows the default values set when a Directory context
is created:
-
The flags in the context variable associated with DCK_FLAGS
are set as follows:
-
The flag associated with DCV_ASYNC_MODE is set off. (It is
reserved.)
-
The flag associates with DCV_CANONICALIZE_NAME is set on.
-
The flag associated with DCV_DEREF_ALIASES is set on.
-
The flag associated with DCV_TYPELESS_NAMES is set off.
-
The flag associated with DCV_XLATE_STRINGS is set on.
-
The flag associated with DCV_DEREF_BASE_CLASS is set off.
-
The flag associated with DCV_DISALLOW_REFERRALS is set off.
-
The context variable associated with DCK_CONFIDENCE is set to
DCV_LOW_CONF.
-
The context variable associated with DCK_NAME_CONTEXT is set to
the current global name context which is obtained from NET.CFG
for workstations, and from the Bindery emulation context setting for
NLM applications. (Changing the setting of the name context
does not change the value in the NET.CFG file for workstations
or the value of the Bindery emulation context on servers.)
-
The context variable associated with DCK_TRANSPORT_TYPE is
set to NT_IPX. For now this field is reserved.
-
The context variable associated with DCK_REFERRAL_SCOPE is set
to DCV_ANY_SCOPE.
-
The context variable associated with DCK_LAST_CONNECTION is
initially cleared. It is then set to the connection handle of the last
server to which the library sent a request.
-
The context variable associated with DCK_TREE_NAME is set to
the name of the tree in the current context.
The structure of the Directory context is not available for the developer
to manipulate directly. Instead, Directory context variables are modified
by calling NWDSSetContext. The current values of Directory
context variables are retrieved by calling NWDSGetContext.
Services
Directory
NCP Calls
None
References
NWDSCreateContextHandle(3nw),
NWDSFreeContext(3nw),
NWDSSetContext(3nw),
NWDSGetContext(3nw),
NWDSDuplicateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.