the value of hr is : 0x800401f0 , my code is very simple, I used VC to
create a dialog based application and the create a new button on the dialog,
then I added a button click event to this app ,and I have listed the code as
my previous mail detailed .
"William DePalo [MVP VC++]" <wi***********@mvps.orgдÈëÏûÏ¢
news:%2****************@TK2MSFTNGP05.phx.gbl...
"Joseph Lu" <jo******@yahoo.comwrote in message
news:en**************@TK2MSFTNGP04.phx.gbl...
> Could any boday tell me why I failed to create instance here in the
following code ?
...
--------------------------------------------------------------------
void CInsertDataTestDlg::OnBnClickedButton1()
{
_ConnectionPtr pMyConnect=NULL;
HRESULT hr=pMyConnect.CreateInstance(__uuidof(Connection)) ;
if(FAILED(hr))return ;
AfxMessageBox(_T("Successfull connected!"), MB_OK)
}
--------------------------------------------------------------------
Um, what is the value of hr?
Regards,
Will