Alan
Alan

Reputation: 5189

Is CreateInstance of necessary method for a source filter in directshow?

I read in a book that CreateInstance is a MUST for a source filter in directshow,but when I see this I doubt whetger it's true:

CFactoryTemplate g_Templates[] = 
{
    {
        L"Virtual Cam",
        &CLSID_VirtualCam,
        CVCam::CreateInstance,
        NULL,
        &AMSFilterVCam
    },

I can name the CreateInstance static method arbitrarily,like CreateInstance22,right or wrong?

Upvotes: 2

Views: 285

Answers (1)

Christopher
Christopher

Reputation: 8992

Right.

This field is a pointer to a function of type

CUnknown* (*)( LPUNKNOWN pUnk, HRESULT* phr );

So any function of that layout can be used.

Upvotes: 2

Related Questions