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.

103 lines
2.3 KiB

  1. /*
  2. * Copyright (c) 1996 1997, 1998 Philips CE I&C
  3. *
  4. * FILE PHVCMEXT.CPP
  5. * DATE 7-1-97
  6. * VERSION 1.00
  7. * AUTHOR M.J. Verberne
  8. * DESCRIPTION Main of extension DLL
  9. * HISTORY
  10. */
  11. #include <windows.h>
  12. #include <winioctl.h>
  13. #include <ks.h>
  14. #include <ksmedia.h>
  15. #include <commctrl.h>
  16. #include "resource.h"
  17. #include "prpcom.h"
  18. #include "prppage1.h"
  19. #include "prppage2.h"
  20. #ifdef _SERVICE
  21. #include "prppage3.h"
  22. #endif
  23. #ifdef _DEBUG
  24. #include "enre.h"
  25. #endif
  26. #include "debug.h"
  27. #include "phvcmext.h"
  28. /*======================== LOCAL DATA =====================================*/
  29. HINSTANCE hInst = NULL;
  30. /*======================== EXPORTED FUNCTIONS =============================*/
  31. /*-------------------------------------------------------------------------*/
  32. int WINAPI
  33. DllMain (HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved)
  34. /*-------------------------------------------------------------------------*/
  35. {
  36. switch (fdwReason)
  37. {
  38. case DLL_PROCESS_ATTACH:
  39. case DLL_THREAD_ATTACH:
  40. hInst = hInstance;
  41. #ifdef _DEBUG
  42. ENRE_init();
  43. #endif
  44. break;
  45. case DLL_PROCESS_DETACH:
  46. case DLL_THREAD_DETACH:
  47. #ifdef _DEBUG
  48. ENRE_exit();
  49. #endif
  50. break;
  51. }
  52. return TRUE;
  53. }
  54. /*-------------------------------------------------------------------------*/
  55. DWORD CALLBACK VFWWDMExtension(
  56. LPVOID pfnDeviceIoControl,
  57. LPFNADDPROPSHEETPAGE pfnAddPropertyPage,
  58. LPARAM lParam)
  59. /*-------------------------------------------------------------------------*/
  60. {
  61. DWORD dwFlags = 0;
  62. HPROPSHEETPAGE hPage;
  63. // load comctl32.dll
  64. InitCommonControls () ;
  65. hPage = PRPPAGE1_CreatePage((LPFNEXTDEVIO) pfnDeviceIoControl, lParam, hInst);
  66. if (hPage)
  67. {
  68. if (pfnAddPropertyPage(hPage,lParam))
  69. dwFlags |= VFW_OEM_ADD_PAGE;
  70. }
  71. hPage = PRPPAGE2_CreatePage((LPFNEXTDEVIO) pfnDeviceIoControl, lParam, hInst);
  72. if (hPage)
  73. {
  74. if (pfnAddPropertyPage(hPage,lParam))
  75. dwFlags |= VFW_OEM_ADD_PAGE;
  76. }
  77. #ifdef _SERVICE
  78. hPage = PRPPAGE3_CreatePage((LPFNEXTDEVIO) pfnDeviceIoControl, lParam, hInst);
  79. if (hPage)
  80. {
  81. if (pfnAddPropertyPage(hPage,lParam))
  82. dwFlags |= VFW_OEM_ADD_PAGE;
  83. }
  84. #endif
  85. dwFlags |= (VFW_HIDE_CAMERACONTROL_PAGE | VFW_HIDE_SETTINGS_PAGE);
  86. return dwFlags;
  87. }