Any direction on this from experience would be super!
Thanks,
Sanjay
Stuttgart.
/
// Return the current effect selected
//
STDMETHODIMP CEZrgb24::get_IPEffect(int *IPEffect,REFTIME *start,REFTIME
*length)
{
CAutoLock cAutolock(&m_EZrgb24Lock);
CheckPointer(IPEffect,E_POINTER);
CheckPointer(start,E_POINTER);
CheckPointer(length,E_POINTER);
*IPEffect = m_effect;
*start = COARefTime(m_effectStartTime);
*length = COARefTime(m_effectTime);
return NOERROR;
} // get_IPEffect
//
// put_IPEffect
//
// Set the required video effect
//
STDMETHODIMP CEZrgb24::put_IPEffect(int IPEffect,REFTIME start,REFTIME
length)
{
CAutoLock cAutolock(&m_EZrgb24Lock);
m_effect = IPEffect;
m_effectStartTime = COARefTime(start);
m_effectTime = COARefTime(length);
SetDirty(TRUE);
return NOERROR;
} // put_IPEffect
"Sanjay" <sanjay.k...@ejay.de> wrote in message
news:OeZ3LBb9BHA.2396@tkmsftngp05...
1. Create an interface IDL file, name it "iMyFilter.idl", for example.
2. Add something like the following:
------------------------------------------------------------------
[
uuid(A50BB7CA-6B1B-48f0-8610-FFDFD6CE391E),
version(1.0),
helpstring("HermitClub Socket Source Filter Type Library")
]
library MyFilterLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
object,
uuid(53717E55-F35E-47c0-B48A-4F8C1D931020),
helpstring("IMyFilter Interface"),
pointer_default(unique)
]
interface IMyFilter: IUnknown
{
HRESULT Test();
};
};
-----------------------------------------------------------------
3. Add the IDL file to your project.
4. Derive the filter class from your interface, for example:
-----------------------------------------------------------------
#include "iMyFilter.h"
class CMyFilter : public CSource, IMyFilter
-----------------------------------------------------------------
5. Declare the following methods in the "public" section of the class:
-----------------------------------------------------------------
public:
STDMETHODIMP NonDelegatingQueryInterface(REFIID riid, void** ppv);
STDMETHODIMP Test();
-----------------------------------------------------------------
6. Implements the above methods. For NonDelegatingQueryInterface, do
something like this:
-----------------------------------------------------------------
STDMETHODIMP CMyFilter::NonDelegatingQueryInterface(REFIID riid, void **ppv)
{
CheckPointer(ppv, E_POINTER);
if (riid == IID_IMyFilter) {
return GetInterface((IMyFilter*) this, ppv);
} else {
return CSource::NonDelegatingQueryInterface(riid, ppv);
}
}
-----------------------------------------------------------------
7. The following procedures describe how to incorporate the IDL into your
Visual C++ project:
a) Add a file named "iMyFilter_i.c" to the project (it doesn't exist so
we are merely adding a reference)
b) Bring up the "Project Settings" dialog box and select "All
Configurations"
c) Expand the file list and select iMyFilter.idl
d) Click on the "MIDL" tab
e) For "Output header file name:" enter "iMyFilter.h"
f) Check the "Stubless Proxies" box
g) For "UUID File:" enter "iMyFilter_i.c"
8. Compile! (I hope I didn't forget anything, but this is roughly the way
to implment an interface for your filters.)
I hope this helps.
Gary
"The March Hare" <ph...@ndsm.maps> wrote in message
news:O9mQwUc9BHA.1864@tkmsftngp07...
DEFINE_GUID(IID_IIPMYInterface,
0xfd5010a3, 0x8ebe, 0x11ce, 0x81, 0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d,
0xa1);
Now if you want to use an instance of this filter from within another
program and want to use QueryInterface to obtain the desired interface
(IIPMYInteface) then the above declaration within the filter should be...
static const GUID IID_IIPMYInterface = {0xfd5010a3, 0x8ebe, 0x11ce, 0x81,
0x83, 0x00, 0xaa, 0x00, 0x57, 0x7d, 0xa1};
I already had an implementation similar to the one mentioned by March
Hare...except with another interface containing my own functions within the
filter.
I messed up the GUID declaration and that was it...
sorry guys , pilot error :)
Thanks so much again!
Sanjay
"gz" <gary....@eyemailtech.com> wrote in message
news:3cda37d5$1...@news.nntpserver.com...