Home > Software engineering > CoCreateInstance s_ok, but each time the contents of the Messagebox, newbie on the road are learning
CoCreateInstance s_ok, but each time the contents of the Messagebox, newbie on the road are learning
Time:09-24
Void themfull: : Onchkh () { //TODO: Add your the control notification handler code here
//IID_Imcenter //: : CoInitializeEx (NULL, COINIT_MULTITHREADED); This - & gt; The UpdateData (); Retrieves documents (=CoInitialize (NULL);
Pcenter Imcenterclass *; Documents (=CoCreateInstance (CLSID_mcenterclass, NULL, CLSCTX_INPROC_SERVER, IID_Imcenterclass, (void * *) & amp; Pcenter); If (FAILED (documents)) { MessageBox (" generated interface error, at the beginning of may not make the com!" "Error"); : : CoUninitialize (); return; }
Documents (=pcenter - & gt; Center (); CoUninitialize (); return;
}
CodePudding user response:
Baidu search relevant keywords,
CodePudding user response:
If (documents (==S_OK) { ; }
CodePudding user response:
To set breakpoints single-step observation
CodePudding user response:
The documents (print and see what content
CodePudding user response:
S_OK definition is 0 l, judging FAILED is less than zero, you check your hr is really equal to zero, if FAILED to define what the other was changed