Platform SDK: Removable Storage Manager

CloseNtmsSession

The CloseNtmsSession function closes the specified RSM session.

DWORD WINAPI CloseNtmsSession(
  HANDLE hSession
);

Parameters

hSession
Handle to the session returned by the OpenNtmsSession function.

Return Values

Value Meaning
ERROR_CONNECTION_UNAVAIL Connection to the RSM server or domain is not available.
ERROR_INVALID_HANDLE The value specified in the hSession parameter is invalid or NULL.

Remarks

The CloseNtmsSession function releases all resources. Use of a closed session handle returns an error code.

If a call to the CloseNtmsSession function occurs while an application has an outstanding synchronous request (for example, a mount or dismount request), the request is unwound and canceled.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntmsapi.h.
  Library: Use Ntmsapi.lib.

See Also

Session Management Functions, OpenNtmsSession