2007-12-14 07:13:21 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS ReactX
|
|
|
|
* FILE: dll/directx/d3d9/d3d9_helpers.h
|
|
|
|
* PURPOSE: d3d9.dll helper functions
|
|
|
|
* PROGRAMERS: Gregor Brunmar <gregor (dot) brunmar (at) home (dot) se>
|
|
|
|
*/
|
2007-12-19 20:44:43 +00:00
|
|
|
#ifndef _D3D9_HELPERS_H_
|
|
|
|
#define _D3D9_HELPERS_H_
|
2007-12-14 07:13:21 +00:00
|
|
|
|
2008-01-13 11:45:31 +00:00
|
|
|
#include "d3d9_common.h"
|
2007-12-19 20:44:43 +00:00
|
|
|
#include "d3d9_private.h"
|
|
|
|
|
2007-12-14 07:13:21 +00:00
|
|
|
|
2007-12-17 21:22:40 +00:00
|
|
|
/* Reads a registry value if it's of the correct value type */
|
2007-12-14 07:13:21 +00:00
|
|
|
BOOL ReadRegistryValue(IN DWORD ValueType, IN LPCSTR ValueName, OUT LPBYTE DataBuffer, IN OUT LPDWORD DataBufferSize);
|
2007-12-17 21:22:40 +00:00
|
|
|
|
2008-08-19 15:42:23 +00:00
|
|
|
/* Safe string formatting */
|
2008-08-21 02:34:28 +00:00
|
|
|
HRESULT SafeFormatString(IN OUT LPSTR Buffer, IN DWORD BufferSize, IN LPCSTR FormatString, ... );
|
2008-08-19 15:42:23 +00:00
|
|
|
HRESULT SafeCopyString(OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src);
|
|
|
|
HRESULT SafeAppendString(IN OUT LPSTR Dst, IN DWORD DstSize, IN LPCSTR Src);
|
|
|
|
|
2007-12-20 21:18:42 +00:00
|
|
|
/* Allocates memory and returns an aligned pointer */
|
|
|
|
HRESULT AlignedAlloc(IN OUT LPVOID *ppObject, IN SIZE_T dwSize);
|
|
|
|
|
|
|
|
/* Frees memory allocated with AlignedAlloc */
|
|
|
|
VOID AlignedFree(IN OUT LPVOID pObject);
|
|
|
|
|
|
|
|
|
2007-12-19 20:44:43 +00:00
|
|
|
#endif // _D3D9_HELPERS_H_
|