NWCCSetCurrentConnection
Sets the current connection ID and current connection for the thread group control structure
#include <nwclxcon.h>
N_EXTERN_LIBRARY NWRCODE NWCCSetCurrentConnection (
CONN_HANDLE connHandle);
uses clxwin32
Function NWCCSetCurrentConnection
(connHandle : CONN_HANDLE
) : NWRCODE;
These are common return values; see Return Values (Return Values for C) for more information.
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.
fopen(Single and Intra-File Services), NWCCOpenConnByName, SetCurrentConnection