How do I fix this error?

CDev-8220 385 Reputation points
2025-06-28T20:08:39.41+00:00

argument list for class template "CUIAnimationCallbackBase" is missing

template <class IUIAnimationCallback, class CUIAnimationCallbackDerived>
class CUIAnimationCallbackBase : public IUIAnimationCallback
{
public:
    static __checkReturn HRESULT
        CreateInstance
        (
            __deref_out IUIAnimationCallback** ppUIAnimationCallback,
            __deref_opt_out CUIAnimationCallbackDerived** ppUIAnimationCallbackDerived = NULL
        ) throw()
    {
}


class animationManagerEventHandler
{
public:
    animationManagerEventHandler();
    ~animationManagerEventHandler();
    static HRESULT
        CreateInstance
        (
            Resource* pMainWindow,
            IUIAnimationManagerEventHandler** ppManagerEventHandler
        ) throw()
    {
        unique_ptr<HRESULT> hr = make_unique<HRESULT>(S_OK);
        unique_ptr<animationManagerEventHandler*> aniManEventHandler =
            make_unique<animationManagerEventHandler*>(nullptr);
		
        *hr = CUIAnimationCallbackBase::CreateInstance(
            ppManagerEventHandler,
            &*aniManEventHandler
        ); /* ********* ERROR ********* */

        if (SUCCEEDED(*hr)) {
            //...
        }
        return *hr;
    }
    //..
};
Developer technologies | C++
0 comments No comments
{count} votes

Accepted answer
  1. Omkara Varshitha Kunapalli (INFOSYS LIMITED) 80 Reputation points Microsoft External Staff
    2025-07-02T10:13:58.3033333+00:00

    Thank you for reaching out regarding the error:

     

    "argument list for class template 'CUIAnimationCallbackBase' is missing"

     

    This issue arises because the class CUIAnimationCallbackBase is a template and requires explicit type parameters when invoking its static methods.

     

    is due to the fact that you're trying to use a class template without specifying its template parameters.

    *hr = CUIAnimationCallbackBase<IUIAnimationManagerEventHandler, animationManagerEventHandler>::CreateInstance(

        ppManagerEventHandler,

        &*aniManEventHandler

    );

     

    This ensures the compiler correctly substitutes the template parameters and eliminates the error.

    Let us know if you need further assistance.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.