Removed a few dependencies on kernel32 functions.
[wine] / dlls / shlwapi / shlwapi_main.c
1 /*
2  * SHLWAPI initialisation
3  *
4  *  Copyright 1998 Marcus Meissner
5  *  Copyright 1998 Juergen Schmied (jsch)
6  */
7
8 #include "winbase.h"
9 #include "winerror.h"
10 #include "debugtools.h"
11
12 #include "initguid.h"
13 #include "wine/obj_base.h"
14 #include "wine/obj_storage.h"
15
16 DEFAULT_DEBUG_CHANNEL(shell);
17
18 HINSTANCE shlwapi_hInstance = 0; 
19
20 /*************************************************************************
21  * SHLWAPI LibMain
22  *
23  * NOTES
24  *  calling oleinitialize here breaks sone apps.
25  */
26 BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
27 {
28         TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
29         switch (fdwReason)
30         {
31           case DLL_PROCESS_ATTACH:
32             shlwapi_hInstance = hinstDLL;
33             break;
34         }
35         return TRUE;
36 }
37
38 /***********************************************************************
39  * DllGetVersion [SHLWAPI]
40  *
41  * Retrieves version information of the 'SHLWAPI.DLL'
42  *
43  * PARAMS
44  *     pdvi [O] pointer to version information structure.
45  *
46  * RETURNS
47  *     Success: S_OK
48  *     Failure: E_INVALIDARG
49  *
50  * NOTES
51  *     Returns version of a SHLWAPI.dll from IE5.01.
52  */
53
54 HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
55 {
56         if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) 
57         {
58           WARN("wrong DLLVERSIONINFO size from app");
59           return E_INVALIDARG;
60         }
61
62         pdvi->dwMajorVersion = 5;
63         pdvi->dwMinorVersion = 0;
64         pdvi->dwBuildNumber = 2314;
65         pdvi->dwPlatformID = 1000;
66
67         TRACE("%lu.%lu.%lu.%lu\n",
68            pdvi->dwMajorVersion, pdvi->dwMinorVersion,
69            pdvi->dwBuildNumber, pdvi->dwPlatformID);
70
71         return S_OK;
72 }