CreateItemMoniker may get NULL as szDelim, some cleanups.
[wine/multimedia.git] / dlls / shlwapi / shlwapi_main.c
blob05fa3e74800fa4713977a9c7030d13f8ec47f8df
1 /*
2 * SHLWAPI initialisation
4 * Copyright 1998 Marcus Meissner
5 * Copyright 1998 Juergen Schmied (jsch)
6 */
8 #include "winbase.h"
9 #include "winerror.h"
10 #include "debugtools.h"
12 #include "initguid.h"
13 #include "wine/obj_base.h"
14 #include "wine/obj_storage.h"
15 #include "shlwapi.h"
17 DEFAULT_DEBUG_CHANNEL(shell);
19 HINSTANCE shlwapi_hInstance = 0;
21 /*************************************************************************
22 * SHLWAPI LibMain
24 * NOTES
25 * calling oleinitialize here breaks sone apps.
27 BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
29 TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
30 switch (fdwReason)
32 case DLL_PROCESS_ATTACH:
33 shlwapi_hInstance = hinstDLL;
34 break;
36 return TRUE;
39 /***********************************************************************
40 * DllGetVersion [SHLWAPI]
42 * Retrieves version information of the 'SHLWAPI.DLL'
44 * PARAMS
45 * pdvi [O] pointer to version information structure.
47 * RETURNS
48 * Success: S_OK
49 * Failure: E_INVALIDARG
51 * NOTES
52 * Returns version of a SHLWAPI.dll from IE5.01.
55 HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
57 if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
59 WARN("wrong DLLVERSIONINFO size from app");
60 return E_INVALIDARG;
63 pdvi->dwMajorVersion = 5;
64 pdvi->dwMinorVersion = 0;
65 pdvi->dwBuildNumber = 2314;
66 pdvi->dwPlatformID = 1000;
68 TRACE("%lu.%lu.%lu.%lu\n",
69 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
70 pdvi->dwBuildNumber, pdvi->dwPlatformID);
72 return S_OK;