Moved DLLVERSIONINFO to shlwapi.h.
[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 #include "shlwapi.h"
16
17 DEFAULT_DEBUG_CHANNEL(shell);
18
19 HINSTANCE shlwapi_hInstance = 0; 
20
21 /*************************************************************************
22  * SHLWAPI LibMain
23  *
24  * NOTES
25  *  calling oleinitialize here breaks sone apps.
26  */
27 BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
28 {
29         TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
30         switch (fdwReason)
31         {
32           case DLL_PROCESS_ATTACH:
33             shlwapi_hInstance = hinstDLL;
34             break;
35         }
36         return TRUE;
37 }
38
39 /***********************************************************************
40  * DllGetVersion [SHLWAPI]
41  *
42  * Retrieves version information of the 'SHLWAPI.DLL'
43  *
44  * PARAMS
45  *     pdvi [O] pointer to version information structure.
46  *
47  * RETURNS
48  *     Success: S_OK
49  *     Failure: E_INVALIDARG
50  *
51  * NOTES
52  *     Returns version of a SHLWAPI.dll from IE5.01.
53  */
54
55 HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
56 {
57         if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) 
58         {
59           WARN("wrong DLLVERSIONINFO size from app");
60           return E_INVALIDARG;
61         }
62
63         pdvi->dwMajorVersion = 5;
64         pdvi->dwMinorVersion = 0;
65         pdvi->dwBuildNumber = 2314;
66         pdvi->dwPlatformID = 1000;
67
68         TRACE("%lu.%lu.%lu.%lu\n",
69            pdvi->dwMajorVersion, pdvi->dwMinorVersion,
70            pdvi->dwBuildNumber, pdvi->dwPlatformID);
71
72         return S_OK;
73 }