ReactOS  0.4.15-dev-2993-g14fbe80
objsel.c File Reference
#include "objsel_private.h"
#include "rpcproxy.h"
#include "wine/debug.h"
Include dependency graph for objsel.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (objsel)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
 
HRESULT WINAPI DllGetClassObject (REFCLSID rclsid, REFIID iid, LPVOID *ppv)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 
static VOID OBJSEL_IDsObjectPicker_Destroy (IDsObjectPickerImpl *This)
 
static IDsObjectPickerImplimpl_from_IDsObjectPicker (IDsObjectPicker *iface)
 
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef (IDsObjectPicker *iface)
 
static ULONG WINAPI OBJSEL_IDsObjectPicker_Release (IDsObjectPicker *iface)
 
static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface (IDsObjectPicker *iface, REFIID riid, LPVOID *ppvObj)
 
static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize (IDsObjectPicker *iface, PDSOP_INIT_INFO pInitInfo)
 
static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog (IDsObjectPicker *iface, HWND hwndParent, IDataObject **ppdoSelections)
 
HRESULT WINAPI OBJSEL_IDsObjectPicker_Create (LPVOID *ppvObj)
 

Variables

LONG dll_refs = 0
 
static HINSTANCE hInstance
 
static IDsObjectPickerVtbl IDsObjectPicker_Vtbl
 

Function Documentation

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 67 of file objsel.c.

68 {
69  return dll_refs != 0 ? S_FALSE : S_OK;
70 }
#define S_FALSE
Definition: winerror.h:2357
LONG dll_refs
Definition: objsel.c:28
#define S_OK
Definition: intsafe.h:52

◆ DllGetClassObject()

HRESULT WINAPI DllGetClassObject ( REFCLSID  rclsid,
REFIID  iid,
LPVOID ppv 
)

Definition at line 50 of file objsel.c.

51 {
52  TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
53 
54  *ppv = NULL;
55 
56  if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker))
57  return IClassFactory_QueryInterface(&OBJSEL_ClassFactory.IClassFactory_iface, iid, ppv);
58 
59  FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid));
61 }
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define FIXME(fmt,...)
Definition: debug.h:111
ClassFactoryImpl OBJSEL_ClassFactory
Definition: factory.c:168
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
IClassFactory IClassFactory_iface
Definition: factory.c:26
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  fImpLoad 
)

Definition at line 34 of file objsel.c.

35 {
36  switch(fdwReason)
37  {
38  case DLL_PROCESS_ATTACH:
39  hInstance = hinstDLL;
41  break;
42  }
43  return TRUE;
44 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
static HINSTANCE hInstance
Definition: objsel.c:29

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 76 of file objsel.c.

77 {
79 }
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
static HINSTANCE hInstance
Definition: objsel.c:29

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 85 of file objsel.c.

86 {
88 }
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
static HINSTANCE hInstance
Definition: objsel.c:29

◆ impl_from_IDsObjectPicker()

static IDsObjectPickerImpl* impl_from_IDsObjectPicker ( IDsObjectPicker *  iface)
inlinestatic

Definition at line 102 of file objsel.c.

103 {
104  return CONTAINING_RECORD(iface, IDsObjectPickerImpl, IDsObjectPicker_iface);
105 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by OBJSEL_IDsObjectPicker_AddRef(), and OBJSEL_IDsObjectPicker_Release().

◆ OBJSEL_IDsObjectPicker_AddRef()

static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef ( IDsObjectPicker *  iface)
static

Definition at line 110 of file objsel.c.

111 {
113  ULONG ref;
114 
115  TRACE("\n");
116 
117  if (This == NULL) return E_POINTER;
118 
119  ref = InterlockedIncrement(&This->ref);
120 
121  if (ref == 1)
122  {
124  }
125 
126  return ref;
127 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
LONG dll_refs
Definition: objsel.c:28
static IDsObjectPickerImpl * impl_from_IDsObjectPicker(IDsObjectPicker *iface)
Definition: objsel.c:102
#define InterlockedIncrement
Definition: armddk.h:53
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
#define E_POINTER
Definition: winerror.h:2365

Referenced by OBJSEL_IDsObjectPicker_Create(), and OBJSEL_IDsObjectPicker_QueryInterface().

◆ OBJSEL_IDsObjectPicker_Create()

HRESULT WINAPI OBJSEL_IDsObjectPicker_Create ( LPVOID ppvObj)

Definition at line 220 of file objsel.c.

221 {
224  sizeof(IDsObjectPickerImpl));
225  if (Instance != NULL)
226  {
227  Instance->IDsObjectPicker_iface.lpVtbl = &IDsObjectPicker_Vtbl;
228  OBJSEL_IDsObjectPicker_AddRef(&Instance->IDsObjectPicker_iface);
229 
230  *ppvObj = Instance;
231  return S_OK;
232  }
233  else
234  return E_OUTOFMEMORY;
235 }
static IDsObjectPickerVtbl IDsObjectPicker_Vtbl
Definition: objsel.c:207
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker *iface)
Definition: objsel.c:110
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
IN PVOID Instance
Definition: pci.h:361

Referenced by OBJSEL_IClassFactory_CreateInstance().

◆ OBJSEL_IDsObjectPicker_Destroy()

static VOID OBJSEL_IDsObjectPicker_Destroy ( IDsObjectPickerImpl This)
static

Definition at line 94 of file objsel.c.

95 {
97  0,
98  This);
99 }
#define GetProcessHeap()
Definition: compat.h:595
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by OBJSEL_IDsObjectPicker_Release().

◆ OBJSEL_IDsObjectPicker_Initialize()

static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize ( IDsObjectPicker *  iface,
PDSOP_INIT_INFO  pInitInfo 
)
static

Definition at line 182 of file objsel.c.

185 {
186  FIXME("stub!\n");
187  return S_OK;
188 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:52

◆ OBJSEL_IDsObjectPicker_InvokeDialog()

static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog ( IDsObjectPicker *  iface,
HWND  hwndParent,
IDataObject **  ppdoSelections 
)
static

Definition at line 194 of file objsel.c.

198 {
199  FIXME("stub!\n");
200  return S_FALSE;
201 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_FALSE
Definition: winerror.h:2357

◆ OBJSEL_IDsObjectPicker_QueryInterface()

static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface ( IDsObjectPicker *  iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 157 of file objsel.c.

161 {
162  TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
163 
164  if (ppvObj == NULL) return E_POINTER;
165 
166  if (IsEqualGUID(riid, &IID_IUnknown) ||
167  IsEqualGUID(riid, &IID_IDsObjectPicker))
168  {
169  *ppvObj = iface;
171  return S_OK;
172  }
173 
174  FIXME("- no interface IID: %s\n", debugstr_guid(riid));
175  return E_NOINTERFACE;
176 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker *iface)
Definition: objsel.c:110
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:52
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define E_POINTER
Definition: winerror.h:2365

◆ OBJSEL_IDsObjectPicker_Release()

static ULONG WINAPI OBJSEL_IDsObjectPicker_Release ( IDsObjectPicker *  iface)
static

Definition at line 133 of file objsel.c.

134 {
136  ULONG ref;
137 
138  TRACE("\n");
139 
140  if (This == NULL) return E_POINTER;
141 
142  ref = InterlockedDecrement(&This->ref);
143 
144  if (ref == 0)
145  {
148  }
149 
150  return ref;
151 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static VOID OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This)
Definition: objsel.c:94
#define TRACE(s)
Definition: solgame.cpp:4
LONG dll_refs
Definition: objsel.c:28
#define InterlockedDecrement
Definition: armddk.h:52
static IDsObjectPickerImpl * impl_from_IDsObjectPicker(IDsObjectPicker *iface)
Definition: objsel.c:102
#define NULL
Definition: types.h:112
unsigned int ULONG
Definition: retypes.h:1
#define E_POINTER
Definition: winerror.h:2365

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( objsel  )

Variable Documentation

◆ dll_refs

LONG dll_refs = 0

◆ hInstance

HINSTANCE hInstance
static

Definition at line 29 of file objsel.c.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().

◆ IDsObjectPicker_Vtbl

IDsObjectPickerVtbl IDsObjectPicker_Vtbl
static
Initial value:
=
{
}
static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker *iface)
Definition: objsel.c:133
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker *iface)
Definition: objsel.c:110
static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog(IDsObjectPicker *iface, HWND hwndParent, IDataObject **ppdoSelections)
Definition: objsel.c:194
static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize(IDsObjectPicker *iface, PDSOP_INIT_INFO pInitInfo)
Definition: objsel.c:182
static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface(IDsObjectPicker *iface, REFIID riid, LPVOID *ppvObj)
Definition: objsel.c:157

Definition at line 207 of file objsel.c.

Referenced by OBJSEL_IDsObjectPicker_Create().