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 / May 2006

Tip: Looking for answers? Try searching our database.

Write COM Object in C#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MR - 22 May 2006 18:39 GMT
i am developing a client C# application that utilized a legacy COM object.
For development, I cannot use the object because it has specific hardware
requirements. Therefore i would like to write a stub or  "emulator" for this
COM object, preferably i C# but C++ or VB.NET would work too.
The idea is to be able to use this object in development, then in production
(when the hardware is available) just regsvr32 the "real" object and use
that instead. this means that the emulator object probably needs the same
GUID and methods , etc as the "real" object
is there a document or other source that details the development steps that
i would need to take to accomplish this?
thanks
m
Kevin Spencer - 22 May 2006 19:29 GMT
Here's a good starting point:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conadvancedcominterop.asp


Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

The man who questions opinions is wise.
The man who quarrels with facts is a fool.

>i am developing a client C# application that utilized a legacy COM object.
>For development, I cannot use the object because it has specific hardware
[quoted text clipped - 8 lines]
> thanks
> m
John A. Bailo - 22 May 2006 19:34 GMT
> i am developing a client C# application that utilized a legacy COM object.
> For development, I cannot use the object because it has specific hardware
> requirements. Therefore i would like to write a stub or  "emulator" for this
> COM object, preferably i C# but C++ or VB.NET would work too.

When you say "cannot use it" I assume that when it runs, it loads some
set of resources that are too large for your workstation.

Well, you can always just register the object on your development
machine, add a reference to your c# project -- but not run it -- OR,
comment out the code that accesses it and put in dummy results.

Then, when doing a full on test, set up the real code and test on your
deployment server.

> The idea is to be able to use this object in development, then in production
> (when the hardware is available) just regsvr32 the "real" object and use
[quoted text clipped - 4 lines]
> thanks
> m

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.