473,490 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Write COM Object in C#

MR
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
May 22 '06 #1
2 1528
Here's a good starting point:

http://msdn.microsoft.com/library/de...cominterop.asp

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

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

"MR" <co******@newsgroup.nospam> wrote in message
news:eO**************@TK2MSFTNGP05.phx.gbl...
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

May 22 '06 #2
MR wrote:
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
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

May 22 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
6311
by: James Marshall | last post by:
I'm writing a library where I want to override document.write(), but for all document objects; thus, I want to put it in the prototype. I tried Document.prototype.write= my_doc_write ; but it...
9
5339
by: Arash Dejkam | last post by:
Hi All, Is it possible to write on an <OBJECT type="text/html"> using document.write() from within the html containing that tag the way we write on a popup window? I couldn't do that after a lot...
13
9582
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
0
9954
by: Steve - DND | last post by:
We are continually receiving timeout, and "Unable to write data to the transport connection" errors while using the System.Net.HttpWebRequest class from an ASP.Net web page. Below are the two...
3
1681
by: Farooq Khan | last post by:
why does Response.Write in a method of code-beind class when called from inpage code (i.e in <%---%>), after creating object of that class, fails when called while it works perfectly ok while...
2
2330
by: Steve | last post by:
Hello, If I instantiate a class object from a form I would like to be able to write to a label on the calling form something like "hello from class object" from within a subroutine inside...
0
3541
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
2
11310
by: =?Utf-8?B?RGFtZW9u?= | last post by:
Hi - I am attempting to write lines to a file at high volume, multiple threads. Here is my scenario: (initial "WriteToFile" object created via a parent multithreaded process, which receives...
0
4586
by: =?Utf-8?B?YW5rMmdv?= | last post by:
Hi, Thanks in advance for reading this. Not sure where to post this question, but I hope someone in here can help. Trying to write to Event Log in VS 2005 (.NET 2.0) using Enterprise Library...
4
5640
by: | last post by:
Hi all, I want to create a method that does the following: 1) Programmatically instantiate a new XmlDataSource control 2) For each file in a named directory, make a "FileSystemItem" element 3)...
0
6974
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7183
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6852
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
4878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.