Question:

You write the following custom exception class named CustomException.

public ref class CustomException : ApplicationException

{

public:

literal int COR_E_ARGUMENT = (int)0x80070057;

CustomException(String= msg) : ApplicationException(msg)

{

HResult = COR_E_ARGUMENT;

}

};

You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code.

Which code segment should you use?

 

A return Marshal::GetExceptionForHR(
CustomException::COR_E_ARGUMENT); 

B Versireturn CustomException::COR_E_ARGUMENT; 

C Marshal::ThrowExceptionForHR(
CustomException::COR_E_ARGUMENT); 

D throw gcnew CustomException("Argument is out of bounds"); "A Composite Solution With Just One Click" - Certification Guaranteed 263 Microsoft 70-536 Exam 

+ Answer
+ Report
Total Preview: 800

Copyright © 2024. Powered by Intellect Software Ltd