473,883 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Register a c# class

Hi,
How can I register a c# class ?

Yoav.
Sep 25 '06 #1
6 3065
register it with what? - If you mean that you cannot access the class you
have created then you may want to add a reference to the assembly that
contains the class you require..

James Jenkins
http://www.bandwidthvista.com

"Yoavo" <yo**@cimatron. co.ilwrote in message
news:O2******** *****@TK2MSFTNG P02.phx.gbl...
Hi,
How can I register a c# class ?

Yoav.

Sep 25 '06 #2
If you want to add it to the registry for use in COM the look up regasm.exe
Use regasm.exe
heres the help output for starters:

Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

Syntax: RegAsm AssemblyName [Options]
Options:
/unregister Unregister types
/tlb[:FileName] Export the assembly to the specified type library
and register it
/regfile[:FileName] Generate a reg file with the specified name
instead of registering the types. This option
cannot be used with the /u or /tlb options
/codebase Set the code base in the registry
/registered Only refer to already registered type libraries
/asmpath:Directo ry Look for assembly references here
/nologo Prevents RegAsm from displaying logo
/silent Silent mode. Prevents displaying of success messages
/verbose Displays extra information
/? or /help Display this usage message

HTH
Ciaran O'Donnell

"Yoavo" wrote:
Hi,
How can I register a c# class ?

Yoav.
Sep 25 '06 #3
I have an unmanged code in C++ (COM).
I want to write a c# class which implements the c++ interfaces.
I need that the c# class will be registered in the registry (when I build my
c# project).

"James" <ja*********@ta marsolutions.co .ukwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
register it with what? - If you mean that you cannot access the class you
have created then you may want to add a reference to the assembly that
contains the class you require..

James Jenkins
http://www.bandwidthvista.com

"Yoavo" <yo**@cimatron. co.ilwrote in message
news:O2******** *****@TK2MSFTNG P02.phx.gbl...
>Hi,
How can I register a c# class ?

Yoav.


Sep 25 '06 #4
Hi,
I used regasm, but my c# class is not shown in the registry.
what am I doing wrong ?

"Ciaran O''Donnell" <Ci************ @discussions.mi crosoft.comwrot e in
message news:C8******** *************** ***********@mic rosoft.com...
If you want to add it to the registry for use in COM the look up
regasm.exe
Use regasm.exe
heres the help output for starters:

Microsoft (R) .NET Framework Assembly Registration Utility 2.0.50727.42
Copyright (C) Microsoft Corporation 1998-2004. All rights reserved.

Syntax: RegAsm AssemblyName [Options]
Options:
/unregister Unregister types
/tlb[:FileName] Export the assembly to the specified type library
and register it
/regfile[:FileName] Generate a reg file with the specified name
instead of registering the types. This option
cannot be used with the /u or /tlb options
/codebase Set the code base in the registry
/registered Only refer to already registered type libraries
/asmpath:Directo ry Look for assembly references here
/nologo Prevents RegAsm from displaying logo
/silent Silent mode. Prevents displaying of success
messages
/verbose Displays extra information
/? or /help Display this usage message

HTH
Ciaran O'Donnell

"Yoavo" wrote:
>Hi,
How can I register a c# class ?

Yoav.

Sep 25 '06 #5
>I used regasm, but my c# class is not shown in the registry.
>what am I doing wrong ?
Where in the registry are you looking?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Sep 25 '06 #6
I am looking in HKEY_CLASSES_RO OT
But I also made a search for my class name in the entire registry, and didnt
find it anywere.

"Mattias Sjögren" <ma************ ********@mvps.o rgwrote in message
news:uX******** *****@TK2MSFTNG P06.phx.gbl...
I used regasm, but my c# class is not shown in the registry.
what am I doing wrong ?

Where in the registry are you looking?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Sep 26 '06 #7

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

Similar topics

10
15666
by: ajay | last post by:
some say floats can't be stored in register. size of int and float are same ( on some machine am i Wrong?) so if int can be delcared as register than why not float(where in and float are of same size) ? tx Ajay
14
7922
by: aruna | last post by:
What is the disadvantage of using register storage class specifier?
29
2485
by: orium69 | last post by:
hi everyone, i'm wondering if there is a way to have sure that a variable is allocated in the cache, after its declaration with "register"? Tks!
3
3357
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition from 'c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\root\1f575646\ad3a161b\assembly\dl2\57ca505e\044565c0_f84fc401\Test1.DLL' The problem is that the control is defined in two different assemblies
7
5177
by: int main(void) | last post by:
Hi all, I know that register variables work fine at block scope. I tried putting a register variable in file scope, like this, #include <stdio.h> register int a = 2; int main(void) { printf("%d\n",a);
33
3306
by: Snis Pilbor | last post by:
With the "as if" rule in play, doesn't that effectively render the "register" keyword completely useless? Example: I make a silly compiler which creates code that goes out of its way to take a full 10 minutes every time a "register" declared variable is read from or written to. Besides this lag, everything else runs as expected. Then my compiler is still C compliant, aye? If so, then it is unwise for any programmer to ever use the...
2
2109
by: raghu | last post by:
#include<stdio.h> register int i=9; int main(void) { register int i=8; int *p; p=&i; printf("%d",*p); return 0; }
26
2239
by: Vashna | last post by:
Hi Group, I have a doubt about register variables. I know that if we have a variable used very frequently in a function, then provided we never apply the & function to it, we can define it as a register variable and this will make it much faster to access. Now the question is: obviously there are only a fixed number of registers in our CPU, maybe 6 or something. So how do we choose which
1
2094
by: Kay Schluehr | last post by:
I was reading PEP 3119 (http://www.python.org/dev/peps/pep-3119/ ) and have done some experiments using Python 3.0a5. Now I'm somewhat puzzled about the purpose of the ABCMeta.register() method. One can use the register() method to register any class as a virtual subclass of any ABC. For example one can register `int` on `Iterable` and therefore it is a subclass which is confirmed in the issubclass check. What is that good for? This...
1
1583
by: Mikolai Fajer | last post by:
I have been experimenting with the abc module in py3k and thought about using the register method of an ABC as a class decorator: <code> import abc class MyABC(metaclass=abc.ABCMeta): pass @MyABC.register class MySub():
0
11157
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, 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...
0
10422
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
9586
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
7136
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
5807
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
6006
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4622
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
4229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3241
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 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...

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.