?
Solved

RegisterDeviceNotification declaration with MFC headers

Posted on 2003-10-28
8
Medium Priority
?
887 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
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
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…
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 Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 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