Skip to content

Conversation

@forderud
Copy link
Contributor

@forderud forderud commented Oct 12, 2024

Make the sample more complete by also setting ManufacturerDate to October 12. 2024 (today).

I've already verified that it's possible to retrieve the same date back with the following code on Windows:

BATTERY_QUERY_INFORMATION bqi = {};
bqi.InformationLevel = BatteryManufactureDate;
bqi.BatteryTag = GetBatteryTag(device);

BATTERY_MANUFACTURE_DATE date = {};
DWORD bytes_returned = 0;
BOOL ok = DeviceIoControl(device, IOCTL_BATTERY_QUERY_INFORMATION, &bqi, sizeof(bqi), &date, sizeof(date), &bytes_returned, nullptr);
printf("ManufactureDate: %u-%u-%u\n", date.Year, date.Month, date.Day);

Make the sample more complete by also setting ManufacturerDate to October 12. 2024 (today). I've already verified that it's possible to retrieve the same date back through IOCTL_BATTERY_QUERY_INFORMATION IOCTL calls on Windows.
@abratchik abratchik merged commit ff5a41d into abratchik:master Oct 13, 2024
@forderud forderud deleted the ManufacturerDate branch October 13, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants