UnmanagedType 枚举
import System.*;
import .*;
// If you do not have a type library for an interface
// you can redeclare it using ComImportAttribute.
// This is how the interface would look in an idl file.
// [
// object,
// uuid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26"),
// dual, helpstring("IMyStorage Interface"),
// pointer_default(unique)
// ]
// interface IMyStorage : IDispatch
// {
// [id(1)]
// HRESULT GetItem([in] BSTR bstrName, [out, retval] IDispatch ** ppItem);
// [id(2)]
// HRESULT GetItems([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT)* pItems);
// [id(3)]
// HRESULT GetItemDescriptions([in] BSTR bstrLocation, [out] SAFEARRAY(VARIANT) ** ppItems);
// [id(4), propget]
// HRESULT get_IsEmpty([out, retval] BOOL * pfEmpty);
// };
// This is the managed declaration.
/** @attribute ComImport()
*/
/** @attribute Guid("73EB4AF8-BE9C-4b49-B3A4-24F4FF657B26")
*/
public interface IMyStorage
{
/** @attribute DispId(1)
*/
Object GetItem(
/** @attribute In()
@attribute MarshalAs()
*/String bstrName);
/** @attribute DispId(2)
*/
void GetItems(
/** @attribute In()
@attribute MarshalAs()
*/String bstrLocation,
/** @attribute Out()
@attribute MarshalAs(,
SafeArraySubType = VarEnum.VT_VARIANT)
*/Object Items[]);
/** @attribute DispId(3)
*/
void GetItemDescriptions(
/** @attribute In()
*/String bstrLocation,
/** @attribute In()
@attribute Out()
@attribute MarshalAs()
*/Object varDescriptions[]);
/** @attribute DispId(4)
*/
/** @return MarshalAs()
*/
boolean get_IsEmpty();
} //IMyStorage