Solved

RegisterDeviceNotification declaration with MFC headers

Posted on 2003-10-28
8
862 Views
Last Modified: 2013-12-03
I'm trying to use RegisterDeviceNotification in a test mfc dialog for proof of concept of something before I turn it into a sevice.  However, I cannot get the function declaration to work that is in winuser.h  Either by letting mfc includes get or by explicity declaring it.

Is there some define that has to be set for those things to be included in the header correctly?  Like how in VS6, you have to redeclare WINVER to be 0x0500 for the structure typedefs that you use with RegisterDeviceNotification to be included correctly in dbt.h
0
Comment
Question by:_corey_
  • 5
  • 2
8 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 250 total points
Comment Utility
0
 
LVL 8

Author Comment

by:_corey_
Comment Utility
Actually, in the question I point out that I use that as an example and wanted to know if there was another requirement because I refuses to find it.

Also, you know how you can specify specific usb device GUID's?  Well they are defined in some ddk headers which I cannot get a hold of right now.  Could anyone give me these GUIDs for usb and/or joystick type devices?
0
 
LVL 8

Author Comment

by:_corey_
Comment Utility
Oh, my bad, late night :)   But still the GUID id question?  I'll throw some more points for anyone with that data.  I cannot get a ddk download anywhere or order started.
0
 
LVL 11

Expert Comment

by:robert_marquardt
Comment Utility
The DDK is not for download anymore.
There is also no GUID for mouse or joystick. Only for individual devices of a single manufacturer.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 11

Expert Comment

by:robert_marquardt
Comment Utility
What do you want to achieve?
0
 
LVL 8

Author Comment

by:_corey_
Comment Utility
Well, that generic usb GUID would do for now then.

I can always check to see if there was actually a device of the type I want plugged in, I just thought there might be sub-category predefined GUIDs but I never found any myself.  But, I also don't have that header.

Yea, the DDK isn't for download anymore, and the page to get it was screwed up, so I was looking for some declarations to use.
0
 
LVL 8

Author Comment

by:_corey_
Comment Utility
Defining that _WIN32_WINNT seems correct but doesn't have any effect that I can tell, perhaps I have some other problem.

If anyone can give me usbioctl or some file with those guid definitions, I'lll then split the points.
0
 
LVL 8

Author Comment

by:_corey_
Comment Utility
For those looking it is _WIN32_WINNT not WIN32_WINNT but it does work once you setup the defines correctly (and don't forget a rebuild all).

The order page is finally working so I just ordered the new ddk so I can get the headers/libs correctly instead of hacking it up.  Thanks guys.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now