[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

RegFree COM ClickOnce an PublicNotCreateable VB6 Class

Willy Van den Driessche

7/8/2007 11:24:00 PM

Hello,

I found a post in January 2006 by "Scott" titled "Reg-free COM problem".

He describes that RegFree COM doesn't work for a component written in VB6
that uses publicNotCreateable classes.
I have exactly the same problem :

I have created a VB6 testproject with a global multiuse class (GMU), a
multiuse and a publicnotcreateable (PNC). From the moment I add a member to
the PNC class, I get this error in the .NET demo project that uses the demo
VB6 component :

Error Problem isolating COM reference 'TestRegFree': Registry key
'HKEY_CLASSES_ROOT\CLSID\{22e5a51d-4f83-47e0-9b2b-54ccdc269b9b}\InProcServer
32' is missing value '(Default)'. TestRegFreeCOM

( Bot other classes don't provoke any problems)

Besides changing the class to MultiUse, is there any known solution for
solving this problem ? Can I generate the RegFree COM manifest myself (-
and How do I integrate it in visual studio 2005 ?)

(We are migrating a huge VB6 ( +- 800 KLOC) application to .NET. The
existing VB6 code will slowly move to .NET but rewriting all of it right now
is not an option)
Thanks.
Van den Driessche Willy.

(Note : this is a re-post since the previous one (from may 2007) has no
answers)

5 Answers

Egghead

7/9/2007 4:41:00 PM

0

I believe all non .Net components do not work with the ClickOnce and Smart
Client deployments because these components are not redistributable. I have
the same problem before. My solution is this:

(1) have another installation set (.msi) for all non .Net components at the
web server.
(2) have the .Net app checks the components
(3) if not there, d/l the msi and run the msi, ask the user restart the app.

I do not have the problem with the .net wrapper class at all.


--
cheers,
RL
"Willy Van den Driessche" <alfredothepistolero@hotmail.com> wrote in message
news:3AE7483E-B2A7-4E4E-B3CA-31F4259BE0AD@microsoft.com...
> Hello,
>
> I found a post in January 2006 by "Scott" titled "Reg-free COM problem".
>
> He describes that RegFree COM doesn't work for a component written in VB6
> that uses publicNotCreateable classes.
> I have exactly the same problem :
>
> I have created a VB6 testproject with a global multiuse class (GMU), a
> multiuse and a publicnotcreateable (PNC). From the moment I add a member
> to
> the PNC class, I get this error in the .NET demo project that uses the
> demo
> VB6 component :
>
> Error Problem isolating COM reference 'TestRegFree': Registry key
> 'HKEY_CLASSES_ROOT\CLSID\{22e5a51d-4f83-47e0-9b2b-54ccdc269b9b}\InProcServer
> 32' is missing value '(Default)'. TestRegFreeCOM
>
> ( Bot other classes don't provoke any problems)
>
> Besides changing the class to MultiUse, is there any known solution for
> solving this problem ? Can I generate the RegFree COM manifest myself (-
> and How do I integrate it in visual studio 2005 ?)
>
> (We are migrating a huge VB6 ( +- 800 KLOC) application to .NET. The
> existing VB6 code will slowly move to .NET but rewriting all of it right
> now is not an option)
> Thanks.
> Van den Driessche Willy.
>
> (Note : this is a re-post since the previous one (from may 2007) has no
> answers)


Willy Van den Driessche

7/9/2007 10:06:00 PM

0

Thanks for your reply

The COM components are from a huge VB6 application (there are 10 main
components and roughly 80 plugins that are installed on demand) The setups
currently use - sigh - Installshield 5 technology. Rewriting all of these
is one of the things I would like to prevent.

I think I must disagree though (on that it's not possible). There are some
examples of the combination of regfree COM and clickonce on the Microsoft
Site.
Here is one specific article I'm thinking about :
http://msdn.microsoft.com/msdnmag/issues/05/04/R...

This article gives an example of regfree COM and clickonce using an ActiveX
DLL. The example defines a public class with a public method in a VB6 DLL.
This is then used in .NET using COM interop. By making the COM component
"Isolated" in Visual studio (this automates the regfree COM stuff) they
manage to deploy the COM component via clickonce. I am extremely interested
in this solution (together with custom clickonce downloads as described in
http://www.amazon.co.uk/Smart-Client-Deployment-Clickonce-Applications/dp/...) .

Unfortunately the regFree stuff doesn't work for real-world components in
which you define more than just public classes.

As I see it the problem can be solved in two ways.
Either VB6 doesn't expose the names of PNC classes via a progID and CLSID
(after all they are not createable so neither makes much sense - the IID
does make sense though) or the regFree tool takes care of PNC classes as
generated by VB6 and therefore don't define an InProcServer for these
CLSIDS. Both technologies come from Microsoft so I guess the work is
theirs.

But thanks for your help.

"Egghead" <robertlo@NO_SHAW.CA> wrote in message
news:%235YksfkwHHA.4572@TK2MSFTNGP02.phx.gbl...
>I believe all non .Net components do not work with the ClickOnce and Smart
>Client deployments because these components are not redistributable. I have
>the same problem before. My solution is this:
>
> (1) have another installation set (.msi) for all non .Net components at
> the web server.
> (2) have the .Net app checks the components
> (3) if not there, d/l the msi and run the msi, ask the user restart the
> app.
>
> I do not have the problem with the .net wrapper class at all.
>
>
> --
> cheers,
> RL
> "Willy Van den Driessche" <alfredothepistolero@hotmail.com> wrote in
> message news:3AE7483E-B2A7-4E4E-B3CA-31F4259BE0AD@microsoft.com...
>> Hello,
>>
>> I found a post in January 2006 by "Scott" titled "Reg-free COM problem".
>>
>> He describes that RegFree COM doesn't work for a component written in VB6
>> that uses publicNotCreateable classes.
>> I have exactly the same problem :
>>
>> I have created a VB6 testproject with a global multiuse class (GMU), a
>> multiuse and a publicnotcreateable (PNC). From the moment I add a member
>> to
>> the PNC class, I get this error in the .NET demo project that uses the
>> demo
>> VB6 component :
>>
>> Error Problem isolating COM reference 'TestRegFree': Registry key
>> 'HKEY_CLASSES_ROOT\CLSID\{22e5a51d-4f83-47e0-9b2b-54ccdc269b9b}\InProcServer
>> 32' is missing value '(Default)'. TestRegFreeCOM
>>
>> ( Bot other classes don't provoke any problems)
>>
>> Besides changing the class to MultiUse, is there any known solution for
>> solving this problem ? Can I generate the RegFree COM manifest myself (-
>> and How do I integrate it in visual studio 2005 ?)
>>
>> (We are migrating a huge VB6 ( +- 800 KLOC) application to .NET. The
>> existing VB6 code will slowly move to .NET but rewriting all of it right
>> now is not an option)
>> Thanks.
>> Van den Driessche Willy.
>>
>> (Note : this is a re-post since the previous one (from may 2007) has no
>> answers)
>
>

Egghead

7/9/2007 10:21:00 PM

0

Hi here,

If you all your clients' PC are winxp, you do not need to have another msi.
Just put all the COM Dlls in the same folder as the app.exe, and make the
manifest file. Of course, it is plain to make that file manually.

--
cheers,
RL
"Willy Van den Driessche" <alfredothepistolero@hotmail.com> wrote in message
news:B425F73C-D8A7-4E50-9FAF-0E2C7E4A62E0@microsoft.com...
> Thanks for your reply
>
> The COM components are from a huge VB6 application (there are 10 main
> components and roughly 80 plugins that are installed on demand) The
> setups currently use - sigh - Installshield 5 technology. Rewriting all
> of these is one of the things I would like to prevent.
>
> I think I must disagree though (on that it's not possible). There are
> some examples of the combination of regfree COM and clickonce on the
> Microsoft Site.
> Here is one specific article I'm thinking about :
> http://msdn.microsoft.com/msdnmag/issues/05/04/R...
>
> This article gives an example of regfree COM and clickonce using an
> ActiveX DLL. The example defines a public class with a public method in a
> VB6 DLL. This is then used in .NET using COM interop. By making the COM
> component "Isolated" in Visual studio (this automates the regfree COM
> stuff) they manage to deploy the COM component via clickonce. I am
> extremely interested in this solution (together with custom clickonce
> downloads as described in
> http://www.amazon.co.uk/Smart-Client-Deployment-Clickonce-Applications/dp/...) .
>
> Unfortunately the regFree stuff doesn't work for real-world components in
> which you define more than just public classes.
>
> As I see it the problem can be solved in two ways.
> Either VB6 doesn't expose the names of PNC classes via a progID and CLSID
> (after all they are not createable so neither makes much sense - the IID
> does make sense though) or the regFree tool takes care of PNC classes as
> generated by VB6 and therefore don't define an InProcServer for these
> CLSIDS. Both technologies come from Microsoft so I guess the work is
> theirs.
>
> But thanks for your help.
>
> "Egghead" <robertlo@NO_SHAW.CA> wrote in message
> news:%235YksfkwHHA.4572@TK2MSFTNGP02.phx.gbl...
>>I believe all non .Net components do not work with the ClickOnce and Smart
>>Client deployments because these components are not redistributable. I
>>have the same problem before. My solution is this:
>>
>> (1) have another installation set (.msi) for all non .Net components at
>> the web server.
>> (2) have the .Net app checks the components
>> (3) if not there, d/l the msi and run the msi, ask the user restart the
>> app.
>>
>> I do not have the problem with the .net wrapper class at all.
>>
>>
>> --
>> cheers,
>> RL
>> "Willy Van den Driessche" <alfredothepistolero@hotmail.com> wrote in
>> message news:3AE7483E-B2A7-4E4E-B3CA-31F4259BE0AD@microsoft.com...
>>> Hello,
>>>
>>> I found a post in January 2006 by "Scott" titled "Reg-free COM problem".
>>>
>>> He describes that RegFree COM doesn't work for a component written in
>>> VB6
>>> that uses publicNotCreateable classes.
>>> I have exactly the same problem :
>>>
>>> I have created a VB6 testproject with a global multiuse class (GMU), a
>>> multiuse and a publicnotcreateable (PNC). From the moment I add a member
>>> to
>>> the PNC class, I get this error in the .NET demo project that uses the
>>> demo
>>> VB6 component :
>>>
>>> Error Problem isolating COM reference 'TestRegFree': Registry key
>>> 'HKEY_CLASSES_ROOT\CLSID\{22e5a51d-4f83-47e0-9b2b-54ccdc269b9b}\InProcServer
>>> 32' is missing value '(Default)'. TestRegFreeCOM
>>>
>>> ( Bot other classes don't provoke any problems)
>>>
>>> Besides changing the class to MultiUse, is there any known solution for
>>> solving this problem ? Can I generate the RegFree COM manifest myself (-
>>> and How do I integrate it in visual studio 2005 ?)
>>>
>>> (We are migrating a huge VB6 ( +- 800 KLOC) application to .NET. The
>>> existing VB6 code will slowly move to .NET but rewriting all of it right
>>> now is not an option)
>>> Thanks.
>>> Van den Driessche Willy.
>>>
>>> (Note : this is a re-post since the previous one (from may 2007) has no
>>> answers)
>>
>>
>


Willy Van den Driessche

7/9/2007 10:42:00 PM

0



>
> If you all your clients' PC are winxp, you do not need to have another
> msi. Just put all the COM Dlls in the same folder as the app.exe, and make
> the manifest file. Of course, it is plain to make that file manually.
>
You wouldn't by any chance have a good reference as to what exactly needs to
be in the manifest file ? I think (hope) I can use The TypeLibInfo
component to "reflect" the classes in my components.

Egghead

7/10/2007 1:59:00 PM

0

here you go

http://msdn2.microsoft.com/en-us/librar...(VS.80).aspx

--
cheers,
RL
"Willy Van den Driessche" <alfredothepistolero@hotmail.com> wrote in message
news:1FAAFB7C-C5DF-4F05-8FDE-B3A99795FE14@microsoft.com...
>
>
>>
>> If you all your clients' PC are winxp, you do not need to have another
>> msi. Just put all the COM Dlls in the same folder as the app.exe, and
>> make the manifest file. Of course, it is plain to make that file
>> manually.
>>
> You wouldn't by any chance have a good reference as to what exactly needs
> to be in the manifest file ? I think (hope) I can use The TypeLibInfo
> component to "reflect" the classes in my components.