#pragma once

class Win32Buffer
{
public:
	Win32Buffer(unsigned size);

	~Win32Buffer();

	void* getBuffer() const;

	unsigned char* getBufferAsUChar() const;

	bool isValid() const;

	void reset(unsigned size);

private:
	void createBuffer(unsigned size);
	void clearBuffer();

	bool mIsValid{ false };
	void* mBuffer{ nullptr };
};