Share Class Library over network???

  • Thread starter Thread starter Christiano Donke
  • Start date Start date
C

Christiano Donke

Is there a way to do this without having to register it
computer-by-computer???

tried everything already... but nothign worked out as should..

tks..
 
Hi,

It is hard to tell exactly what you want to do. However, perhaps it is
Remoting or a Webservice, both of which provide "objects" over a network
connection. You might start here (though there are many more articles on
these subjects)
http://www.vbdotnetheaven.com/UploadFile/ksasikumar/NetRemoting11152005081901AM/NetRemoting.aspx

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
What I need is not that hard...

I made an Class Lib in VB.NET (VS2005), that will be called from a VB6
App... so far, no problems.... Everything was working out just fine..

But This vb6 app is shared over a company network.. And I don't want to
have to register it into all computers..
This .net lib is used to get some data and write a XML..

I'll read this article and the give you a feedback..

tks...
 
Well in that case

Asuming you used COM ( shouldn`t know how you could call a VS dll
otherwise from a VB6 app ) the VS.Net assembly follows the standard COM
rules
wich means that you must register the assembly in the local registry ,
however your VB6 app could do that on startup ( the needed reg file can be
generated by regasm.exe , see the options of this tool )

An VS.Net COM assembly must be located in the GAC , The system32 or the
calling application directory so if the VB6 executable is also located on
the network share in the same folder as the VS.Net COM assembly this should
work .

Another option would be to start a .Net executable with parameters ( through
shell ) and that this would call the dll through .Net in that way nothing
needs to be registred on the systems.

Ofcourse above would only work if it is allowed to start .Net assembly`s on
a networked drive , wich is standard not the case
use this tool to adjust the assembly privilige , note that the system
administrator can do this company wide with a group policy
http://msdn.microsoft.com/en-us/library/2bc0cxhc(VS.80).aspx

hth

Michel Posseth [MCP]
VB6 , VB.Net Coder
 
Patrice

AFAIK

This is not possible as VB6 must be aware of the VS.Net COM component
it is in this case VB6 that must initialize the COM wrapper of the VS.Net
managed object VB6 just does a lookup of the clsid in the registry and
alternatively looks up the install location there , if it is not availlable
it wil look in the application directory , the GAC and the system32
directory for the component if it does not find a match it blows up with a
runtime error 91 "Object variable or with block not set"

It would realy suprise me if it would behave different as described above ,
but hey i learn something new every day :-)

Michel
 
If it is COM (and that is what is required for an object from VB6, written
in .NET), then it has to be registered.

I think a better scenario might be to provide a network service via sockets
or a webservice. If you use Sockets, you have to write the
interface/communications code using Winsock on the VB6 side, and
System.Net.Sockets on the .NET side. If you go with a webservice, then you
can try the SoapSDK toolkit for VB6. This is deprecated, but I suspect that
it may still be available (even if you use sockets, this toolkit might be
useful, so that you could use XML more easily on the VB6 side).

Since this is a VB6 application, personally, I'd live with the limitation(s)
of VB6, and simply register the component on each machine. After all,
that's what you had to do to install the program, or to make any major
modifications to it -- and this is a major modification.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
Seewww.hardandsoftware.netfor details and contact information.

I haven't tried it yet, but I ran across this:

http://www.thecommon.net/10.html

Chris
 
Back
Top