473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using C# dll as COM in an MFC application

Hello,
I have written a C# dll in VS2005.
One interface and class are exported using Interop Services.
I want to use this c# dll in my MFC application, using VS2003.
It compiles after I imported the dll to my MFC app.
On runtime I get class not registered HR error in my MFC project.

I use the code as follow:
_NewActivationPtr myActivation = NULL;

HRESULT hr = myActivation.CreateInstance(__uuidof(NewSupernaAct ivation));

I don't what to do.

Do I have to use GACUtil to register?

If I want to use GACUtil do I have to sign my project?

Trying do it had failed, because my third party library I'm using in my C#
dll is not signed (so if I choose to sign my project, there is a compilation
error, caused because the 3rd party library is not signed, I guess).

Please help,

Thanks,

Janiv Ratson.
Aug 17 '06 #1
17 6232
"Janiv Ratson" <janivr@gmailcomwrote in message
news:uE**************@TK2MSFTNGP03.phx.gbl...
I have written a C# dll in VS2005.
One interface and class are exported using Interop Services.
I want to use this c# dll in my MFC application, using VS2003.
It compiles after I imported the dll to my MFC app.
On runtime I get class not registered HR error in my MFC project.
I'm not sure if it will help, but I posted a step-by-step example of using a
managed assembly as a COM object from native code here:

http://groups.google.com/group/micro...153307ba483255

Regards,
Will
Aug 17 '06 #2
Hi,
In addition to DePalo post take a look at the latest number of MSDN
magazine, it has one article about that precise subject.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Janiv Ratson" <janivr@gmailcomwrote in message
news:uE**************@TK2MSFTNGP03.phx.gbl...
Hello,
I have written a C# dll in VS2005.
One interface and class are exported using Interop Services.
I want to use this c# dll in my MFC application, using VS2003.
It compiles after I imported the dll to my MFC app.
On runtime I get class not registered HR error in my MFC project.

I use the code as follow:
_NewActivationPtr myActivation = NULL;

HRESULT hr = myActivation.CreateInstance(__uuidof(NewSupernaAct ivation));

I don't what to do.

Do I have to use GACUtil to register?

If I want to use GACUtil do I have to sign my project?

Trying do it had failed, because my third party library I'm using in my C#
dll is not signed (so if I choose to sign my project, there is a
compilation error, caused because the 3rd party library is not signed, I
guess).

Please help,

Thanks,

Janiv Ratson.


Aug 17 '06 #3
Janiv,

Did you check the registry to make sure that the COM interfaces were
actually registered?

Run Regedit.exe and then search on NewSupernaActivation or the name of your
DLL. If you don't find it then it's not registered and that is your problem.
You'll need to run regasm.exe to register the DLL.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net
Aug 17 '06 #4
Did you RegAsm the Assembly? Importing may register only the type library.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:uE**************@TK2MSFTNGP03.phx.gbl...
Hello,
I have written a C# dll in VS2005.
One interface and class are exported using Interop Services.
I want to use this c# dll in my MFC application, using VS2003.
It compiles after I imported the dll to my MFC app.
On runtime I get class not registered HR error in my MFC project.

I use the code as follow:
_NewActivationPtr myActivation = NULL;

HRESULT hr = myActivation.CreateInstance(__uuidof(NewSupernaAct ivation));

I don't what to do.

Do I have to use GACUtil to register?

If I want to use GACUtil do I have to sign my project?

Trying do it had failed, because my third party library I'm using in my C#
dll is not signed (so if I choose to sign my project, there is a
compilation error, caused because the 3rd party library is not signed, I
guess).

Please help,

Thanks,

Janiv Ratson.


Aug 17 '06 #5
Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:69**********************************@microsof t.com...
Janiv,

Did you check the registry to make sure that the COM interfaces were
actually registered?

Run Regedit.exe and then search on NewSupernaActivation or the name of
your
DLL. If you don't find it then it's not registered and that is your
problem.
You'll need to run regasm.exe to register the DLL.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net


Aug 20 '06 #6
Did you try RegAsm /Codebase.

Eventuall POST the registry Settings under the CLSID here for inspection.
You can check yourself if there are multiple keys below InprocServer32 of
your component. If so remove the CLSID entry of your component, make sure
that the assembly version in AssemblyInfo.cs does not use auto-increment
(1.0.0.1 instead of the VS.NET 2003 default 1.0.*) and RegAsm /Codebase the
assembly again.

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:69**********************************@microsof t.com...
>Janiv,

Did you check the registry to make sure that the COM interfaces were
actually registered?

Run Regedit.exe and then search on NewSupernaActivation or the name of
your
DLL. If you don't find it then it's not registered and that is your
problem.
You'll need to run regasm.exe to register the DLL.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net



Aug 20 '06 #7
Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de...
Did you try RegAsm /Codebase.

Eventuall POST the registry Settings under the CLSID here for inspection.
You can check yourself if there are multiple keys below InprocServer32 of
your component. If so remove the CLSID entry of your component, make sure
that the assembly version in AssemblyInfo.cs does not use auto-increment
(1.0.0.1 instead of the VS.NET 2003 default 1.0.*) and RegAsm /Codebase
the assembly again.

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
>Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:69**********************************@microso ft.com...
>>Janiv,

Did you check the registry to make sure that the COM interfaces were
actually registered?

Run Regedit.exe and then search on NewSupernaActivation or the name of
your
DLL. If you don't find it then it's not registered and that is your
problem.
You'll need to run regasm.exe to register the DLL.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net




Aug 20 '06 #8
Are you sure? I thought that this message is only a warning.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase
can ca...
use your assembly to interfere with other applications that may be installed
on
the same computer. The /codebase switch is intended to be used only with
signed
assemblies. Please give your assembly a strong name and re-register it.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl...
Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be
signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de...
>Did you try RegAsm /Codebase.

Eventuall POST the registry Settings under the CLSID here for inspection.
You can check yourself if there are multiple keys below InprocServer32 of
your component. If so remove the CLSID entry of your component, make sure
that the assembly version in AssemblyInfo.cs does not use auto-increment
(1.0.0.1 instead of the VS.NET 2003 default 1.0.*) and RegAsm /Codebase
the assembly again.

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
>>Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:69**********************************@micros oft.com...
Janiv,

Did you check the registry to make sure that the COM interfaces were
actually registered?

Run Regedit.exe and then search on NewSupernaActivation or the name of
your
DLL. If you don't find it then it's not registered and that is your
problem.
You'll need to run regasm.exe to register the DLL.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net




Aug 20 '06 #9
Is it a warning we can live with ?
Thanks,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de...
Are you sure? I thought that this message is only a warning.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase
can ca...
use your assembly to interfere with other applications that may be
installed on
the same computer. The /codebase switch is intended to be used only with
signed
assemblies. Please give your assembly a strong name and re-register it.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl...
>Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be
signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de.. .
>>Did you try RegAsm /Codebase.

Eventuall POST the registry Settings under the CLSID here for
inspection. You can check yourself if there are multiple keys below
InprocServer32 of your component. If so remove the CLSID entry of your
component, make sure that the assembly version in AssemblyInfo.cs does
not use auto-increment (1.0.0.1 instead of the VS.NET 2003 default
1.0.*) and RegAsm /Codebase the assembly again.

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:69**********************************@micro soft.com...
Janiv,
>
Did you check the registry to make sure that the COM interfaces were
actually registered?
>
Run Regedit.exe and then search on NewSupernaActivation or the name of
your
DLL. If you don't find it then it's not registered and that is your
problem.
You'll need to run regasm.exe to register the DLL.
>
Kim
>
--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net
>
>




Aug 20 '06 #10
Well - your choice, finally. In this special case: using a strongly names
assembly makes sure that no one tamperes with it. And registering something
as COM open wide access to the component on the system - no way for further
security verifications the assembly will have full trust. Personally (not
more) I can think there are scenarios where you can live with it. Yes,
indeed you losse .NET / CLR security but if someone is able to replace a DLL
on a system in most (s)he can choose to patch the registration to a modified
DLL anyway.

No more help to expect from this side, sorry :-) But actually: does it work
after the RegAsm /Codebase?

Bye

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
Is it a warning we can live with ?
Thanks,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de...
>Are you sure? I thought that this message is only a warning.

RegAsm : warning RA0000 : Registering an unsigned assembly with /codebase
can ca...
use your assembly to interfere with other applications that may be
installed on
the same computer. The /codebase switch is intended to be used only with
signed
assemblies. Please give your assembly a strong name and re-register it.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl...
>>Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be
signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de. ..
Did you try RegAsm /Codebase.

Eventuall POST the registry Settings under the CLSID here for
inspection. You can check yourself if there are multiple keys below
InprocServer32 of your component. If so remove the CLSID entry of your
component, make sure that the assembly version in AssemblyInfo.cs does
not use auto-increment (1.0.0.1 instead of the VS.NET 2003 default
1.0.*) and RegAsm /Codebase the assembly again.

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
Hello all and thanks for your help.
I have registered my dll using regasm.exe.
I can find the NewSupernaActivation in the registry under CLSID.
Still I get Class not registered in my code.
Please help.
Thanks,
Janiv Ratson.
>
"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
message news:69**********************************@microsof t.com...
>Janiv,
>>
>Did you check the registry to make sure that the COM interfaces were
>actually registered?
>>
>Run Regedit.exe and then search on NewSupernaActivation or the name
>of your
>DLL. If you don't find it then it's not registered and that is your
>problem.
>You'll need to run regasm.exe to register the DLL.
>>
>Kim
>>
>--
>digipede - Many legs make light work.
>Grid computing for the real world.
>http://www.digipede.net
>http://krgreenlee.blogspot.net
>>
>>
>
>




Aug 20 '06 #11
Yes it works.
Thanks,
J.
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de...
Well - your choice, finally. In this special case: using a strongly names
assembly makes sure that no one tamperes with it. And registering
something as COM open wide access to the component on the system - no way
for further security verifications the assembly will have full trust.
Personally (not more) I can think there are scenarios where you can live
with it. Yes, indeed you losse .NET / CLR security but if someone is able
to replace a DLL on a system in most (s)he can choose to patch the
registration to a modified DLL anyway.

No more help to expect from this side, sorry :-) But actually: does it
work after the RegAsm /Codebase?

Bye

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
>Is it a warning we can live with ?
Thanks,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de. ..
>>Are you sure? I thought that this message is only a warning.

RegAsm : warning RA0000 : Registering an unsigned assembly with
/codebase can ca...
use your assembly to interfere with other applications that may be
installed on
the same computer. The /codebase switch is intended to be used only with
signed
assemblies. Please give your assembly a strong name and re-register it.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl.. .
Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be
signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de.. .
Did you try RegAsm /Codebase.
>
Eventuall POST the registry Settings under the CLSID here for
inspection. You can check yourself if there are multiple keys below
InprocServer32 of your component. If so remove the CLSID entry of your
component, make sure that the assembly version in AssemblyInfo.cs does
not use auto-increment (1.0.0.1 instead of the VS.NET 2003 default
1.0.*) and RegAsm /Codebase the assembly again.
>
Jochen
>
"Janiv Ratson" <janivr@gmailcomwrote in message
news:u6*************@TK2MSFTNGP06.phx.gbl...
>Hello all and thanks for your help.
>I have registered my dll using regasm.exe.
>I can find the NewSupernaActivation in the registry under CLSID.
>Still I get Class not registered in my code.
>Please help.
>Thanks,
>Janiv Ratson.
>>
>"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
>message news:69**********************************@microsof t.com...
>>Janiv,
>>>
>>Did you check the registry to make sure that the COM interfaces were
>>actually registered?
>>>
>>Run Regedit.exe and then search on NewSupernaActivation or the name
>>of your
>>DLL. If you don't find it then it's not registered and that is your
>>problem.
>>You'll need to run regasm.exe to register the DLL.
>>>
>>Kim
>>>
>>--
>>digipede - Many legs make light work.
>>Grid computing for the real world.
>>http://www.digipede.net
>>http://krgreenlee.blogspot.net
>>>
>>>
>>
>>
>
>




Aug 20 '06 #12
Hi,
It is now created but could not run due to "Could not load file or assembly
'3rd party assembly' exception.
I guess I haven't completed the action as required.
Any ideas?
Thanks.
J.
"Janiv Ratson" <janivr@gmailcomwrote in message
news:e8**************@TK2MSFTNGP02.phx.gbl...
Yes it works.
Thanks,
J.
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de...
>Well - your choice, finally. In this special case: using a strongly names
assembly makes sure that no one tamperes with it. And registering
something as COM open wide access to the component on the system - no way
for further security verifications the assembly will have full trust.
Personally (not more) I can think there are scenarios where you can live
with it. Yes, indeed you losse .NET / CLR security but if someone is able
to replace a DLL on a system in most (s)he can choose to patch the
registration to a modified DLL anyway.

No more help to expect from this side, sorry :-) But actually: does it
work after the RegAsm /Codebase?

Bye

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
>>Is it a warning we can live with ?
Thanks,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de.. .
Are you sure? I thought that this message is only a warning.

RegAsm : warning RA0000 : Registering an unsigned assembly with
/codebase can ca...
use your assembly to interfere with other applications that may be
installed on
the same computer. The /codebase switch is intended to be used only
with signed
assemblies. Please give your assembly a strong name and re-register it.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl. ..
Hello Dr. Manns and all,
In order to regasm my dll using /code base, I need my assembly to be
signed.
Hoever, my assembly uses 3rd party assembly, which is not signed, and
therefor I my assembly cannot be signed.
Is there any other solution?
Thanks a lot,
Janiv Ratson.
>
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de. ..
>Did you try RegAsm /Codebase.
>>
>Eventuall POST the registry Settings under the CLSID here for
>inspection. You can check yourself if there are multiple keys below
>InprocServer32 of your component. If so remove the CLSID entry of
>your component, make sure that the assembly version in
>AssemblyInfo.cs does not use auto-increment (1.0.0.1 instead of the
>VS.NET 2003 default 1.0.*) and RegAsm /Codebase the assembly again.
>>
>Jochen
>>
>"Janiv Ratson" <janivr@gmailcomwrote in message
>news:u6*************@TK2MSFTNGP06.phx.gbl.. .
>>Hello all and thanks for your help.
>>I have registered my dll using regasm.exe.
>>I can find the NewSupernaActivation in the registry under CLSID.
>>Still I get Class not registered in my code.
>>Please help.
>>Thanks,
>>Janiv Ratson.
>>>
>>"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
>>message news:69**********************************@microsof t.com...
>>>Janiv,
>>>>
>>>Did you check the registry to make sure that the COM interfaces
>>>were
>>>actually registered?
>>>>
>>>Run Regedit.exe and then search on NewSupernaActivation or the name
>>>of your
>>>DLL. If you don't find it then it's not registered and that is
>>>your problem.
>>>You'll need to run regasm.exe to register the DLL.
>>>>
>>>Kim
>>>>
>>>--
>>>digipede - Many legs make light work.
>>>Grid computing for the real world.
>>>http://www.digipede.net
>>>http://krgreenlee.blogspot.net
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Aug 20 '06 #13
Hmm, hope that this is not a .NET 2.0 security feature which correlates with
the RegAsm warning.

Check InProgServer32 Codebase and make sure, that all required files are in
this directory. Eventually (?) the assembly requires more legacy (win32)
DLLs in this directory or the system search path.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:eu**************@TK2MSFTNGP02.phx.gbl...
Hi,
It is now created but could not run due to "Could not load file or
assembly '3rd party assembly' exception.
I guess I haven't completed the action as required.
Any ideas?
Thanks.
J.
"Janiv Ratson" <janivr@gmailcomwrote in message
news:e8**************@TK2MSFTNGP02.phx.gbl...
>Yes it works.
Thanks,
J.
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de. ..
>>Well - your choice, finally. In this special case: using a strongly
names assembly makes sure that no one tamperes with it. And registering
something as COM open wide access to the component on the system - no
way for further security verifications the assembly will have full
trust. Personally (not more) I can think there are scenarios where you
can live with it. Yes, indeed you losse .NET / CLR security but if
someone is able to replace a DLL on a system in most (s)he can choose to
patch the registration to a modified DLL anyway.

No more help to expect from this side, sorry :-) But actually: does it
work after the RegAsm /Codebase?

Bye

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
Is it a warning we can live with ?
Thanks,
Janiv Ratson.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de. ..
Are you sure? I thought that this message is only a warning.
>
RegAsm : warning RA0000 : Registering an unsigned assembly with
/codebase can ca...
use your assembly to interfere with other applications that may be
installed on
the same computer. The /codebase switch is intended to be used only
with signed
assemblies. Please give your assembly a strong name and re-register
it.
>
"Janiv Ratson" <janivr@gmailcomwrote in message
news:ud****************@TK2MSFTNGP04.phx.gbl.. .
>Hello Dr. Manns and all,
>In order to regasm my dll using /code base, I need my assembly to be
>signed.
>Hoever, my assembly uses 3rd party assembly, which is not signed, and
>therefor I my assembly cannot be signed.
>Is there any other solution?
>Thanks a lot,
>Janiv Ratson.
>>
>"Dr. Jochen Manns" <de***@psimarron.netwrote in message
>news:44**********************@news.freenet.de ...
>>Did you try RegAsm /Codebase.
>>>
>>Eventuall POST the registry Settings under the CLSID here for
>>inspection. You can check yourself if there are multiple keys below
>>InprocServer32 of your component. If so remove the CLSID entry of
>>your component, make sure that the assembly version in
>>AssemblyInfo.cs does not use auto-increment (1.0.0.1 instead of the
>>VS.NET 2003 default 1.0.*) and RegAsm /Codebase the assembly again.
>>>
>>Jochen
>>>
>>"Janiv Ratson" <janivr@gmailcomwrote in message
>>news:u6*************@TK2MSFTNGP06.phx.gbl. ..
>>>Hello all and thanks for your help.
>>>I have registered my dll using regasm.exe.
>>>I can find the NewSupernaActivation in the registry under CLSID.
>>>Still I get Class not registered in my code.
>>>Please help.
>>>Thanks,
>>>Janiv Ratson.
>>>>
>>>"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
>>>message news:69**********************************@microsof t.com...
>>>>Janiv,
>>>>>
>>>>Did you check the registry to make sure that the COM interfaces
>>>>were
>>>>actually registered?
>>>>>
>>>>Run Regedit.exe and then search on NewSupernaActivation or the
>>>>name of your
>>>>DLL. If you don't find it then it's not registered and that is
>>>>your problem.
>>>>You'll need to run regasm.exe to register the DLL.
>>>>>
>>>>Kim
>>>>>
>>>>--
>>>>digipede - Many legs make light work.
>>>>Grid computing for the real world.
>>>>http://www.digipede.net
>>>>http://krgreenlee.blogspot.net
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Aug 20 '06 #14
How do I use InProgServer32 ?
All required files are in the same folder.
Thanks.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de...
Hmm, hope that this is not a .NET 2.0 security feature which correlates
with the RegAsm warning.

Check InProgServer32 Codebase and make sure, that all required files are
in this directory. Eventually (?) the assembly requires more legacy
(win32) DLLs in this directory or the system search path.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:eu**************@TK2MSFTNGP02.phx.gbl...
>Hi,
It is now created but could not run due to "Could not load file or
assembly '3rd party assembly' exception.
I guess I haven't completed the action as required.
Any ideas?
Thanks.
J.
"Janiv Ratson" <janivr@gmailcomwrote in message
news:e8**************@TK2MSFTNGP02.phx.gbl...
>>Yes it works.
Thanks,
J.
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de.. .
Well - your choice, finally. In this special case: using a strongly
names assembly makes sure that no one tamperes with it. And registering
something as COM open wide access to the component on the system - no
way for further security verifications the assembly will have full
trust. Personally (not more) I can think there are scenarios where you
can live with it. Yes, indeed you losse .NET / CLR security but if
someone is able to replace a DLL on a system in most (s)he can choose
to patch the registration to a modified DLL anyway.

No more help to expect from this side, sorry :-) But actually: does it
work after the RegAsm /Codebase?

Bye

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl...
Is it a warning we can live with ?
Thanks,
Janiv Ratson.
>
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de ...
>Are you sure? I thought that this message is only a warning.
>>
>RegAsm : warning RA0000 : Registering an unsigned assembly with
>/codebase can ca...
>use your assembly to interfere with other applications that may be
>installed on
>the same computer. The /codebase switch is intended to be used only
>with signed
>assemblies. Please give your assembly a strong name and re-register
>it.
>>
>"Janiv Ratson" <janivr@gmailcomwrote in message
>news:ud****************@TK2MSFTNGP04.phx.gbl. ..
>>Hello Dr. Manns and all,
>>In order to regasm my dll using /code base, I need my assembly to be
>>signed.
>>Hoever, my assembly uses 3rd party assembly, which is not signed,
>>and therefor I my assembly cannot be signed.
>>Is there any other solution?
>>Thanks a lot,
>>Janiv Ratson.
>>>
>>"Dr. Jochen Manns" <de***@psimarron.netwrote in message
>>news:44**********************@news.freenet.d e...
>>>Did you try RegAsm /Codebase.
>>>>
>>>Eventuall POST the registry Settings under the CLSID here for
>>>inspection. You can check yourself if there are multiple keys below
>>>InprocServer32 of your component. If so remove the CLSID entry of
>>>your component, make sure that the assembly version in
>>>AssemblyInfo.cs does not use auto-increment (1.0.0.1 instead of the
>>>VS.NET 2003 default 1.0.*) and RegAsm /Codebase the assembly again.
>>>>
>>>Jochen
>>>>
>>>"Janiv Ratson" <janivr@gmailcomwrote in message
>>>news:u6*************@TK2MSFTNGP06.phx.gbl.. .
>>>>Hello all and thanks for your help.
>>>>I have registered my dll using regasm.exe.
>>>>I can find the NewSupernaActivation in the registry under CLSID.
>>>>Still I get Class not registered in my code.
>>>>Please help.
>>>>Thanks,
>>>>Janiv Ratson.
>>>>>
>>>>"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
>>>>message news:69**********************************@microsof t.com...
>>>>>Janiv,
>>>>>>
>>>>>Did you check the registry to make sure that the COM interfaces
>>>>>were
>>>>>actually registered?
>>>>>>
>>>>>Run Regedit.exe and then search on NewSupernaActivation or the
>>>>>name of your
>>>>>DLL. If you don't find it then it's not registered and that is
>>>>>your problem.
>>>>>You'll need to run regasm.exe to register the DLL.
>>>>>>
>>>>>Kim
>>>>>>
>>>>>--
>>>>>digipede - Many legs make light work.
>>>>>Grid computing for the real world.
>>>>>http://www.digipede.net
>>>>>http://krgreenlee.blogspot.net
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Aug 20 '06 #15
Sorry, I ment InprocServer32 in the Registry and there the CodeBase value.

When exactly is the load error reported? If you attach a debugger do you get
any more detailled error (output/trace window or inner exception)? Can you
activate the fusion log to find out which locations have been scanned for
the assembly (debugger should automatically report this - I think).

Jochen

"Janiv Ratson" <janivr@gmailcomwrote in message
news:uF**************@TK2MSFTNGP03.phx.gbl...
How do I use InProgServer32 ?
All required files are in the same folder.
Thanks.

"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44**********************@news.freenet.de...
>Hmm, hope that this is not a .NET 2.0 security feature which correlates
with the RegAsm warning.

Check InProgServer32 Codebase and make sure, that all required files are
in this directory. Eventually (?) the assembly requires more legacy
(win32) DLLs in this directory or the system search path.

"Janiv Ratson" <janivr@gmailcomwrote in message
news:eu**************@TK2MSFTNGP02.phx.gbl...
>>Hi,
It is now created but could not run due to "Could not load file or
assembly '3rd party assembly' exception.
I guess I haven't completed the action as required.
Any ideas?
Thanks.
J.
"Janiv Ratson" <janivr@gmailcomwrote in message
news:e8**************@TK2MSFTNGP02.phx.gbl...
Yes it works.
Thanks,
J.
"Dr. Jochen Manns" <de***@psimarron.netwrote in message
news:44***********************@news.freenet.de. ..
Well - your choice, finally. In this special case: using a strongly
names assembly makes sure that no one tamperes with it. And
registering something as COM open wide access to the component on the
system - no way for further security verifications the assembly will
have full trust. Personally (not more) I can think there are scenarios
where you can live with it. Yes, indeed you losse .NET / CLR security
but if someone is able to replace a DLL on a system in most (s)he can
choose to patch the registration to a modified DLL anyway.
>
No more help to expect from this side, sorry :-) But actually: does it
work after the RegAsm /Codebase?
>
Bye
>
Jochen
>
"Janiv Ratson" <janivr@gmailcomwrote in message
news:OG**************@TK2MSFTNGP04.phx.gbl.. .
>Is it a warning we can live with ?
>Thanks,
>Janiv Ratson.
>>
>"Dr. Jochen Manns" <de***@psimarron.netwrote in message
>news:44***********************@news.freenet.d e...
>>Are you sure? I thought that this message is only a warning.
>>>
>>RegAsm : warning RA0000 : Registering an unsigned assembly with
>>/codebase can ca...
>>use your assembly to interfere with other applications that may be
>>installed on
>>the same computer. The /codebase switch is intended to be used only
>>with signed
>>assemblies. Please give your assembly a strong name and re-register
>>it.
>>>
>>"Janiv Ratson" <janivr@gmailcomwrote in message
>>news:ud****************@TK2MSFTNGP04.phx.gbl ...
>>>Hello Dr. Manns and all,
>>>In order to regasm my dll using /code base, I need my assembly to
>>>be signed.
>>>Hoever, my assembly uses 3rd party assembly, which is not signed,
>>>and therefor I my assembly cannot be signed.
>>>Is there any other solution?
>>>Thanks a lot,
>>>Janiv Ratson.
>>>>
>>>"Dr. Jochen Manns" <de***@psimarron.netwrote in message
>>>news:44**********************@news.freenet. de...
>>>>Did you try RegAsm /Codebase.
>>>>>
>>>>Eventuall POST the registry Settings under the CLSID here for
>>>>inspection. You can check yourself if there are multiple keys
>>>>below InprocServer32 of your component. If so remove the CLSID
>>>>entry of your component, make sure that the assembly version in
>>>>AssemblyInfo.cs does not use auto-increment (1.0.0.1 instead of
>>>>the VS.NET 2003 default 1.0.*) and RegAsm /Codebase the assembly
>>>>again.
>>>>>
>>>>Jochen
>>>>>
>>>>"Janiv Ratson" <janivr@gmailcomwrote in message
>>>>news:u6*************@TK2MSFTNGP06.phx.gbl. ..
>>>>>Hello all and thanks for your help.
>>>>>I have registered my dll using regasm.exe.
>>>>>I can find the NewSupernaActivation in the registry under CLSID.
>>>>>Still I get Class not registered in my code.
>>>>>Please help.
>>>>>Thanks,
>>>>>Janiv Ratson.
>>>>>>
>>>>>"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in
>>>>>message
>>>>>news:69********************************** @microsoft.com...
>>>>>>Janiv,
>>>>>>>
>>>>>>Did you check the registry to make sure that the COM interfaces
>>>>>>were
>>>>>>actually registered?
>>>>>>>
>>>>>>Run Regedit.exe and then search on NewSupernaActivation or the
>>>>>>name of your
>>>>>>DLL. If you don't find it then it's not registered and that is
>>>>>>your problem.
>>>>>>You'll need to run regasm.exe to register the DLL.
>>>>>>>
>>>>>>Kim
>>>>>>>
>>>>>>--
>>>>>>digipede - Many legs make light work.
>>>>>>Grid computing for the real world.
>>>>>>http://www.digipede.net
>>>>>>http://krgreenlee.blogspot.net
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>




Aug 20 '06 #16
Janiv,

It sounds like your DLL is registered. The next thing I would look at are
dependencies. You can use Depends.exe usually found as a tool in the
C:\program files\Microsoft Visual Studio 8\Common7\Tools\bin if you are using
VS2005.

Start Depends and then open your DLL, make sure that everything that your
DLL needs to execute is available AND properly registered. If Depends can't
find a dependency it should show up in Red.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net

Aug 21 '06 #17
But I think this will not show up late binding .NET Interop Dependencies
(DllImportAttribute).

"Kim Greenlee" <Ki*********@discussions.microsoft.comwrote in message
news:21**********************************@microsof t.com...
Janiv,

It sounds like your DLL is registered. The next thing I would look at are
dependencies. You can use Depends.exe usually found as a tool in the
C:\program files\Microsoft Visual Studio 8\Common7\Tools\bin if you are
using
VS2005.

Start Depends and then open your DLL, make sure that everything that your
DLL needs to execute is available AND properly registered. If Depends
can't
find a dependency it should show up in Red.

Kim

--
digipede - Many legs make light work.
Grid computing for the real world.
http://www.digipede.net
http://krgreenlee.blogspot.net

Aug 21 '06 #18

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

Similar topics

11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
12
by: Charlie | last post by:
Hi: My host will not allow me use a trusted connection or make registry setting, so I'm stuck trying find a way to hide connection string which will be stored in web.config file. If I encrypt...
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
5
by: Mike in Santa Rosa | last post by:
I'm trying to get a simple c# app built that can launch/manipulate an excel workbook, sheet. I've chased down several examples and can't any of them to work. So I must be doing somethnig obviouslt...
1
by: Screenbert | last post by:
After finding nothing anywhere in google I am posting this so everyone can benefit by it. The formating is not pretty since I copied it from my word document, but you should benefit by it. ...
0
by: screenbert | last post by:
Managing DHCP Servers using C# They said it was impossible. It couldn't be done. But you can in fact manage DHCP servers using C#. This includes creating and deleting Scopes, SuperScopes,...
8
by: inpuarg | last post by:
I 'm developing a c# (.net 2.0) windows forms application and in this application i want to connect to a java servlet page (HTTPS) (which is servlet 2.4 and which may be using Web Based SSO Sun...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi all, I have a publishing Click Once of my application. Now I want create new version of my application for modify some files, like app.config.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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...

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.