Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.1 KiB

  1. #include "rgb_pch.h"
  2. #pragma hdrstop
  3. namespace RGB_RAST_LIB_NAMESPACE
  4. {
  5. auto_ptr< CRGBDriver> g_pRGBDriver;
  6. }
  7. CRGBDriver* CRGBDriver::sm_pGlobalDriver= NULL;
  8. DX8SDDIFW::COSDetector DX8SDDIFW::g_OSDetector;
  9. HRESULT APIENTRY
  10. D3D8GetSWInfo( D3DCAPS8* pCaps, PD3D8_SWCALLBACKS pCallbacks,
  11. DWORD* pNumTextures, DDSURFACEDESC** ppTexList)
  12. {
  13. return g_pRGBDriver->GetSWInfo( *pCaps, *pCallbacks, *pNumTextures, *ppTexList);
  14. }
  15. BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID lpvReserved)
  16. {
  17. switch (dwReason)
  18. {
  19. case DLL_PROCESS_ATTACH:
  20. try {
  21. CRGBDriver::InitSupportedSurfaceArray();
  22. g_pRGBDriver= auto_ptr< CRGBDriver>( new CRGBDriver);
  23. } catch( ...) {
  24. }
  25. if( g_pRGBDriver.get()== NULL)
  26. return FALSE;
  27. break;
  28. // DLL_PROCESS_DETACH will be called if ATTACH returned FALSE.
  29. case DLL_PROCESS_DETACH:
  30. break;
  31. case DLL_THREAD_ATTACH:
  32. case DLL_THREAD_DETACH:
  33. break;
  34. }
  35. return TRUE;
  36. }