sdugeneral.h

来自「文件驱动加密,功能强大,可产生加密分区,支持AES,MD2,MD4,MD5MD2」· C头文件 代码 · 共 121 行

H
121
字号

#ifndef _SDUGeneral_H
#define _SDUGeneral_H   1

#include <windows.h>  // Required for WCHAR

// =========================================================================
// Macros...

#define SDULengthOf(x)  (sizeof(x) / sizeof(x[0]))


// =========================================================================
// Functions...

void SDUParsePath(
    const WCHAR* fullPath, 
    WCHAR** uncMachine,
    WCHAR** drive,
    WCHAR** path,
    WCHAR** filename,
    WCHAR** fileExtension
);


void* SDUUnpack_LARGE_INTEGER(const void* ptr, LARGE_INTEGER* val);
void* SDUUnpack_DWORD(const void* ptr, DWORD* val);
void* SDUUnpack_char(const void* ptr, char* val);
void* SDUPack_LARGE_INTEGER(const void* ptr, LARGE_INTEGER val);
void* SDUPack_DWORD(const void* ptr, DWORD val);
void* SDUPack_char(const void* ptr, char val);

BOOL SDUGetVersionInfoShortFmtAlloc(
					   LPWSTR filename,
					   LPWSTR* lpBuffer
					  );
BOOL SDUGetVersionInfoShortFmt(
					   LPWSTR filename,
					   LPWSTR lpBuffer,
					   DWORD nSize
					  );
BOOL SDUGetVersionInfoFmtAlloc(
					   LPWSTR filename,
					   LPWSTR* lpBuffer
					  );
BOOL SDUGetVersionInfoFmt(
					   LPWSTR filename,
					   LPWSTR lpBuffer,
					   DWORD nSize
					  );
BOOL SDUGetVersionInfoShort(
					   LPWSTR Filename,
					   DWORD* Version
					  );
BOOL SDUGetVersionInfo(
					   LPWSTR filename,
					   int* majorVersion,
					   int* minorVersion, 
					   int* revisionVersion, 
					   int* buildVersion
					  );

void SDUTextSetBold(
    HWND hWnd,
    int ctrlID,
    BOOL UseBold
);

void SDUTextSetItalic(
    HWND hWnd,
    int ctrlID,
    BOOL UseItalic
);

void SDUTextSetUnderline(
    HWND hWnd,
    int ctrlID,
    BOOL UseUnderline
);


// Draw text as per DrawText(...), but truncate the string displayed and
// append "..." onto it if it will not fit into the boundrys supplied
// This is implemented for systems where DT_WORD_ELLIPSIS and DT_PATH_ELLIPSIS
// are not supported (e.g. WinCE)
int SDUDrawTextEllipses(
    HDC hdc,
    WCHAR* Text,
    int TextLength,
    LPRECT TextRect,
    UINT uFormat
);

void SDUSetListViewType(HWND hWnd, DWORD newStyle);
void SDUSetWndStyle(HWND hWnd, BOOL SetNotUnset, DWORD Style);
int SDUListView_GetItemTextLength(HWND hWnd, int item, int subItem);

// Return the value of the specified command line parameter "-<parameter>
// value"
// Returns NULL on failure
WCHAR* SDUCommandLineParameter_Name(const WCHAR* parameter);
// Return the value of the command line parameter indicated by the specified
// index
// Returns NULL on failure
WCHAR* SDUCommandLineParameter_Idx(const int parameterIdx);
// Returns TRUE if the specified command line switch could be found, otherwise
// FALSE
BOOL SDUCommandLineSwitch(const WCHAR* parameter);
// Returns the parameter number in the command line of the specified parameter
// Returns -1 on failure
int SDUCommandLineSwitchNumber(const WCHAR* parameter);
// This function only included in the header file for debug purposes
WCHAR* _SDUParamTok(WCHAR* cmdLine);


// =========================================================================
// =========================================================================

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?