Skip to main content

2.8. 헬퍼 컴포넌트 IState 및 IMngFile

2.8. 헬퍼 컴포넌트 IState 및 IMngFile

편리하고 정확한 서비스 호출을 위하여 IState IMngFile은 자주 사용되는 서비스 호출의 소속 함수를 제공합니다.이를 사용하기 전, IBase 컴포넌트를 이들 컴포넌트에 바인드 해야 합니다..

 

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

// 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_);