473,803 Members | 3,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COM+ using Component Designer?

Hi all!

I've been playing a bit with Component Designer in Visual Studio.NET. Seems
to me like a great way to build simple data access components using "point
and click". However I can't figure out how to make a component made this way
into a component with transactional support which can be put into COM+.

The class which is Component Designer ends up with inhertits from
System.Componen tMode.Component . I understand that a class which will run
under COM+ has to inherit from ServicedCompone nt. Well, it can't inherit
from both. And I'd like to avoid mass coding of wrappers and things like
that.

Could someone point me a way to a simplest way to make a
ComponentModel. Component into an ServicedCompone nt?

Thanks in advance

Rafael
Nov 15 '05 #1
1 1432
Raffe,
I've been playing a bit with Component Designer in Visual Studio.NET. Seems to me like a great way to build simple data access components using "point
and click". However I can't figure out how to make a component made this way into a component with transactional support which can be put into COM+.

The class which is Component Designer ends up with inhertits from
System.Componen tMode.Component . I understand that a class which will run
under COM+ has to inherit from ServicedCompone nt. Well, it can't inherit
from both. And I'd like to avoid mass coding of wrappers and things like
that.

Could someone point me a way to a simplest way to make a
ComponentModel. Component into an ServicedCompone nt?
The short of it is: you can't.

One thing to note is that what the VS.NET IDE and the framewor call
"components " usually refer to classes deriving from
System.Componen tModel.Componen t, which are basically classes that support
the IDE designer facilities. ServicedCompone nts, on the other hand, have
nothing at all to do with this.

One great conflict thus arises: both kinds require you to inherit from a
base class (either Component, or ServicedCompone nt), which are not related.
So it means that at this point, you need to choose between them and can't
combine them.

If you'd like to keep using the designer facilities, I'd suggest creating
your component as you are now, and then wrapping it into a
ServicedCompone nt-derived class.

--
Tomas Restrepo
to****@mvps.org
Thanks in advance

Rafael

Nov 15 '05 #2

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

Similar topics

0
1506
by: gman997 | last post by:
Hi all, At a high level here is what is going on -- I built a C# COM object. I need to call this com object from SQL Server using the sp_OACreate stored procedure in SQL Server. I build the COM object, register it using regasm, but when I try to call it in SQL Server I get the following error message - "0x80070002 Extended Procedure The system cannot find the file specified." I have tried registering the DLL with regsvr32 and that returns...
4
8504
by: gman997 | last post by:
Hi all, At a high level here is what is going on -- I built a C# COM object. I need to call this com object from SQL Server using the sp_OACreate stored procedure in SQL Server. I build the COM object, register it using regasm, but when I try to call it in SQL Server I get the following error message - "0x80070002 Extended Procedure The system cannot find the file specified." I have tried registering the DLL with regsvr32 and that returns...
26
4504
by: Lasse Edsvik | last post by:
Hello I'm trying to build a simple COM+ app in vs.net using C# and i cant register it in component manager..... what more is needed than this: using System; using System.EnterpriseServices;
1
1813
by: Hyun Chang Lee | last post by:
I have created a 'smart device appication" project. (C#) and added a component class. I expected the component designer shows, but I couldn't see. And there is no menu item like 'view designer' in the context menu in the solution explorer. In a windows application project, VS showed me the compoent designer, when I added a component class with the exactly same source code. (copy & paste)
2
1762
by: Edward Diener | last post by:
How does one specify in a component that a property is a pointer to another component ? How is this different from a property that is actually an embedded component ? Finally how is one notified in a component when another component is destroyed ? I have a managed component called P. Let us say that C is another managed component. If on P I have: __property C * get_CComp(); __property void set_CComp(C *);
6
4303
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone explain to me why I need to call DoEvents when I am using a COM component that calls back to into the ..Net application? - If I don't call DoEvents after receiving a callback then sometimes no more messages are pumped, it appears that the message...
0
1047
by: roberto | last post by:
I try to add a textbox from code of my custom component laid on the web form. It appears in the code behind but not in the designer; moreover when I switch from design to html view it gets removed from the code-behind. What interesting: when (by mistake) I tried to add Windows TextBox the code added it to the component section of the designer (so "almost" desired behaviour...) Any ideas, please? The code is based on MSDN example of...
6
9862
by: M O J O | last post by:
Hi, How do I check if an ErrorProvider has errors? Take for example this code... (err = ErrorProvider...) Public Sub Test If TextBox1.Text= "" Then
8
1270
by: John Granade | last post by:
I'm sure this has been asked but after searching the Internet, I just can find a clear answer. When should you add a component versus a class to you Windows Forms application? The timer is a good example. I'm planning to add a customer system.timer to run that should be accessible from several forms so I don't want to use the forms timer. Should I add this to a new class or new component? Thanks,
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10292
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6841
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5498
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.