QUOTE
//! Returns metadb_handle object referencing specified location (attempts to find existing one, creates new one if doesn't exist).
//! @param p_out Receives metadb_handle pointer.
//! @param p_location Location to create metadb_handle for.
//! @returns true on success, false on failure (rare).
virtual void handle_create(metadb_handle_ptr & p_out,const playable_location & p_location)=0;
//! @param p_out Receives metadb_handle pointer.
//! @param p_location Location to create metadb_handle for.
//! @returns true on success, false on failure (rare).
virtual void handle_create(metadb_handle_ptr & p_out,const playable_location & p_location)=0;
So there is no chance of failure now?
CODE
//! Returns true when signaled, false on timeout
static bool g_wait_for(HANDLE p_event,double p_timeout_seconds) {
SetLastError(NO_ERROR);
DWORD status = WaitForSingleObject(p_event,g_calculate_wait_time(p_timeout_seconds));
switch(status) {
case WAIT_FAILED:
throw exception_win32(GetLastError());
default:
throw pfc::exception_bug_check();
case WAIT_OBJECT_0:
return false;
case WAIT_TIMEOUT:
return true;
}
}
The documentation here didn't look too right to me either ?
static bool g_wait_for(HANDLE p_event,double p_timeout_seconds) {
SetLastError(NO_ERROR);
DWORD status = WaitForSingleObject(p_event,g_calculate_wait_time(p_timeout_seconds));
switch(status) {
case WAIT_FAILED:
throw exception_win32(GetLastError());
default:
throw pfc::exception_bug_check();
case WAIT_OBJECT_0:
return false;
case WAIT_TIMEOUT:
return true;
}
}
