source: trunk/src/shlwapi/shlwapi_main.c@ 7820

Last change on this file since 7820 was 7820, checked in by sandervl, 24 years ago

Wine resync

File size: 2.0 KB
Line 
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 "winreg.h"
11#include "debugtools.h"
12#define NO_SHLWAPI_STREAM
13#ifndef __WIN32OS2__
14#include "shlwapi.h"
15#endif
16
17DEFAULT_DEBUG_CHANNEL(shell);
18
19HINSTANCE shlwapi_hInstance = 0;
20HMODULE SHLWAPI_hshell32 = 0;
21HMODULE SHLWAPI_hwinmm = 0;
22HMODULE SHLWAPI_hcomdlg32 = 0;
23HMODULE SHLWAPI_hmpr = 0;
24HMODULE SHLWAPI_hmlang = 0;
25
26/*************************************************************************
27 * SHLWAPI LibMain
28 *
29 * NOTES
30 * calling oleinitialize here breaks sone apps.
31 */
32BOOL WINAPI SHLWAPI_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
33{
34 TRACE("0x%x 0x%lx %p\n", hinstDLL, fdwReason, fImpLoad);
35 switch (fdwReason)
36 {
37 case DLL_PROCESS_ATTACH:
38 shlwapi_hInstance = hinstDLL;
39 break;
40 case DLL_PROCESS_DETACH:
41 if (SHLWAPI_hshell32) FreeLibrary(SHLWAPI_hshell32);
42 if (SHLWAPI_hwinmm) FreeLibrary(SHLWAPI_hwinmm);
43 if (SHLWAPI_hcomdlg32) FreeLibrary(SHLWAPI_hcomdlg32);
44 if (SHLWAPI_hmpr) FreeLibrary(SHLWAPI_hmpr);
45 if (SHLWAPI_hmlang) FreeLibrary(SHLWAPI_hmlang);
46 break;
47 }
48 return TRUE;
49}
50
51/***********************************************************************
52 * DllGetVersion [SHLWAPI.@]
53 *
54 * Retrieves version information of the 'SHLWAPI.DLL'
55 *
56 * PARAMS
57 * pdvi [O] pointer to version information structure.
58 *
59 * RETURNS
60 * Success: S_OK
61 * Failure: E_INVALIDARG
62 *
63 * NOTES
64 * Returns version of a SHLWAPI.dll from IE5.01.
65 */
66
67HRESULT WINAPI SHLWAPI_DllGetVersion (DLLVERSIONINFO *pdvi)
68{
69 if (pdvi->cbSize != sizeof(DLLVERSIONINFO))
70 {
71 WARN("wrong DLLVERSIONINFO size from app\n");
72 return E_INVALIDARG;
73 }
74
75 pdvi->dwMajorVersion = 5;
76 pdvi->dwMinorVersion = 0;
77 pdvi->dwBuildNumber = 2314;
78 pdvi->dwPlatformID = 1000;
79
80 TRACE("%lu.%lu.%lu.%lu\n",
81 pdvi->dwMajorVersion, pdvi->dwMinorVersion,
82 pdvi->dwBuildNumber, pdvi->dwPlatformID);
83
84 return S_OK;
85}
Note: See TracBrowser for help on using the repository browser.