473,509 Members | 8,693 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 3057
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*************@TK2MSFTNGP02.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:Directory 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*********@tamarsolutions.co.ukwrote in message
news:%2****************@TK2MSFTNGP04.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*************@TK2MSFTNGP02.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.microsoft.comwrote in
message news:C8**********************************@microsof t.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:Directory 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_ROOT
But I also made a search for my class name in the entire registry, and didnt
find it anywere.

"Mattias Sjögren" <ma********************@mvps.orgwrote in message
news:uX*************@TK2MSFTNGP06.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
15638
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...
14
7890
by: aruna | last post by:
What is the disadvantage of using register storage class specifier?
29
2447
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
3333
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...
7
5135
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) {...
33
3236
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...
2
2093
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
2192
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...
1
2081
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. ...
1
1569
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 ...
0
7237
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,...
0
7347
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
7416
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
5062
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
4732
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
3218
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...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
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 ...
0
443
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.