Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Requiem Sollar

@Requiem Sollar
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • USB SD Card reader message
    R Requiem Sollar

    This is an update.... using a different poster's thread answer.... I can now get the insertion and removal of the SD card reader.... I still cannot get the card insertion/removal. Since its frustrating when people do not post full code examples when they are looking help, i will offer this for code for those of you that solely need to detect a USB device insertion/removal, even though it does not do what i need ....... static /*const*/ GUID GUID_DEVINTERFACE_USB_DEVICE = { 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } }; bool CTestSdcardDlg::DoRegNote() { DEV_BROADCAST_DEVICEINTERFACE devInter; ZeroMemory(&devInter, sizeof(devInter)); devInter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE); devInter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE; devInter.dbcc_classguid = GUID_DEVINTERFACE_USB_DEVICE; if(RegisterDeviceNotification(g_hWnd, &devInter, DEVICE_NOTIFY_WINDOW_HANDLE) == NULL) { int i = GetLastError(); int j = 5; } return true; } LRESULT CTestSdcardDlg::WindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)//HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { switch (uMsg) { case WM_DEVICECHANGE: // Initialize the window. AfxMessageBox(_T("Test catch")); break; default: break; } return CDialog::WindowProc(uMsg, wParam, lParam); }

    C / C++ / MFC csharp c++ question

  • Catch USB-Events
    R Requiem Sollar

    Good answer for the use case. I used static /*const*/ GUID GUID_DEVINTERFACE_USB_DEVICE = { 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } }; However if I wanted to detect a user inserting/removing a card from a usb card reader... any one? Currently i only know if the carder reader is plugged/unplugged... not if the card is inserted / removed

    C / C++ / MFC question

  • USB SD Card reader message
    R Requiem Sollar

    Tried the following... It catches the CD door as a reply said it would... no dice on the SD card reader.... Somebody alse asked the question today in a different thread. Another, less obvious course of action was given. I will repost if that works LRESULT CTestSdcardDlg::WindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)//HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { int i = 5; i++; switch (uMsg) { case WM_DEVICECHANGE: // Initialize the window. AfxMessageBox(_T("Test catch")); break; default: break; } return CDialog::WindowProc(uMsg, wParam, lParam); }

    C / C++ / MFC csharp c++ question

  • What is the easiest way to do a timer ?
    R Requiem Sollar

    WM_TIMER This is a very easy thing to use, but is not 100% accurate. You will need SetTimer and KillTimer

    C / C++ / MFC question c++ tutorial

  • USB SD Card reader message
    R Requiem Sollar

    What windows message is created when a SD card is inserted or removed from a USB SD Card reader? I tried creating a CDialog app and using Spy++ to track it, but you must need to register for it because nothing came to the CDialog window. And since Windows will offer you services when you insert a card, such as opening explorer to the card... it must be there. I tried using Spy++ on the explorer window for the SD card reader... but it was a mess of information. OS is XP or 2000 C++ only please, as i am sure .Net has a pretty answer thanks

    C / C++ / MFC csharp c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups