开发者

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

开发者 https://www.devze.com 2023-01-12 06:14 出处:网络
I read in a book that CreateInstance is a MUST for a s开发者_JAVA技巧ource filter in directshow,but when I see this I doubt whetger it\'s true:

I read in a book that CreateInstance is a MUST for a s开发者_JAVA技巧ource 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消