// get battery status information from the shared structure
LockBattery();
//memcpy(pstatus, &gpStatus->sps, sizeof(*pstatus));
memcpy(&gpStatus->sps, sps, sizeof(*sps));
*pfBatteriesChangedSinceLastCall = gpStatus->fChanged;
if(*pfBatteriesChangedSinceLastCall) {
gpStatus->fChanged = FALSE; // reset changed flag if it's set
}
UnlockBattery();