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.

106 lines
3.3 KiB

  1. /*
  2. * dllinit.cpp - Initialization and termination routines.
  3. */
  4. /* Headers
  5. **********/
  6. #include "project.h"
  7. #pragma hdrstop
  8. #include "autodial.hpp"
  9. #include "shdocvw.h"
  10. PUBLIC_CODE BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason,
  11. PVOID pvReserved)
  12. {
  13. return TRUE;
  14. }
  15. STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, PVOID *ppvObject)
  16. {
  17. *ppvObject = 0;
  18. return E_UNEXPECTED;
  19. }
  20. STDAPI DllCanUnloadNow(void)
  21. {
  22. return S_OK;
  23. }
  24. INTSHCUTAPI HRESULT WINAPI TranslateURLA(PCSTR pcszURL, DWORD dwInFlags, PSTR *ppszTranslatedURL)
  25. {
  26. return URLQualifyA(pcszURL, dwInFlags, ppszTranslatedURL);
  27. }
  28. INTSHCUTAPI HRESULT WINAPI TranslateURLW(PCWSTR pcszURL, DWORD dwInFlags, PWSTR UNALIGNED *ppszTranslatedURL)
  29. {
  30. return URLQualifyW(pcszURL, dwInFlags, ppszTranslatedURL);
  31. }
  32. INTSHCUTAPI HRESULT WINAPI URLAssociationDialogW(HWND hwndParent,
  33. DWORD dwInFlags,
  34. PCWSTR pcszFile,
  35. PCWSTR pcszURL,
  36. PWSTR pszAppBuf,
  37. UINT ucAppBufLen)
  38. {
  39. SetLastError(ERROR_NOT_SUPPORTED);
  40. return E_NOTIMPL;
  41. }
  42. INTSHCUTAPI HRESULT WINAPI URLAssociationDialogA(HWND hwndParent,
  43. DWORD dwInFlags,
  44. PCSTR pcszFile,
  45. PCSTR pcszURL,
  46. PSTR pszAppBuf,
  47. UINT ucAppBufLen)
  48. {
  49. SetLastError(ERROR_NOT_SUPPORTED);
  50. return E_NOTIMPL;
  51. }
  52. INTSHCUTAPI HRESULT WINAPI MIMEAssociationDialogW(HWND hwndParent,
  53. DWORD dwInFlags,
  54. PCWSTR pcszFile,
  55. PCWSTR pcszMIMEContentType,
  56. PWSTR pszAppBuf,
  57. UINT ucAppBufLen)
  58. {
  59. SetLastError(ERROR_NOT_SUPPORTED);
  60. return E_NOTIMPL;
  61. }
  62. INTSHCUTAPI HRESULT WINAPI MIMEAssociationDialogA(HWND hwndParent,
  63. DWORD dwInFlags,
  64. PCSTR pcszFile,
  65. PCSTR pcszMIMEContentType,
  66. PSTR pszAppBuf,
  67. UINT ucAppBufLen)
  68. {
  69. SetLastError(ERROR_NOT_SUPPORTED);
  70. return E_NOTIMPL;
  71. }
  72. INTSHCUTAPI HRESULT WINAPI AddMIMEFileTypesPS(LPFNADDPROPSHEETPAGE pfnAddPage,
  73. LPARAM lparam)
  74. {
  75. IShellPropSheetExt* pspse;
  76. HRESULT hr = SHCoCreateInstance(NULL, &CLSID_FileTypes, NULL, IID_IShellPropSheetExt, (LPVOID*)&pspse);
  77. if (SUCCEEDED(hr))
  78. {
  79. hr = pspse->AddPages(pfnAddPage, lparam);
  80. pspse->Release();
  81. }
  82. return hr;
  83. }
  84. EXTERN_C void WINAPI OpenURL(HWND hwndParent, HINSTANCE hinst,
  85. PSTR pszCmdLine, int nShowCmd)
  86. {
  87. ShellExecute(hwndParent, NULL, pszCmdLine, NULL, NULL , nShowCmd);
  88. }