Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

RegisterDeviceNotification declaration with MFC headers

Posted on 2003-10-28
8
Medium Priority
?
888 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 1000 total points
ID: 9639501
0
 
LVL 8

Author Comment

by:_corey_
ID: 9639983
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_
ID: 9640022
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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9641189
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
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 9641192
What do you want to achieve?
0
 
LVL 8

Author Comment

by:_corey_
ID: 9643035
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_
ID: 9645138
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_
ID: 9645672
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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

609 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