DoRegisterDeviceInterfaceToHwnd 1066

来源:互联网 发布:网络大电影收入来源 编辑:程序博客网 时间:2024/05/16 06:08

if you get error 1066, it could also be that the structure packing is wrong when dbt.h is included.  It needs to be 4 or 8. 

To set the proper packing:

#pragma pack(push,8)
#include <dbt.h>
#pragma pack(pop)

OR

#include <pshpack8.h>
#include <dbt.h>
#include <poppack.h>

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/579ff42d-b646-4bc6-8873-38ee7bee8891/registerdevicenotification-service-specific-error-1066?forum=windowsgeneraldevelopmentissues
原创粉丝点击