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.

122 lines
1.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. Dll.c
  5. Abstract:
  6. Used by the Demo Application to illustrate IgnoreFreeLibrary.
  7. Notes:
  8. ANSI only - must run on Win9x.
  9. History:
  10. 03/09/01 rparsons Created
  11. 01/10/02 rparsons Revised
  12. --*/
  13. #include <windows.h>
  14. #include "dll.h"
  15. /*++
  16. Routine Description:
  17. Similiar to WinMain - entry point for the dll.
  18. Arguments:
  19. hModule - Handle to the DLL.
  20. fdwReason - The reason we were called.
  21. lpReserved - Indicates an implicit or explicit load.
  22. Return Value:
  23. TRUE on success, FALSE otherwise.
  24. --*/
  25. BOOL
  26. WINAPI
  27. DllMain(
  28. IN HANDLE hModule,
  29. IN DWORD fdwReason,
  30. IN LPVOID lpReserved
  31. )
  32. {
  33. switch (fdwReason) {
  34. case DLL_PROCESS_ATTACH:
  35. break;
  36. case DLL_THREAD_ATTACH:
  37. break;
  38. case DLL_THREAD_DETACH:
  39. break;
  40. case DLL_PROCESS_DETACH:
  41. break;
  42. }
  43. return TRUE;
  44. }
  45. /*++
  46. Routine Description:
  47. Our exported sample function.
  48. Arguments:
  49. dwParam - Not used.
  50. Return Value:
  51. None.
  52. --*/
  53. void
  54. WINAPI
  55. DemoAppExp(
  56. IN DWORD* dwParam
  57. )
  58. {
  59. DWORD dwLocal = 0;
  60. dwLocal = *dwParam;
  61. }
  62. /*++
  63. Routine Description:
  64. This function is exported so that the EXE can call it.
  65. In turn, the DLL will display a message box that will
  66. not be ignored unless the user utilizes the include/exclude
  67. functionality in QFixApp.
  68. Arguments:
  69. hWnd - Handle to the parent window.
  70. Return Value:
  71. None.
  72. --*/
  73. void
  74. WINAPI
  75. DemoAppMessageBox(
  76. IN HWND hWnd
  77. )
  78. {
  79. MessageBox(hWnd,
  80. "This message box is displayed for the include/exclude test.",
  81. MAIN_APP_TITLE,
  82. MB_ICONINFORMATION);
  83. }