Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / June 2005

Tip: Looking for answers? Try searching our database.

Converting COM object model to C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 21 Jun 2005 09:39 GMT
I am very new to .Net (about 1 week) and am exploring what is involved in
converting my c++ app to .Net.

The app is very similar to VS.Net; a container which hosts addins and
in-place activates Office docs and MSHTML.

If I re-write in C#, what do I need to do to expose my object model to
JScript and VBA?  'Application' seems to be a built-in class.  How do I
expose my Application object?  Collections seem to be quite different.  How
do I expose my Documents collection?

Any links or advice on where to start would be much appreciated.

Michael
"Peter Huang" [MSFT] - 22 Jun 2005 07:09 GMT
Hi

I think that would be a large project.
Because .NET did not have most COM interface declare, but the Active
Document host will need to be concern with many COM interactive. We need to
declare all the interface carefully ourselves. Also it may be concern with
many unmanaged OLE interface and memory operation, we need many unmanaged
call.

The Application class is used in winform application to handle the message
loop. We did not expose it.
Commonly if we wants to expose a .NET class, we just need to create a Class
Library project and check the COm Interop in the project setting.

If you want to have a start with COM interop, you may start from the
article here.
Exposing .NET Framework Components to COM
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconexposingnetframeworkcomponentstocom.asp

Best regards,

Peter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.