서비스를 작성하는 데 예제로 this code 을 사용했습니다. 그리고 커맨드 라인 매개 변수로 작업 할 수 있도록 내 주요 기능을 변경했습니다.알 수없는 형식 이름 - 'DEV_BROADCAST_DEVICEINTERFACE'in MINGW
#define UNICODE
#define WINVER 0x502
오전 "MINGW"를 사용하고 있습니다.
암 받고 다음과 같은 오류 :
usb_detect.c: In function 'ServiceMain':
usb_detect.c:123:16: error: unknown type name 'DEV_BROADCAST_DEVICEINTERFACE'
usb_detect.c:132:41: error: request for member 'dbcc_size' in something not a structure or union
usb_detect.c:132:61: error: 'DEV_BROADCAST_DEVICEINTERFACE' undeclared (first use in this function)
usb_detect.c:132:61: note: each undeclared identifier is reported only once for each function it appears in
usb_detect.c:133:41: error: request for member 'dbcc_devicetype' in something not a structure or union
usb_detect.c:133:60: error: 'DBT_DEVTYP_DEVICEINTERFACE' undeclared (first use in this function)
usb_detect.c:136:117: error: 'DEVICE_NOTIFY_SERVICE_HANDLE' undeclared (first use in this function)
usb_detect.c:136:148: error: 'DEVICE_NOTIFY_ALL_INTERFACE_CLASSES' undeclared (first use in this function)
내가 유니 코드의 주석을 해제하고 오류가없는 WINVER하지만 명령 줄 매개 변수가 작동하지 않는 경우 ... 나는 dbt.h 너무 .. 포함
감사합니다 .... win7 용으로 별도의 윈바를 정의해야합니까? 또는 xp의 모든 버전에서 사용할 수있는 다른 공통 정의가 있습니다. – 2vision2
하지만 난 주에 명령 줄 매개 변수를 사용하지 못할 유니 코드를 정의하면 ... 수도는 내 명령 줄 매개 변수가 작동하지 않는 유니 코드를 정의하는 경우 죄송합니다 이것에 대한 초보자 ... – 2vision2
을 생각하고 바보 소리 !!!!! – 2vision2