MDIL support optional parameters with default values like the following:
interface IMyInterface : IUnknown
{
HRESULT MyFunction([in, optional, defaultvalue("")] BSTR bstrName);
}
MDIL will also generate the .h file as
HRESULT MyFunction(BSTR bstrName = L"");

Does anyone know if I can use C++ to implement a class to support this interface? What is the syntax for this function? Is it the same as what I see in the MIDL generated .h file?
My purpose is to call this function in my C++ client in both the following format
MyInterfacePointer->MyFunction();
and
MyInterfacePointer->MyFunction(bstrName);
Can anyone tell me if this is feasible or not?