# IeCreateDirectory

```
BOOL IeCreateDirectoryW(_In_ LPCWSTR lpPathName, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{
	typedef BOOL(WINAPI* IECREATEDIRECTORY)(LPCWSTR, LPSECURITY_ATTRIBUTES);
	IECREATEDIRECTORY IECreateDirectory = NULL;

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

	return IECreateDirectory(lpPathName, lpSecurityAttributes);
}

BOOL IeCreateDirectoryA(_In_ LPCSTR lpPathName, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes)
{
	typedef BOOL(WINAPI* IECREATEDIRECTORY)(LPCWSTR, LPSECURITY_ATTRIBUTES);
	IECREATEDIRECTORY IECreateDirectory = NULL;
	WCHAR ccBuffer[MAX_PATH * sizeof(WCHAR)] = { 0 };

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

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

	return IECreateDirectory(ccBuffer, lpSecurityAttributes);
}
```

