mirror of
https://github.com/solemnwarning/directplay-lite
synced 2024-12-30 16:45:37 +01:00
The threading model used for processing messages here will need redesigning; we can't allow the application to block the event loop when processing a message in case it calls something which won't return until a message is processed. Final model will probably use a pool of workers which will handle I/O one-at-a-time, blocking and allowing other threads to deal with the I/O when in the application message callback.
23 lines
437 B
C++
23 lines
437 B
C++
#ifndef DPLITE_COMAPIEXCEPTION_HPP
|
|
#define DPLITE_COMAPIEXCEPTION_HPP
|
|
|
|
#include <winsock2.h>
|
|
#include <exception>
|
|
#include <windows.h>
|
|
|
|
class COMAPIException: public std::exception
|
|
{
|
|
private:
|
|
const HRESULT hr;
|
|
char what_s[64];
|
|
|
|
public:
|
|
COMAPIException(HRESULT result);
|
|
virtual ~COMAPIException();
|
|
|
|
HRESULT result() const noexcept;
|
|
virtual const char *what() const noexcept;
|
|
};
|
|
|
|
#endif /* !DPLITE_COMAPIEXCEPTION_HPP */
|