p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_howto thread: Access existing VB code from ASP page


Message #1 by "John King" <johnking@o...> on Mon, 9 Dec 2002 04:17:38
Hello David:

At 08:47 PM 12/8/2002, David Cameron wrote:
> > >Take a look at this article:
> > >http://www.4guysfromrolla.com/webtech/072199-2.shtml
> >
> > I should have been more specific. I'm looking to access only a module, not
> > an executable. For instance, a set of functions. It would be nice not to
> > duplicate the code.
>
>AFAIK it can't be done. I think you will need compile a separate exe based 
>on that module. I am pretty sure that you can include a module in more 
>than one VB project, so you can avoid code duplication.
>Generally to avoid code reuse on an ASP platform, use server side includes 
>or COM objects.

Makes sense. As for the reuse, I also came to the conclusion that COM was 
the way to go.

> > >Also (I take it that this post relates to the earlier one), creating a 
> COM
> > >object is not very difficult, at not in least VB. Create a new project,
> > >make it an ActiveX dll and add some functions and subs to the class
> > >module. If they are public, then they are accessible to the outside 
> world.
> > >To access your COM object, go:
> > >
> >
> > I've read about it in a couple of books and I know it appears to be pretty
> > straight forward. But, unfortunately, I'm still working with VB learning
> > edition. Now that .NET stuff is out, I'm not sure I can upgrade to v6.0
> > Professional, and I don't want to get into .NET just now, if I can help 
> it.
> > I've got to look into my options in more detail.
>
>I guess your hands are tied.

Well, what I really have to do is bite the bullet. But, at least I feel 
better that I it really is the only workable path.


> > >Nothing to it.
> >
> > Scariest phrase in the english language. ;-)
>
>Not as scary as the other suggestion I had in mind, which was converting 
>the C++ dll to a COM object. :-)

I gave that some thought too, but someone else did the C++ DLL, and it 
would be an extremely low priority for them to redo it in VB/COM. Maybe 
I'll look at re-creating it myself.  Problem is, I'm self taught and all 
this takes so much time.

>I spent a little time working with VC++6, creating a COM object and the 
>experience has resulted in me shifting to Linux for home use and 
>development where possible. They may have made life a little easier in 
>VS.Net, but it cannot hide the ugliness (IMHO) of the Win32 API, it can 
>only make it easier to work with. *Shudder*

I've not had much need to work with the Win32 API, so I have no first-hand 
knowledge or opinion about it. How is it that you find Linux a better 
development environment? And what do you develop with under linux?

JK

  Return to Index