ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Writing Managed Wrappers with Managed C++
Subject:   Answers
Date:   2004-04-07 09:09:34
From:   samgentile
Response to: My new O'Reilly Article is Live - Writing Managed Wrappers with Managed C

>>1. Is it correct to expose unmanged classes in >>>the wrapped methods? e.g. Item and >>UnmanagedLinke

They are NOT exposed. They are wrapped in a managed wrapper. Managed code can ONLY get to the exposed methods in the wrapper. They can't get directly at the unmanaged code. You have to encapsulate the unmanaged pointer in order to wrap the class.



2. If the class 'Item' should be visible to the "mangaged programmer", do I have to wrap it too?


You should wrap only what need to be visible. As the article says, you should only wrap what you need to access what you need from managed code. If you need access to Item, then you can wrap it.


HTH



1 to 1 of 1
  1. Answers
    2004-04-08 00:01:48  madigan04 [View]

    • Answers
      2004-04-08 23:22:05  samgentile [View]

1 to 1 of 1