Skip to content

Latest commit

 

History

History
190 lines (141 loc) · 5.65 KB

nf-winbase-removedirectorytransactedw.md

File metadata and controls

190 lines (141 loc) · 5.65 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:winbase.RemoveDirectoryTransactedW
RemoveDirectoryTransactedW function (winbase.h)
Deletes an existing empty directory as a transacted operation. (Unicode)
RemoveDirectoryTransacted
RemoveDirectoryTransacted function [Files]
RemoveDirectoryTransactedW
fs.removedirectorytransacted
winbase/RemoveDirectoryTransacted
winbase/RemoveDirectoryTransactedW
fs\removedirectorytransacted.htm
fs
e8600166-62dc-4398-9e16-43b07f7f0b89
12/05/2018
RemoveDirectoryTransacted, RemoveDirectoryTransacted function [Files], RemoveDirectoryTransactedA, RemoveDirectoryTransactedW, fs.removedirectorytransacted, winbase/RemoveDirectoryTransacted, winbase/RemoveDirectoryTransactedA, winbase/RemoveDirectoryTransactedW
winbase.h
Windows.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
RemoveDirectoryTransactedW (Unicode) and RemoveDirectoryTransactedA (ANSI)
Kernel32.lib
Kernel32.dll
Windows
19H1
RemoveDirectoryTransactedW
winbase/RemoveDirectoryTransactedW
c++
APIRef
kbSyntax
DllExport
Kernel32.dll
Ext-MS-Win-Kernel32-Transacted-l1-1-0.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-3.dll
Kernel32Legacy.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-4.dll
API-MS-Win-Core-Kernel32-Legacy-L1-1-5.dll
RemoveDirectoryTransacted
RemoveDirectoryTransactedA
RemoveDirectoryTransactedW

RemoveDirectoryTransactedW function

-description

[Microsoft strongly recommends developers utilize alternative means to achieve your application’s needs. Many scenarios that TxF was developed for can be achieved through simpler and more readily available techniques. Furthermore, TxF may not be available in future versions of Microsoft Windows. For more information, and alternatives to TxF, please see Alternatives to using Transactional NTFS.]

Deletes an existing empty directory as a transacted operation.

-parameters

-param lpPathName [in]

The path of the directory to be removed. The path must specify an empty directory, and the calling process must have delete access to the directory.

The directory must reside on the local computer; otherwise, the function fails and the last error code is set to ERROR_TRANSACTIONS_UNSUPPORTED_REMOTE.

By default, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, prepend "\\?\" to the path. For more information, see Naming Files, Paths, and Namespaces.

Tip

Starting with Windows 10, Version 1607, you can opt-in to remove the MAX_PATH limitation without prepending "\\?\". See the "Maximum Path Length Limitation" section of Naming Files, Paths, and Namespaces for details.

-param hTransaction [in]

A handle to the transaction. This handle is returned by the CreateTransaction function.

-returns

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

-remarks

The RemoveDirectoryTransacted function marks a directory for deletion on close. Therefore, the directory is not removed until the last handle to the directory is closed.

RemoveDirectory removes a directory junction, even if the contents of the target are not empty; the function removes directory junctions regardless of the state of the target object.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

Technology Supported
Server Message Block (SMB) 3.0 protocol No
SMB 3.0 Transparent Failover (TFO) No
SMB 3.0 with Scale-out File Shares (SO) No
Cluster Shared Volume File System (CsvFS) No
Resilient File System (ReFS) No
 

SMB 3.0 does not support TxF .

Note

The winbase.h header defines RemoveDirectoryTransacted as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

CreateDirectoryTransacted

Creating and Deleting Directories

Directory Management Functions

Transactional NTFS