Exit test after first TranslateInfString() failure, which seems to be
[wine] / dlls / msisys / msisys.c
1 /*
2  * Stub implementation of MSISYS.OCX to prevent MSINFO32.EXE from crashing.
3  *
4  * Copyright 2002 Mike McCormack for CodeWeavers
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22
23 #include <stdarg.h>
24
25 #include "windef.h"
26 #include "winerror.h"
27 #include "winbase.h"
28 #include "wingdi.h"
29 #include "winuser.h"
30
31 #include "wine/debug.h"
32
33 WINE_DEFAULT_DEBUG_CHANNEL(msisys);
34
35
36 /***********************************************************************
37  *              MSISYS_InitProcess (internal)
38  */
39 static BOOL MSISYS_InitProcess( void )
40 {
41         TRACE("()\n");
42
43         return TRUE;
44 }
45
46 /***********************************************************************
47  *              MSISYS_UninitProcess (internal)
48  */
49 static void MSISYS_UninitProcess( void )
50 {
51         TRACE("()\n");
52 }
53
54 /***********************************************************************
55  *              DllMain for MSISYS
56  */
57 BOOL WINAPI DllMain(
58         HINSTANCE hInstDLL,
59         DWORD fdwReason,
60         LPVOID lpvReserved )
61 {
62         TRACE("(%p,%ld,%p)\n",hInstDLL,fdwReason,lpvReserved);
63
64         switch ( fdwReason )
65         {
66         case DLL_PROCESS_ATTACH:
67                 DisableThreadLibraryCalls(hInstDLL);
68                 if ( !MSISYS_InitProcess() )
69                         return FALSE;
70                 break;
71         case DLL_PROCESS_DETACH:
72                 MSISYS_UninitProcess();
73                 break;
74         }
75
76         return TRUE;
77 }
78
79
80 /***********************************************************************
81  *              DllCanUnloadNow (MSISYS.@)
82  *
83  * RETURNS
84  *    Success: S_OK
85  *    Failure: S_FALSE
86  */
87 HRESULT WINAPI DllCanUnloadNow(void)
88 {
89         return S_OK;
90 }
91
92 /***********************************************************************
93  *              DllGetClassObject (MSISYS.@)
94  */
95 HRESULT WINAPI DllGetClassObject(REFCLSID pclsid, const IID* piid, LPVOID *ppv)
96 {
97         FIXME("\n");
98
99         return CLASS_E_CLASSNOTAVAILABLE;
100 }
101
102 /***********************************************************************
103  *              DllRegisterServer (MSISYS.@)
104  */
105
106 HRESULT WINAPI DllRegisterServer( void )
107 {
108         FIXME( "(): stub\n" );
109         return E_FAIL;
110 }
111
112 /***********************************************************************
113  *              DllUnregisterServer (MSISYS.@)
114  */
115
116 HRESULT WINAPI DllUnregisterServer( void )
117 {
118         FIXME( "(): stub\n" );
119         return E_FAIL;
120 }