
C++ Code snippies
文章平均质量分 61
windsonl
这个作者很懒,什么都没留下…
展开
-
Example of copying device blocks
//Example of copying devices blockUINT uiErrModeSav = SetErrorMode( SEM_FAILCRITICALERRORS);WCHAR szDevName[_MAX_PATH]; if (!GetDeviceName(szDevName, ARRLEN(szDevN原创 2009-04-23 05:42:00 · 342 阅读 · 0 评论 -
Get Volume Bitmap-NTFS
// Get volume bitmap(Only correct on NTFS)VOLUME_BITMAP_BUFFER *GetVolumeBitmap( HANDLE hDev, unsigned int *puiBitmapSize) { STARTING_LCN_INPUT_BUFFER sStartLcn; sStartLcn.StartingLcn.Qu原创 2009-04-24 02:49:00 · 1455 阅读 · 0 评论 -
string to number code in C++ template
template bool AtoI(WCHAR *sz, IntType *out) { int i = 0; bool sign = false; if (sz[i] == -) { ++i; sign = true; } int base = 10; if(sz[i] == 0 && tolower(sz[i原创 2009-04-23 04:58:00 · 335 阅读 · 0 评论 -
Open Device (Hard Drive, CD/DVD)
// DeviceIoControl allows program to access hidden areaHANDLE OpenBlockDevice(const WCHAR *szDevName, bool fWrite) { HANDLE h = CreateFile(szDevName, fWrite ? GENERI原创 2009-04-23 05:31:00 · 703 阅读 · 0 评论 -
Disable ugly popup window when program occurs ciritical error in windows
Disable ugly popup window when program fails in windowsUINT uiErrModeSav = SetErrorMode( SEM_FAILCRITICALERRORS);原创 2009-04-23 05:36:00 · 286 阅读 · 0 评论 -
Open Device(Hard Drive, CD/DVD) or a device from its mount point
// szInput:in:// 1. Device no, st, 0,1,...,n// 2. Device char, st, C:, D:, ....// 3. Device mount path, st, C:/CD-ROM//szDevName:out//cchDevName:outbool GetDeviceName(WCHAR *szDevName,原创 2009-04-23 05:08:00 · 397 阅读 · 0 评论