📄 freeotfe4pdaguilib.c
字号:
// Description:
// By Sarah Dean
// Email: sdean12@sdean12.org
// WWW: http://www.FreeOTFE.org/
//
// -----------------------------------------------------------------------------
//
#include "FreeOTFEGUIlib.h"
#include "FreeOTFE4PDAGUIlib.h"
#include "FreeOTFE4PDAlib.h"
#include "FreeOTFE4PDAAPI.h"
// =========================================================================
// Returns TRUE if the mountpoint specified is a valid mountpoint which may
// be used
BOOL ValidateMountpoint(
HWND hWnd,
WCHAR* mountpoint,
BOOL SkipExistsCheck,
BOOL silent
)
{
BOOL retval = FALSE;
if (wcslen(mountpoint) == 0)
{
if (!(silent))
{
MsgError(hWnd, TEXT("Please specify a mountpoint"));
}
}
else if (wcscmp(RESERVED_MOUNTPOINT, mountpoint) == 0)
{
if (!(silent))
{
MsgError(hWnd, TEXT("The mountpoint specified is reserved; please enter a different mountpoint"));
}
}
else if (wcspbrk(mountpoint, RESERVED_MOUNTPOINT_CHARS) != NULL)
{
if (!(silent))
{
MsgError(hWnd, TEXT("The mountpoint specified includes a invalid character; please enter a different mountpoint"));
}
}
else if (
(!(SkipExistsCheck)) &&
(GetFileAttributes(mountpoint) != INVALID_FILE_ATTRIBUTES)
)
{
if (!(silent))
{
MsgError(hWnd, TEXT("The mountpoint specified already exists; please enter a different mountpoint"));
}
}
else
{
// Everything OK
retval = TRUE;
}
return retval;
}
// =========================================================================
// =========================================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -