/* 1. Call service. 2. Check whether the returned error code is different from the expected one. 3. If no error occurred, call service GET_PROCESS_STATUS, using as argument the received process ID. This process ID MUST be the process ID of the current process but this procedure has no way to guarantee it! 4. Return structure indicating whether the returned error code was different from the expected one. */ struct replenish_error_type checkreplenish(PROCESS_ID_TYPE id, SYSTEM_TIME_TYPE budget, RETURN_CODE_TYPE code){ struct replenish_error_type r_e; RETURN_CODE_TYPE retCode; PROCESS_STATUS_TYPE status0; r_e = initStruct(); REPLENISH(budget, &retCode); if (retCode==code){ GET_PROCESS_STATUS(id, &status0, &retCode); if (retCode!=NO_ERROR){ r_e.test_status = TRUE; } }else r_e.test_code = TRUE; return r_e; }
void MmeYuvGrabber::suppress(const u_char* devbuf, const u_char* lumbuf) { const u_char* start = frame_ + 16 * vstart_ * outw_ + 16 * hstart_; REPLENISH(devbuf, start, inw_ << 1, 2, hstart_, hstop_, vstart_, vstop_); }