|I've just tested it and got also
FALSE returned when requesting the size. The returned error is 122 /
ERROR_INSUFFICIENT_BUFFER. So it seems that this is intentional.
But you must check the error code (e.g. when passing NULL for
PropertyBuffer and a value greater NULL for
PropertyBufferSize, code 87 /
ERROR_INVALID_PARAMETER is set and the returned size is set to the passed value).
If you got other errors like
ERROR_INVALID_DATA, check your parameters. Note that the size member of the
DeviceInfoData parameter must be initialized:
DevInfoData.cbSize = sizeof(SP_DEVINFO_DATA);