Inherit, hooking into existing 3rd party DLL class

M

Mike

Folks, still relatively new to ASP.NET. I need to know if this is
possible.

I have a project where I have to to integrate a 3rd party ASP.NET web
server product with our backend web server. I was provided with the
3rd party ASP.NET VB source code code and I have worked out the
necessary integrate logic and requires changes to their code which
creates DLLs.

Now I have been cleaning up and reducing the source code changes and
use possibly class inheritance to accomplish the task.

In short, the 3rd party code has one VENDOR.DLL with the following
outline:

Option Strict On
Option Explicit On

Imports System
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports Vendor.Common

Namespace Vendor.Common.Authentication
Public Class Login

Public Shared Function UserExist(ByVal s As String) As Int32
' some code
End Function

Public Shared Sub Login(ByVal User As Vendor.Common.Components.User,

ByVal Persist As Boolean)
' some code
End Function
....
....
other public and private functions
End Class
End NameSpace

In the project, I had to modify the Login() function by adding some
extra code.

My question is there a method where I can overlay this DLL class with
my own class, with the one Login function override which then call
back the parent Login function? Something like so in my own helper
MyApplet.DLL library:

Namespace Vendor.Common.Authentication
Public Class Login
Inherits Vendor.Common.Authentication
Overrides Public Shared Sub Login(ByVal s As _
Vendor.Common.Components.User,

ByVal p As Boolean)
' some code
vendor.common.authentication.authentication.login(s,p)
End Function
End Class
End NameSpace

I know the above code is invalid. But I think OOPs people know what I
am trying to accomplish.

Again, the goal here is to not require source code change. But if
required, then that is possible. Unfortunately, the vendor did not
make the code very flexible. What I want do to is just provide a
helper MyApplet.DLL that if all possible hook or replace this one
class in the vendor library.

Possible?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top