Home  |  Index  |  Dotnet4all Snippets  |  Submit resources
About  |  Mail us  
Dotnet4all Logo
VB.NET DLLs and ProgIDs (Tuesday, February 01, 2005)
 

Found the following interesting discussion in the Newsgroups:

VB.NET DLLs and ProgIDs
by:eliasengin@msn.com (eli)

please...somebody answer this question.lol
I have submit it to 4 forums and it seems noone can answer it.

In VB6 I had made a standard windows application (client) and a DLL
(server). The client had a reference to AutoCAD application (you dont
have to know AutoCAD, I just made a reference to its interface thats
all). Then I could use a function of AutoCAD's interface call
GetInterfaceObject(<ProgID>). Giving to the function the ProgID of my
DLL's project I was able to load the DLL in memory space of AutoCAD.

Now, coming to .NET world, I created the same DLL and client
application in VB.NET. But Calling my GetInterfaceObject function with
the DLL's project ProgID as I used to, doesn't work.

Can anyone help what is going on? Is it because something has changed
with the ProgID thing? Is it because DLLs are not registered any more?

Thanks in advance,
Elias

I want to move a big application to VB.NET and I can't due to this
problem


 Reply:
by:Mattias Sjögren

 
>I have submit it to 4 forums and it seems noone can answer it.

Perhaps because you don't supply enough information. Have you
registered your library correctly? Can you instantiate objects from
other COM clients? DO you get any error messages?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


 Reply:
by:eliasengin@msn.com (eli)

 Maybe you are righ, I dont provide enough information.

Can I register DLLs with VB.NET? I thought it was something abandoned.
And if I can isnt it automatically done any more to my machine? (as I
develop, like VB6?)
And if it is like that will that be done in my clents machine at
distribution?

The case is really simple:

I have a variable "application" with which I reference my AutoCAD
application
And a "server" variable with which I reference my DLL reference (I
added a reference to my DLL from the references dialogbox).

Then I can write set Server=application.GetInterfaceObject(ProgID of
the DLL project). The function finds the ProgID and works in VB6 fine.
I can figure out what changes in .NET, but I guess the ProgID is not
acceptable anymore.

(I dont remember right now the error message I get and I am away from
my computer, but I can give it to you later)

Thank you very much for answering. I hope I did provide you with some
extra important info

Elias



Posted by Xander Zelders



 
Previous Posts
    - How to copy selected items in listbox to windows c...
    - How to navigate the records and binding it to text...
    - How to change design in excel from VB.NET
    - CommandBuilder.Dispose - should I use it?
    - Help and ideas appreciated
    - How to print to Generic Printer
    - CertificatePolicy
    - Object in textbox.text
    - Problem with converting code...
    - How to use "Insert Into..." with dataAdapter Inser...

Archives
    - 08/01/2004 - 08/08/2004
    - 08/08/2004 - 08/15/2004
    - 08/15/2004 - 08/22/2004
    - 08/22/2004 - 08/29/2004
    - 08/29/2004 - 09/05/2004
    - 09/05/2004 - 09/12/2004
    - 09/12/2004 - 09/19/2004
    - 09/19/2004 - 09/26/2004
    - 09/26/2004 - 10/03/2004
    - 10/03/2004 - 10/10/2004
    - 01/02/2005 - 01/09/2005
    - 01/09/2005 - 01/16/2005
    - 01/30/2005 - 02/06/2005
    - 01/01/2006 - 01/08/2006


Disclaimer & Terms of Use  | DotNet4All.Com concept & © 2004 - 2007 by  Zelders²  - Holland