Source code of Windows XP (NT5)
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.

65 lines
963 B

  1. #include <windows.h>
  2. // #pragma comment(linker, "-ignore:4222")
  3. #if DBG
  4. EXTERN_C
  5. NTSYSAPI
  6. VOID
  7. NTAPI
  8. RtlAssert(
  9. PVOID FailedAssertion,
  10. PVOID FileName,
  11. ULONG LineNumber,
  12. PCHAR Message
  13. );
  14. #define ASSERT( exp ) \
  15. if (!(exp)) \
  16. RtlAssert( #exp, __FILE__, __LINE__, NULL )
  17. #else
  18. #define ASSERT( exp ) /* nothing */
  19. #endif // DBG
  20. HINSTANCE g_hInstance;
  21. EXTERN_C
  22. BOOL
  23. DllMain(
  24. HINSTANCE hInstDLL,
  25. DWORD dwReason,
  26. LPVOID pvReserved
  27. )
  28. {
  29. switch (dwReason)
  30. {
  31. case DLL_PROCESS_ATTACH:
  32. ::DisableThreadLibraryCalls(hInstDLL);
  33. break;
  34. }
  35. return TRUE;
  36. }
  37. STDAPI
  38. DllCanUnloadNow()
  39. {
  40. return S_FALSE;
  41. }
  42. STDAPI
  43. DllRegisterServer()
  44. {
  45. // You should not register the side-by-side oleaut32...
  46. ASSERT(FALSE);
  47. return E_UNEXPECTED;
  48. }
  49. STDAPI
  50. DllUnregisterServer()
  51. {
  52. // You should not register/unregister the side-by-side oleaut32...
  53. ASSERT(FALSE);
  54. return E_UNEXPECTED;
  55. }