您的位置:首页 > 移动开发 > Objective-C

To consume a managed type from COM 之三 Calling a .NET Object

2009-12-28 12:34 387 查看
Calling a .NET Object

.NET Framework Developer's Guide
Calling a .NET Object

A COM client can create an instance of a public class in an assembly and call the public members of the class. The common language runtime marshals the calls to and from the managed object.

The following code example creates an instance of the
Loan
class. COM clients cannot access classes directly, but instead call methods, properties, and events exposed by interfaces implemented by the class.(注:COM 客户端不能直接访问类,而是通过接口调用方法、属性、事件等。)

[C++]
ILoanPtr pILoan(__uuidof(Loan));
The
ILoan
interface exposes several methods and properties, including the GetFirstPmtDistribution method.

[C++]
pILoan->GetFirstPmtDistribution(payment, &Balance, &Principal, &Interest,
&MorePmts);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐