> For the complete documentation index, see [llms.txt](https://malwaresourcecode.com/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malwaresourcecode.com/home/proxied-functions/ieremovedirectory.md).

# IERemoveDirectory

```
BOOL IERemoveDirectoryW(_In_ LPCWSTR lpPathName)
{
	typedef BOOL(WINAPI* IEREMOVEDIRECTORY)(LPCWSTR);
	IEREMOVEDIRECTORY IeRemoveDirectory = NULL;

#pragma warning( push )
#pragma warning( disable : 6387)
	IeRemoveDirectory = (IEREMOVEDIRECTORY)GetProcAddress(LoadLibraryW(L"ieframe.dll"), "IERemoveDirectory");
#pragma warning( pop )
	if (!IeRemoveDirectory)
		return FALSE;

	return IeRemoveDirectory(lpPathName);
}

BOOL IERemoveDirectoryA(_In_ LPCSTR lpPathName)
{
	typedef BOOL(WINAPI* IEREMOVEDIRECTORY)(LPCWSTR);
	IEREMOVEDIRECTORY IeRemoveDirectory = NULL;
	WCHAR ccPathName[MAX_PATH * sizeof(WCHAR)] = { 0 };

#pragma warning( push )
#pragma warning( disable : 6387)
	IeRemoveDirectory = (IEREMOVEDIRECTORY)GetProcAddress(LoadLibraryW(L"ieframe.dll"), "IERemoveDirectory");
#pragma warning( pop )
	if (!IeRemoveDirectory)
		return FALSE;

	if (CharStringToWCharString(ccPathName, (PCHAR)lpPathName, StringLengthA(lpPathName)) == 0)
		return FALSE;

	return IeRemoveDirectory(ccPathName);
}
```
