home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow_WinXP / VMR / TxtPlayer / AllocLib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  844 b   |  37 lines

  1. //------------------------------------------------------------------------------
  2. // File: AllocLib.h
  3. //
  4. // Desc: DirectShow sample code - header file for VMR sample applications
  5. //
  6. // Copyright (c) 2000-2001 Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9. #ifndef __INC_ALLOCLIB_H__
  10. #define __INC_ALLOCLIB_H__
  11.  
  12. #ifndef __ZEROSTRUCT_DEFINED
  13. #define __ZEROSTRUCT_DEFINED
  14. template <typename T>
  15. __inline void ZeroStruct(T& t)
  16. {
  17.     ZeroMemory(&t, sizeof(t));
  18. }
  19. #endif
  20.  
  21. #ifndef __INITDDSTRUCT_DEFINED
  22. #define __INITDDSTRUCT_DEFINED
  23. template <typename T>
  24. __inline void INITDDSTRUCT(T& dd)
  25. {
  26.     ZeroStruct(dd);
  27.     dd.dwSize = sizeof(dd);
  28. }
  29. #endif
  30.  
  31.  
  32. HRESULT
  33. PaintDDrawSurfaceBlack(
  34.     LPDIRECTDRAWSURFACE7 pDDrawSurface
  35.     );
  36.  
  37. #endif