Hai
I want to create a COM in C# .Net, is it posible to create a COM in C#
Net, if how can we create a COM in C# .Net.
Regards
S.Vinodh Noel
(Bangalore) 11 1244
> I want to create a COM in C# .Net, is it posible to create a COM in C# Net, if how can we create a COM in C# .Net.
Yes, but the .NET must be installed in order to run those COM components.
"chinthaman i" <vi*********@ya hoo.com> wrote in message
news:d2******** *************** *******@localho st.talkaboutsof tware.com... Hai I want to create a COM in C# .Net, is it posible to create a COM in C# Net, if how can we create a COM in C# .Net. Regards S.Vinodh Noel (Bangalore)
Building COM components with .NET is tricky business. Components need
_strong names_ and must be placed in the GAC. After all that they won't run
on older computers. It would be great if C# could be used to make _native_
COM components. I suspect it is possible in _unsafe_ mode with a very large
amount of work.
The last time I made .NET components and exposed them to COM the app ran
very slowly. What can cause this and has the performance improved? I used
version 1.0.
David
You can create a COM wrapper with tlbexp.exe, but the code will still require
the .NET platform to run. As a shortcut regasm.exe allows you to create the
wrapper and register it.
You can also reduce the footprint of .NET with this: http://www.remotesoft.com/linker/index.html
You will still have to have parts of the Framework, however. And, I am not
sure how this bodes with Microsoft. Either way, you will have to create a COM
wrapper.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************** ************
Think Outside the Box!
*************** ************
"chinthaman i" wrote: Hai I want to create a COM in C# .Net, is it posible to create a COM in C# .Net, if how can we create a COM in C# .Net. Regards S.Vinodh Noel (Bangalore)
"apm" <Co*********@Ad sorptionProcess Modeling.com> wrote in message
news:iaVVe.7537 $nq.1127@lakere ad05... "chinthaman i" <vi*********@ya hoo.com> wrote in message news:d2******** *************** *******@localho st.talkaboutsof tware.com... Hai I want to create a COM in C# .Net, is it posible to create a COM in C# Net, if how can we create a COM in C# .Net. Regards S.Vinodh Noel (Bangalore) Building COM components with .NET is tricky business.
No, it's not. Actually it's just as simple to build COM components in .NET
than it is in VB6 f.i. The only tricky thing is to keep an eye on the
requirements imposed by COM.
Components need _strong names_ and must be placed in the GAC. After all that they won't run on older computers.
Not true, your private assemblies do't have to be signed and they don't have
to be in the GAC. Public assemblies can better be signed (but this is not
imposed), but don't have to be in the GAC either, you can register them
using the /codebase option.
It would be great if C# could be used to make _native_ COM components. I suspect it is possible in _unsafe_ mode with a very large amount of work.
C# is targetting a managed environment, building native code is not what it
was designed for, so building native COM was certainly not why .NET was
invented for, why should it, there are still tools arround to build native
COM (C++, VB6, Delphi, ...).
Building native COM using "unsafe mode" is NOT possible, unsafe doesn't mean
native.
The last time I made .NET components and exposed them to COM the app ran very slowly. What can cause this and has the performance improved? I used version 1.0.
Transitioning between managed/unmanaged code has some overhead, but when
done correctly , this overhead is negligible.
Willy.
Search msdn for EnterpriseServi ces
in MSDN
You can start here http://msdn.microsoft.com/library/de...ntoverview.asp
"chinthaman i" <vi*********@ya hoo.com> wrote in message news:d2******** *************** *******@localho st.talkaboutsof tware.com... Hai I want to create a COM in C# .Net, is it posible to create a COM in C# Net, if how can we create a COM in C# .Net. Regards S.Vinodh Noel (Bangalore) The last time I made .NET components and exposed them to COM the app ran very slowly. What can cause this and has the performance improved? I used version 1.0. Transitioning between managed/unmanaged code has some overhead, but when done correctly , this overhead is negligible.
Sometimes the overhead is negligible. Sometimes it is not negligible. It
turns out that some of the most efficient means of transfering information
among COM components is very inefficient when a COM component transfers that
information to a .NET component. Sometimes this is not important. Sometimes
it is important. Sometimes the only way to do it "correctly" involves
writting a lot of "unsafe" code.
Willy.
"apm" <Co*********@Ad sorptionProcess Modeling.com> wrote in message
news:9KiWe.8141 $nq.6715@lakere ad05...
The last time I made .NET components and exposed them to COM the app ran very slowly. What can cause this and has the performance improved? I used version 1.0.
Transitioning between managed/unmanaged code has some overhead, but when done correctly , this overhead is negligible.
Sometimes the overhead is negligible. Sometimes it is not negligible. It turns out that some of the most efficient means of transfering information among COM components is very inefficient when a COM component transfers that information to a .NET component. Sometimes this is not important. Sometimes it is important. Sometimes the only way to do it "correctly" involves writting a lot of "unsafe" code.
Unsafe code relates to the usage of pointers in C# to speed-up array
accesses, but this has nothing to do with COM interop. COM interop is fully
integrated in the CLR which takes care of parameter marshaling and interface
marshaling when cross-apartment calls are involved, and it's this marshaling
that takes time. Now, if you take care that COM objects live in the callers
apartment and if you turn-off the security checks performed when calling
into COM or from COM, the call overhead is some 30 instructions per call
(~10-15 nsec. on entry type PC ), this is what I call negligible.
Willy. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
hey all,
i wonder if it is posible to make a A:HOVER without a class defintion..
so
<a href="#" style="{color:red;};HOVER{color:blue}">test</a>
because i am sending html email in the body and the web interface filters
out the classes..
|
by: Banx |
last post by:
Hi everyone,
i'm trying to copy data from a table in Pervasive database to a table in MySQL
Does anyone know how to do it? :confused:
Is it posible to copy data from another database prog to MySQL? :confused:
Thanks for the help....
|
by: David Scemama |
last post by:
Hi,
I'm writing a program using VB.NET that needs to communicate with a DOS
Pascal program than cannot be modified. The communication channel is through
some file databases, and I have a huge problem writing VB Double values to
the file so as the Pascal program can read them as Pascal Real values.
I've managed to find the algorithm to read the Pascal Real format and
convert it to a VB Double, but I cannot figure out the opposite...
|
by: Sergei |
last post by:
Hello everybody,
I need to validate an XML document with a DTD file.
The problem is that <lang> tag is empty some times, (but it should
contain ENG,RUS,SPA...)
which causes en error later in the program. How can I catch this with
DTD validation ?
Is there a way to specify a list of posible values for a tag content ?
Or it only can be done for attributes ?
Any suggestions are greatly appreciated.
--Sergei
|
by: Grzegorz ¦lusarek |
last post by:
Hi All. One of the fields used in my form is to upload file, Is is to
posible to made this field readonly and after filling radio field set
this to use by javascript. I don't wanna give a User chance to upload
file until he check in the form that he want's to upload File.
thanks for any help
Gregor
| |
by: mtczx232 |
last post by:
it's posible that Function return byref? what the syntax?
|
by: cleelakumar |
last post by:
helloo..,
i am leela kumar.
my problem is if any file can be explor view in vb.net 1.1,
let me known if any processs,any code. plz slove the problem
hi all,
i have a small problem.Can I open file(.lwl extension file) in PrintPreviewControl in VB.Net1.1;its a posible or not.
how can i do it.
(its nothing but how do u file explorer view in vb.net1.1)
|
by: MyMarlboro |
last post by:
Is it posible to append to txt file vertically???
Example original file... (constants: A, B , C, Car, Boat)
BLANK, Car, BLANK, Boat, BLANK
BLANK, Nov07, Dec07, Nov07, Dec07
A, 1, 2, 2, 7,
B, 1, 2, 2, 7,
C, 1, 2, 2, 7,
when come to january, i wish to add the Jan 08 data (for noth car and boat respectively into the previous data), it should be adding to vertically right of the dec 07 data..
|
by: Nomen Nescio |
last post by:
hay, student proggramer 19 yrs old china in computer course
ben doing c proggraming cpl of months from pascal backgrond
enjoyying c unleashed book posible minour buggs found in
dick heathfields data structs cht
buggs not on c unleashed erata witch i looked throughly
grate book lerning lot frmo the c expertts
pg. 348
double Loading = {0};
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |