2 * SHLWAPI initialisation
4 * Copyright 1998 Marcus Meissner
5 * Copyright 1998 Juergen Schmied (jsch)
11 #include "debugtools.h"
12 #define NO_SHLWAPI_STREAM
15 DEFAULT_DEBUG_CHANNEL(shell);
17 HINSTANCE shlwapi_hInstance = 0;
18 HMODULE SHLWAPI_hshell32 = 0;
19 HMODULE SHLWAPI_hwinmm = 0;
20 HMODULE SHLWAPI_hcomdlg32 = 0;
21 HMODULE SHLWAPI_hmpr = 0;
22 HMODULE SHLWAPI_hmlang = 0;
24 /*************************************************************************
28 * calling oleinitialize here breaks sone apps.
30 BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
32 TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
35 case DLL_PROCESS_ATTACH:
36 shlwapi_hInstance = hinstDLL;
38 case DLL_PROCESS_DETACH:
39 if (SHLWAPI_hshell32) FreeLibrary(SHLWAPI_hshell32);
40 if (SHLWAPI_hwinmm) FreeLibrary(SHLWAPI_hwinmm);
41 if (SHLWAPI_hcomdlg32) FreeLibrary(SHLWAPI_hcomdlg32);
42 if (SHLWAPI_hmpr) FreeLibrary(SHLWAPI_hmpr);
43 if (SHLWAPI_hmlang) FreeLibrary(SHLWAPI_hmlang);
49 /***********************************************************************
50 * DllGetVersion [SHLWAPI.@]
52 * Retrieves version information of the 'SHLWAPI.DLL'
55 * pdvi [O] pointer to version information structure.
59 * Failure: E_INVALIDARG
62 * Returns version of a SHLWAPI.dll from IE5.01.
65 HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
67 if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
69 WARN("wrong DLLVERSIONINFO size from app\n");
73 pdvi->dwMajorVersion = 5;
74 pdvi->dwMinorVersion = 0;
75 pdvi->dwBuildNumber = 2314;
76 pdvi->dwPlatformID = 1000;
78 TRACE("%lu.%lu.%lu.%lu\n",
79 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
80 pdvi->dwBuildNumber, pdvi->dwPlatformID);