constructor initialization list

Hi,

I'm working on a context menu shell extension and I get an error with this data members...

ClassFactory.h
1
2
3
4
5
6
7
8
9
10
11
class ClassFactory : public IClassFactory
{
private:
	volatile LONG ObjRefCount_;
	CLSID ObjClassId_;

public:
	ClassFactory(REFCLSID rclsid);
	~ClassFactory();
...
};


ClassFactory.cpp
1
2
3
4
ClassFactory::ClassFactory(REFCLSID rclsid) : ObjRefCount_{ 1 }, ObjClassId_{ rclsid }
{
	InterlockedIncrement(&g_DllRefCount);
}


The initialization of "ObjClassId_{ rclsid }" gives an error about not existing an appropriate function for conversion from const IID to unsigned long.

Is it related to the first member of the GUID structure being an unsigned long?
What exactly is going on with this ?
And what can I do for that ?
If I use parentheses there is no warning.

Lot's of questions but I would like to understand what is happening.

Thanks

Topic archived. No new replies allowed.