iccvid: Added Slovenian translation.
[wine] / dlls / fusion / asmname.c
1 /*
2  * IAssemblyName implementation
3  *
4  * Copyright 2008 James Hawkins
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include <stdarg.h>
22
23 #define COBJMACROS
24 #define INITGUID
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30 #include "guiddef.h"
31 #include "fusion.h"
32 #include "wine/debug.h"
33
34 WINE_DEFAULT_DEBUG_CHANNEL(fusion);
35
36 typedef struct {
37     const IAssemblyNameVtbl *lpIAssemblyNameVtbl;
38
39     LONG ref;
40 } IAssemblyNameImpl;
41
42 static HRESULT WINAPI IAssemblyNameImpl_QueryInterface(IAssemblyName *iface,
43                                                        REFIID riid, LPVOID *ppobj)
44 {
45     IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface;
46
47     TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
48
49     *ppobj = NULL;
50
51     if (IsEqualIID(riid, &IID_IUnknown) ||
52         IsEqualIID(riid, &IID_IAssemblyName))
53     {
54         IUnknown_AddRef(iface);
55         *ppobj = This;
56         return S_OK;
57     }
58
59     WARN("(%p, %s, %p): not found\n", This, debugstr_guid(riid), ppobj);
60     return E_NOINTERFACE;
61 }
62
63 static ULONG WINAPI IAssemblyNameImpl_AddRef(IAssemblyName *iface)
64 {
65     IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface;
66     ULONG refCount = InterlockedIncrement(&This->ref);
67
68     TRACE("(%p)->(ref before = %u)\n", This, refCount - 1);
69
70     return refCount;
71 }
72
73 static ULONG WINAPI IAssemblyNameImpl_Release(IAssemblyName *iface)
74 {
75     IAssemblyNameImpl *This = (IAssemblyNameImpl *)iface;
76     ULONG refCount = InterlockedDecrement(&This->ref);
77
78     TRACE("(%p)->(ref before = %u)\n", This, refCount + 1);
79
80     if (!refCount)
81         HeapFree(GetProcessHeap(), 0, This);
82
83     return refCount;
84 }
85
86 static HRESULT WINAPI IAssemblyNameImpl_SetProperty(IAssemblyName *iface,
87                                                     DWORD PropertyId,
88                                                     LPVOID pvProperty,
89                                                     DWORD cbProperty)
90 {
91     FIXME("(%p, %d, %p, %d) stub!\n", iface, PropertyId, pvProperty, cbProperty);
92     return E_NOTIMPL;
93 }
94
95 static HRESULT WINAPI IAssemblyNameImpl_GetProperty(IAssemblyName *iface,
96                                                     DWORD PropertyId,
97                                                     LPVOID pvProperty,
98                                                     LPDWORD pcbProperty)
99 {
100     FIXME("(%p, %d, %p, %p) stub!\n", iface, PropertyId, pvProperty, pcbProperty);
101     return E_NOTIMPL;
102 }
103
104 static HRESULT WINAPI IAssemblyNameImpl_Finalize(IAssemblyName *iface)
105 {
106     FIXME("(%p) stub!\n", iface);
107     return E_NOTIMPL;
108 }
109
110 static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
111                                                        LPOLESTR szDisplayName,
112                                                        LPDWORD pccDisplayName,
113                                                        DWORD dwDisplayFlags)
114 {
115     FIXME("(%p, %s, %p, %d) stub!\n", iface, debugstr_w(szDisplayName),
116           pccDisplayName, dwDisplayFlags);
117
118     return E_NOTIMPL;
119 }
120
121 static HRESULT WINAPI IAssemblyNameImpl_Reserved(IAssemblyName *iface,
122                                                  REFIID refIID,
123                                                  IUnknown *pUnkReserved1,
124                                                  IUnknown *pUnkReserved2,
125                                                  LPCOLESTR szReserved,
126                                                  LONGLONG llReserved,
127                                                  LPVOID pvReserved,
128                                                  DWORD cbReserved,
129                                                  LPVOID *ppReserved)
130 {
131     TRACE("(%p, %s, %p, %p, %s, %x%08x, %p, %d, %p)\n", iface,
132           debugstr_guid(refIID), pUnkReserved1, pUnkReserved2,
133           debugstr_w(szReserved), (DWORD)(llReserved >> 32), (DWORD)llReserved,
134           pvReserved, cbReserved, ppReserved);
135
136     return E_NOTIMPL;
137 }
138
139 static HRESULT WINAPI IAssemblyNameImpl_GetName(IAssemblyName *iface,
140                                                 LPDWORD lpcwBuffer,
141                                                 WCHAR *pwzName)
142 {
143     FIXME("(%p, %p, %p) stub!\n", iface, lpcwBuffer, pwzName);
144     return E_NOTIMPL;
145 }
146
147 static HRESULT WINAPI IAssemblyNameImpl_GetVersion(IAssemblyName *iface,
148                                                    LPDWORD pdwVersionHi,
149                                                    LPDWORD pdwVersionLow)
150 {
151     FIXME("(%p, %p, %p) stub!\n", iface, pdwVersionHi, pdwVersionLow);
152     return E_NOTIMPL;
153 }
154
155 static HRESULT WINAPI IAssemblyNameImpl_IsEqual(IAssemblyName *iface,
156                                                 IAssemblyName *pName,
157                                                 DWORD dwCmpFlags)
158 {
159     FIXME("(%p, %p, %d) stub!\n", iface, pName, dwCmpFlags);
160     return E_NOTIMPL;
161 }
162
163 static HRESULT WINAPI IAssemblyNameImpl_Clone(IAssemblyName *iface,
164                                               IAssemblyName **pName)
165 {
166     FIXME("(%p, %p) stub!\n", iface, pName);
167     return E_NOTIMPL;
168 }
169
170 static const IAssemblyNameVtbl AssemblyNameVtbl = {
171     IAssemblyNameImpl_QueryInterface,
172     IAssemblyNameImpl_AddRef,
173     IAssemblyNameImpl_Release,
174     IAssemblyNameImpl_SetProperty,
175     IAssemblyNameImpl_GetProperty,
176     IAssemblyNameImpl_Finalize,
177     IAssemblyNameImpl_GetDisplayName,
178     IAssemblyNameImpl_Reserved,
179     IAssemblyNameImpl_GetName,
180     IAssemblyNameImpl_GetVersion,
181     IAssemblyNameImpl_IsEqual,
182     IAssemblyNameImpl_Clone
183 };