Click here to Skip to main content
15,891,976 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: VS2010 - debug version compiles, release version does not Pin
Ed SHaw2-Jun-10 10:56
Ed SHaw2-Jun-10 10:56 
GeneralRe: VS2010 - debug version compiles, release version does not PinPopular
mumg27-Jun-10 3:29
mumg27-Jun-10 3:29 
GeneralRe: VS2010 - debug version compiles, release version does not Pin
MatrixDud29-Apr-11 9:52
MatrixDud29-Apr-11 9:52 
AnswerRe: VS2010 - debug version compiles, release version does not Pin
GSc_Dev2-Nov-11 2:47
GSc_Dev2-Nov-11 2:47 
QuestionHow to differentiate a floppy drive and a USB drive in VC++? Pin
code6631-Jun-10 21:44
code6631-Jun-10 21:44 
AnswerRe: How to differentiate a floppy drive and a USB drive in VC++? Pin
Nuri Ismail1-Jun-10 22:18
Nuri Ismail1-Jun-10 22:18 
GeneralRe: How to differentiate a floppy drive and a USB drive in VC++? Pin
Subrat Patnaik2-Jun-10 0:04
Subrat Patnaik2-Jun-10 0:04 
AnswerRe: How to differentiate a floppy drive and a USB drive in VC++? [modified] Pin
Jackson20102-Jun-10 4:40
Jackson20102-Jun-10 4:40 
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.

Questionmove function in maze does not work correctly Pin
hasani20071-Jun-10 21:40
hasani20071-Jun-10 21:40 
AnswerRe: move function in maze does not work correctly Pin
Nilesh Hamane1-Jun-10 22:17
Nilesh Hamane1-Jun-10 22:17 
AnswerRe: move function in maze does not work correctly Pin
chandu0042-Jun-10 0:00
chandu0042-Jun-10 0:00 
QuestionRe: move function in maze does not work correctly Pin
David Crow2-Jun-10 2:57
David Crow2-Jun-10 2:57 
AnswerRe: Nice work.. i made some changes in your code Pin
Software_Developer2-Jun-10 3:43
Software_Developer2-Jun-10 3:43 
QuestionCompile time error - 'int8_t' : redefinition; different basic types Pin
gmallax1-Jun-10 20:21
gmallax1-Jun-10 20:21 
AnswerRe: Compile time error - 'int8_t' : redefinition; different basic types Pin
Aescleal1-Jun-10 20:41
Aescleal1-Jun-10 20:41 
GeneralRe: Compile time error - 'int8_t' : redefinition; different basic types Pin
gmallax1-Jun-10 22:23
gmallax1-Jun-10 22:23 
GeneralRe: Compile time error - 'int8_t' : redefinition; different basic types Pin
Aescleal1-Jun-10 23:40
Aescleal1-Jun-10 23:40 
Questionblcoking port Pin
trioum1-Jun-10 20:12
trioum1-Jun-10 20:12 
QuestionScroll two windows together WIN32 Pin
arun_pk1-Jun-10 19:43
arun_pk1-Jun-10 19:43 
AnswerRe: Scroll two windows together WIN32 Pin
«_Superman_»1-Jun-10 20:12
professional«_Superman_»1-Jun-10 20:12 
GeneralRe: Scroll two windows together WIN32 Pin
Aescleal1-Jun-10 20:32
Aescleal1-Jun-10 20:32 
GeneralRe: Scroll two windows together WIN32 Pin
«_Superman_»1-Jun-10 20:36
professional«_Superman_»1-Jun-10 20:36 
GeneralRe: Scroll two windows together WIN32 Pin
Aescleal1-Jun-10 20:56
Aescleal1-Jun-10 20:56 
GeneralRe: Scroll two windows together WIN32 Pin
sourabhmehta12-Aug-10 0:55
sourabhmehta12-Aug-10 0:55 
AnswerRe: Scroll two windows together WIN32 Pin
Aescleal1-Jun-10 20:34
Aescleal1-Jun-10 20:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.