Share via


CloseNtmsSession Function

[Removable Storage Manager is no longer available as of Windows 7 and Windows Server 2008 R2.]

The CloseNtmsSession function closes the specified RSM session.

Syntax

DWORD CloseNtmsSession(
  __in  HANDLE hSession
);

Parameters

  • hSession [in]
    Handle to the session returned by the OpenNtmsSession function.

Return Value

This function returns one of the following 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 NULL or is not a valid session handle.

 

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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Ntmsapi.h

Library

Ntmsapi.lib

DLL

Ntmsapi.dll

See Also

Session Management Functions

OpenNtmsSession

 

 

Send comments about this topic to Microsoft

Build date: 6/9/2011