spy++ can get class name, for more: http://msdn.microsoft.com/en-us/library/aa264396(VS.60).aspx[^]
Working is a happy thing! Enjoy the free partition manager!
spy++ can get class name, for more: http://msdn.microsoft.com/en-us/library/aa264396(VS.60).aspx[^]
Working is a happy thing! Enjoy the free partition manager!
WM_SETTEXT is used to set the text of a window.
Working is a happy thing! Enjoy the free partition manager!
QT is more easy to use than MFC, i think.
Working is a happy thing! Enjoy the free partition manager!
You can use the function: SetUnhandledExceptionFilter to catch. Then use MiniDumpWriteDump to dump exception to a file.
Working is a happy thing! Enjoy the free partition manager!
Please check if the "handle" is NULL.
fopen_s(&handle,cPathName,"wt");
if (handle != NULL)
{
fprintf(handle,"<?xml version=\"1.0\"?>\n")
}
Working is a happy thing! Enjoy free partition manager!
You can issue the IOCTL_STORAGE_GET_MEDIA_TYPES_EX to differentiate. Here is an example code:
//////////////////////////////////////////
DWORD dwOutBytes;
HANDLE hDevice = CreateFile(_T("\\\\.\\A:"), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
if (hDevice != INVALID_HANDLE_VALUE)
{
DEVICE_MEDIA_INFO dmi;
DeviceIoControl(hDevice,
IOCTL_STORAGE_GET_MEDIA_TYPES_EX,
NULL, 0,
&dmi, sizeof(dmi),
dwOutBytes,
NULL);
if ((MEDIA\_TYPE)dmi.RemovableDiskInfo.MediaType == RemovableMedia)
{
//USB disk
}
else
{
//Floppy
}
}
CloseHandle(hDevice);
//////////////////////////////////////////
Hope it is useful to you.
Working is a happy thing! Enjoy the free partition manager.