Skip to main content

2.8. Helper components IState and IMngFile

2.8. Helper components IState and IMngFile

For convenient and precise service-calls, IState and IMngFile provide member functions of frequently used service-call. Before use them, you have to bind IBase component into these component.

// ------------------------------------------

// Create COM component instances & get interface - IState

HRESULT hr = CreateInstanceFromInst(h_module_, hr_rpc_proxy::CLSID_State

                                        , hr_rpc_proxy::IID_IState, (void*)&p_state_);

if(FAILED(hr) {

             MessageBox("Error in getting IState.", 0, MB_OK | MB_ICONSTOP);

             return -1;

}

 

// bind the proxy base interface

p_state_->SetProxyBase(p_base_);