| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * Implementation of CLSID_SystemDeviceEnum.
|
|---|
| 3 | *
|
|---|
| 4 | * FIXME - stub.
|
|---|
| 5 | *
|
|---|
| 6 | * hidenori@a2.ctktv.ne.jp
|
|---|
| 7 | */
|
|---|
| 8 |
|
|---|
| 9 | #include "config.h"
|
|---|
| 10 |
|
|---|
| 11 | #include "windef.h"
|
|---|
| 12 | #include "winbase.h"
|
|---|
| 13 | #include "wingdi.h"
|
|---|
| 14 | #include "winerror.h"
|
|---|
| 15 | #include "wine/obj_base.h"
|
|---|
| 16 | #include "wine/obj_oleaut.h"
|
|---|
| 17 | #include "strmif.h"
|
|---|
| 18 | #include "control.h"
|
|---|
| 19 | #include "uuids.h"
|
|---|
| 20 |
|
|---|
| 21 | #include "debugtools.h"
|
|---|
| 22 | DEFAULT_DEBUG_CHANNEL(quartz);
|
|---|
| 23 |
|
|---|
| 24 | #include "quartz_private.h"
|
|---|
| 25 | #include "devenum.h"
|
|---|
| 26 |
|
|---|
| 27 | /* can I use offsetof safely? - FIXME? */
|
|---|
| 28 | static QUARTZ_IFEntry IFEntries[] =
|
|---|
| 29 | {
|
|---|
| 30 | { &IID_ICreateDevEnum, offsetof(CSysDevEnum,createdevenum)-offsetof(CSysDevEnum,unk) },
|
|---|
| 31 | };
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 | static void QUARTZ_DestroySystemDeviceEnum(IUnknown* punk)
|
|---|
| 35 | {
|
|---|
| 36 | CSysDevEnum_THIS(punk,unk);
|
|---|
| 37 |
|
|---|
| 38 | CSysDevEnum_UninitICreateDevEnum( This );
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | HRESULT QUARTZ_CreateSystemDeviceEnum(IUnknown* punkOuter,void** ppobj)
|
|---|
| 42 | {
|
|---|
| 43 | CSysDevEnum* psde;
|
|---|
| 44 | HRESULT hr;
|
|---|
| 45 |
|
|---|
| 46 | TRACE("(%p,%p)\n",punkOuter,ppobj);
|
|---|
| 47 |
|
|---|
| 48 | psde = (CSysDevEnum*)QUARTZ_AllocObj( sizeof(CSysDevEnum) );
|
|---|
| 49 | if ( psde == NULL )
|
|---|
| 50 | return E_OUTOFMEMORY;
|
|---|
| 51 |
|
|---|
| 52 | QUARTZ_IUnkInit( &psde->unk, punkOuter );
|
|---|
| 53 |
|
|---|
| 54 | hr = CSysDevEnum_InitICreateDevEnum( psde );
|
|---|
| 55 | if ( FAILED(hr) )
|
|---|
| 56 | {
|
|---|
| 57 | QUARTZ_FreeObj( psde );
|
|---|
| 58 | return hr;
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 | psde->unk.pEntries = IFEntries;
|
|---|
| 62 | psde->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
|
|---|
| 63 | psde->unk.pOnFinalRelease = QUARTZ_DestroySystemDeviceEnum;
|
|---|
| 64 |
|
|---|
| 65 | *ppobj = (void*)(&psde->unk);
|
|---|
| 66 |
|
|---|
| 67 | return S_OK;
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.