dotnet dll

  • Thread starter Thread starter Andry
  • Start date Start date
A

Andry

Hi all

I have made a com dll .

Details are

OS : win 2000

Env: DotNet

I now want to execute this in the following env:

Win 98 and VB 6

This gives error.Page fault in VBA6.dll, and says that the it has performed
an illegal operation.

Please help.
 
I have made just such a com dll and distribute it to other environments.
This worked for me. It may not be the best way, but hey, it works!

In the VS IDE I set up a second solution named xxxDeploy (where xxx is my
app). In that solution I have one deployment project named xxx. I include
the dll(s) that I want to package. I change the registration option to
vsdraCOM for all that I want registered on the target machine. As it
happens there is another registry key I need to update, so I add that to
the Registry settings.

You will find that the interop assemblies are generated. These are the
"wrappers" that the VB6 app will see.

When the user (in my case on anything from 98 to ME to XP) runs the .msi it
properly registers my library.

In my code I have:

<ComClass(xxx.ClassId, xxx.InterfaceId, xxx.EventsId)> _

Public Class xxx

....

End Class

#Region "COM GUIDs for xxx"

Public Const ClassId As String = "A81E8732-B8F8-4db0-864B-D40E78492EA9"

Public Const InterfaceId As String = "627BACD8-86E3-4ffc-B2BD-B3C2C2EC69DD"

Public Const EventsId As String = "B4BFAB80-B5DF-467b-BCE4-1F0C51B6E7E0"

Public Sub New()

MyBase.New()

End Sub

#End Region



Regards,

Ot
 
Hi Ot,
I tried your steps, but the problem is still there.
Do you mind explaining it to me in a little detail?
Please help me here.
Thanks!
 
The thing is, Andry, I am a bit new to VB.NET myself. I'll take my best
shot, but it is the newbie advising the newbie.

If I were having the same problem, I would try to debug it first on my
development machine. Have you tried that? Can you successfully access/use
your dll there?

Assuming that you have success on the development machine, you can note the
registry entries. This will allow you to see what is missing on the target
machine.

My guess would be that the registry is not correctly set up on the target
machine.

I didn't explicitly mention the *.tlb, but the msi must be set up to
register that as well.

If the registry is set up correctly, I suppose the framework could be the
problem. Is the .NET framework set up right on the target? There are ways
to distribute it yourself, but in my case I simply make it a prerequisite
that the users must install themselves. If they don't, executing the msi
prompts them.

That is about the extent of what a fellow newbie can recommend. If the
problem persists you might post back here or in a new thread with as much
detail as you can.

Regards,
Ot
 
Thanks Ot. I really appreciate your efforts and your will to help me out.
I am very grateful!!
Thanks again :)
 
Back
Top