NWCCSetCurrentConnection

Sets the current connection ID and current connection for the thread group control structure

Local Servers:nonblocking
Local Servers:nonblocking
NetWare Server:4.x, 5.x, 6.x
Platform:NLM
Library:Cross-Platform Client (CLX*.*)
Service:Connection

Syntax

C

  #include <nwclxcon.h> 
   
  N_EXTERN_LIBRARY NWRCODE NWCCSetCurrentConnection  ( 
     CONN_HANDLE   connHandle);
  

Delphi

  uses clxwin32 
   
  Function NWCCSetCurrentConnection 
    (connHandle : CONN_HANDLE                           
  ) : NWRCODE;
  

Parameters

connHandle
(IN) Specifies the connection handle.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESS

0x890A

INVALID_CONNECTION

Remarks

NWCCSetCurrentConnection is similar to SetCurrentConnection, although NWCCSetCurrentConnection will accept a connection obtained through the CLX library.

If you open a connection by calling the NWCCOpenConnByName function, you can call NWCCSetCurrentConnection and pass the connection handle returned by the NWCCOpenConnByName function. The fopen function can then be called by specifying a file on the server for which a connection was recently opened. The connection opened by calling the NWCCOpenConnByName function will be used.

You can use the old CLIB connection model by calling NWCCSetCurrentConnection followed by calling the GetCurrentServerID and GetCurrentConnection functions.

NOTE:To bridge from a connection opened by an old NIT connection function such as the AttachToFileServer function, set your current server ID and pass in the connection allocated by the AttachToFileServer function as the connection handle parameter for any NWCalls function.

NOTE:If NWCCSetCurrentConnection is called from any platform other than NLM, SUCCESS will be returned but no action will be performed.

See Also

fopen(Single and Intra-File Services), NWCCOpenConnByName, SetCurrentConnection