Example #1
0
HRESULT Namespace::CreateInstance(const std::string& path, INet* net,IDispatch** d)
{
	Instance* i = new Instance;
	i->path_ = path;
	i->lastId_ = 0;
	i->inet_ = net;

	mol::punk<IUnknown> unk;
	HRESULT hr = net->get_CLR(&unk);
	if ( hr == S_OK && unk )
	{
		i->clr_ = unk;
	}

	return i->QueryInterface(IID_IDispatch,(void**)d);
}