Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Re: Interop Forms Toolkit - how to determine if worked

Reply
 
Old 11-24-2008   #1 (permalink)
Kevin.M.Jonas


 
 

Re: Interop Forms Toolkit - how to determine if worked

This question has started an interesting conversation. I suppose it
is a COM and .NET question so I will also post this in the
dotnet.general group. The Interop Forms Toolkit allows you to wrap
a .NET assembly as a COM object. So instead of rewriting an entire
program to .NET you can create an upgrade path that slowly changes it
from VB6 to .NET.

Now I am now trying to find out two things.
1) How to determine if a COM wrapper is registered.
2) On a client computer why regasm is giving an access denied error
when logged in as Administrator.

So I have a .NET assembly, let's call it dotnet.dll. I have a
wrapper, let's say it is called wrapper.dll. The program that is
accessing the wrapper.dll is written in VB6. In development
environment it automatically registers things properly. The installer
automatically did some stuff so they are registered correctly. As I
understand it the wrapper.dll is registered with mscorlib somehow and
I am not completely sure about the dotnet.dll.

I asked in this group because if anyone has experience with this it
would be VB6 developers as they are migrating to .NET.


On Nov 20, 5:31*pm, Kevin.M.Jo...@xxxxxx wrote:
Quote:

> I am using the Visual Basic Interop Forms Toolkit to help with
> migrating form VB to .NET. *I think my problem is related to this. *I
> have a client that when the form with the Interop control is displayed
> it fails with a Run-time 372 error.
>
> How do I determine if the files are registered correctly. *The
> assembly is registered with mscorlib, correct? *On a side note if I
> run regasm as an Administrator I get access denied. *This might be
> related then.
>
> Thanks

My System SpecsSystem Spec
Old 11-24-2008   #2 (permalink)
Paul Clement


 
 

Re: Interop Forms Toolkit - how to determine if worked

On Mon, 24 Nov 2008 09:11:23 -0800 (PST), Kevin.M.Jonas@xxxxxx wrote:

¤ This question has started an interesting conversation. I suppose it
¤ is a COM and .NET question so I will also post this in the
¤ dotnet.general group. The Interop Forms Toolkit allows you to wrap
¤ a .NET assembly as a COM object. So instead of rewriting an entire
¤ program to .NET you can create an upgrade path that slowly changes it
¤ from VB6 to .NET.
¤
¤ Now I am now trying to find out two things.
¤ 1) How to determine if a COM wrapper is registered.
¤ 2) On a client computer why regasm is giving an access denied error
¤ when logged in as Administrator.
¤
¤ So I have a .NET assembly, let's call it dotnet.dll. I have a
¤ wrapper, let's say it is called wrapper.dll. The program that is
¤ accessing the wrapper.dll is written in VB6. In development
¤ environment it automatically registers things properly. The installer
¤ automatically did some stuff so they are registered correctly. As I
¤ understand it the wrapper.dll is registered with mscorlib somehow and
¤ I am not completely sure about the dotnet.dll.
¤
¤ I asked in this group because if anyone has experience with this it
¤ would be VB6 developers as they are migrating to .NET.

Below is an article on how to work with and register a .NET DLL for COM from Visual Basic 6.0
interop:

How to call a Visual Basic .NET or Visual Basic 2005 assembly from Visual Basic 6.0

http://support.microsoft.com/kb/817248

For question #2 see the following:

FIX: "Access to the Registry Key Denied" Error Message When You Register .NET Assembly for COM
Interop
http://support.microsoft.com/default...b;en-us;327507


Paul
~~~~
Microsoft MVP (Visual Basic)
My System SpecsSystem Spec
Old 11-24-2008   #3 (permalink)
Kevin.M.Jonas


 
 

Re: Interop Forms Toolkit - how to determine if worked

> How to call a Visual Basic .NET or Visual Basic 2005 assembly from Visual Basic 6.0This doesn't answer my first question though. I know how to use the
interop forms toolkit in the development environment. Once installed
on a client computer how do I know everything is registered properly?

With a straight up VB6 COM component you can use oleview to see if the
GUIDs are correct and such. But with this interop stuff how do I know
it is installed properly on a client computer, not a development
computer?
My System SpecsSystem Spec
Old 11-24-2008   #4 (permalink)
Mike Williams


 
 

Re: Interop Forms Toolkit - how to determine if worked

<Kevin.M.Jonas@xxxxxx> wrote in message
news:92bc3e68-53f8-4c59-a79f-6734609d0a1a@xxxxxx
Quote:

> I asked in this group because if anyone has experience with
> this it would be VB6 developers as they are migrating to .NET.
Only some of them are migrating to .NET. Many of them are for the time being
staying exactly where they are, and many are migrating to somewhere else
entirely.



My System SpecsSystem Spec
Old 11-24-2008   #5 (permalink)
Kevin.M.Jonas


 
 

Re: Interop Forms Toolkit - how to determine if worked

On Nov 24, 4:50*pm, "Mike Williams" <M...@xxxxxx> wrote:
Quote:

> <Kevin.M.Jo...@xxxxxx> wrote in message
>
> news:92bc3e68-53f8-4c59-a79f-6734609d0a1a@xxxxxx
>
Quote:

> > I asked in this group because if anyone has experience with
> > this it would be VB6 developers as they are migrating to .NET.
>
> Only some of them are migrating to .NET. Many of them are for the time being
> staying exactly where they are, and many are migrating to somewhere else
> entirely.
I understand that but you can see my reasoning for asking here. I'd
think if anyone had experience with this it would be people who
migrated. I should have originally also asked the question in a .net
group.
My System SpecsSystem Spec
Old 11-24-2008   #6 (permalink)
mayayana


 
 

Re: Interop Forms Toolkit - how to determine if worked

>
I understand that but you can see my reasoning for asking here. I'd
think if anyone had experience with this it would be people who
migrated.
Quote:

>
Yes, and they're in the .Net group. How many
times do you need to be told that? There's no
"reason" in asking a .Net question in a VB group.


My System SpecsSystem Spec
Old 11-25-2008   #7 (permalink)
Paul Clement


 
 

Re: Interop Forms Toolkit - how to determine if worked

On Mon, 24 Nov 2008 11:55:24 -0800 (PST), Kevin.M.Jonas@xxxxxx wrote:

¤ > How to call a Visual Basic .NET or Visual Basic 2005 assembly from Visual Basic 6.0
¤ >
¤ > http://support.microsoft.com/kb/817248
¤
¤ This doesn't answer my first question though. I know how to use the
¤ interop forms toolkit in the development environment. Once installed
¤ on a client computer how do I know everything is registered properly?

The Regasm utility provides confirmation information when you register the assembly.

But if you want absolute verification then you can still use COM utilities, as Bill mentioned, to
verify installation.


Paul
~~~~
Microsoft MVP (Visual Basic)
My System SpecsSystem Spec
Old 11-25-2008   #8 (permalink)
Kevin.M.Jonas


 
 

Re: Interop Forms Toolkit - how to determine if worked

On Nov 25, 1:02*pm, Paul Clement
<UseAdddressAtEndofMess...@xxxxxx> wrote:
Quote:

> On Mon, 24 Nov 2008 11:55:24 -0800 (PST), Kevin.M.Jo...@xxxxxx wrote:
>
> ¤ > How to call a Visual Basic .NET or Visual Basic 2005 assembly from Visual Basic 6.0
> ¤ >
> ¤ >http://support.microsoft.com/kb/817248
> ¤
> ¤ This doesn't answer my first question though. *I know how to use the
> ¤ interop forms toolkit in the development environment. *Once installed
> ¤ on a client computer how do I know everything is registered properly?
>
> The Regasm utility provides confirmation information when you register the assembly.
>
> But if you want absolute verification then you can still use COM utilities, as Bill mentioned, to
> verify installation.
>
> Paul
> ~~~~
> Microsoft MVP (Visual Basic)
I might be missing something but all I have seen for absolute
verification is oleview to verify the wrapper. Isn't the .net control
added to the GAC? How would I know that? Unless I am not reading
something correct all I have seen is instructions to register a .net
control.

The more I read into this the more I think .NET needs to be
reinstalled and then our program reinstalled so everything gets
registered correctly. I am going to do that first. If it doesn't
work I will be back.

Thank you.
My System SpecsSystem Spec
Old 11-26-2008   #9 (permalink)
Paul Clement


 
 

Re: Interop Forms Toolkit - how to determine if worked

On Tue, 25 Nov 2008 13:52:24 -0800 (PST), Kevin.M.Jonas@xxxxxx wrote:

¤ I might be missing something but all I have seen for absolute
¤ verification is oleview to verify the wrapper. Isn't the .net control
¤ added to the GAC? How would I know that? Unless I am not reading
¤ something correct all I have seen is instructions to register a .net
¤ control.
¤
¤ The more I read into this the more I think .NET needs to be
¤ reinstalled and then our program reinstalled so everything gets
¤ registered correctly. I am going to do that first. If it doesn't
¤ work I will be back.
¤
¤ Thank you.

No, actually the assembly does not need to be installed in the GAC. That is, unless you plan on
sharing it amongst other applications. I would just install it locally with the Visual Basic app.


Paul
~~~~
Microsoft MVP (Visual Basic)
My System SpecsSystem Spec
Old 11-26-2008   #10 (permalink)
mayayana


 
 

Re: Interop Forms Toolkit - how to determine if worked

Quote:

> No, actually the assembly does not need to be installed in the GAC. That
is, unless you plan on
Quote:

> sharing it amongst other applications. I would just install it locally
with the Visual Basic app.
Quote:

>
If it's a VB program then he won't need any
assemblies or even a .Net install. If it's .Net
then you should not be cross-posting to a VB
group.


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
One for the toolkit? - SUMo Software
Microsoft.VirtualServer.Interop.dll and the Microsoft.VMRCClientControl.Interop.dll Virtual Server
simulate continuous forms & subforms in a windows forms application .NET General
Using an interop assembly with interop dependencies PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46