Sorry, I should have seen this before. For throwing custom error messages, you have to make use of the ERRORINFO structure which stores this information. The HRESULT is not what contains the information. So in the case of your server, try the following
status = Project2_NewITestServer (NULL, 1, LOCALE_NEUTRAL, 0,
&objHandle);
status = Project2_ITestServerMethod1 (objHandle, &errorInfo);
//Displays a popup box
CA_DisplayErrorInfo (objHandle, NULL, status, &errorInfo);
if(FAILED(status))
printf("%s\n",errorInfo.description);
I hope this helps
Bilal Durrani
NI
Bilal Durrani
NI