Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Having access to the browser object in DLL
Message
From
11/04/2006 23:29:03
 
 
To
11/04/2006 22:15:20
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01112761
Message ID:
01112762
Views:
8
Ok, I resolved it. There were two issues. The first one is that I had to add a reference of AxInterop.SHDocVw.dll in the project. The other was that I had to define the function as non CLS compliant:
Public Class BrowserUrl

    Public lBrowser As Boolean = False
    Public nOperation As Integer = 0
    Public nPrimaryKey As Integer = 0
    Public cUrl As String = ""

    ' Get the Url
    <CLSCompliant(False)> _
    Public Function GetUrl(ByVal toBrowser As AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event) As Boolean
        Dim lnLocation As Integer
        cUrl = toBrowser.uRL
        cUrl = Mid(cUrl, cUrl.LastIndexOf("\") + 2)
        If cUrl.StartsWith("LX") Then
            lBrowser = True
            toBrowser.cancel = True
            nOperation = Val(Mid(cUrl, 3, 1))
            lnLocation = cUrl.IndexOf(",")
            nPrimaryKey = Val(Mid(cUrl, 4, lnLocation))
        End If
    End Function

End Class
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform