I'm developing a project on Visual Studio 2005 and I need to publush it on a web page. I'm using this HTML code:
<object id="eDataMan" name="eDataMan" classid="http:eDataMan.dll#ActivexDotNet.eDataMan"style="width:100%; height:100%; background-color:ButtonFace; font-family:Arial; font-size:x-small"></object>
But all I get is a picture icon on the web page, the program does not run.
This is what I have on my VB.NET project:
Modulo objsafe.vb:-----------------------------------------------------Imports System.Runtime.InteropServices
Module objsafe <ComImport()> _ <Guid("CB5BDC81-93C1-11CF-8F20-00805F2CD064")> _ <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ Public Interface IObjectSafety Function GetInterfaceSafetyOptions(ByRef iid As Guid, ByRef pdwSupportedOptions As Integer, ByRef pdwEnabledOptions As Integer) As Integer Function SetInterfaceSafetyOptions(ByRef iid As Guid, ByVal dwOptionSetMask As Integer, ByVal dwEnabledOptions As Integer) As Integer End InterfaceEnd Module-----------------------------------------------------
Control eDataMan.vb:-----------------------------------------------------Public Class eDataMan 'Inherits Windows.Forms.UserControl Implements IObjectSafety
' Constants for implementation of the IObjectSafety interface Private Const INTERFACESAFE_FOR_UNTRUSTED_CALLER As Integer = &H1 Private Const INTERFACESAFE_FOR_UNTRUSTED_DATA As Integer = &H2
Public Function GetInterfaceSafetyOptions(ByRef iid As Guid, ByRef pdwSupportedOptions As Integer, ByRef pdwEnabledOptions As Integer) As Integer Implements IObjectSafety.GetInterfaceSafetyOptions pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER Or INTERFACESAFE_FOR_UNTRUSTED_DATA pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_CALLER Or INTERFACESAFE_FOR_UNTRUSTED_DATA Return 0 End Function
Public Function SetInterfaceSafetyOptions(ByRef iid As Guid, ByVal dwOptionSetMask As Integer, ByVal dwEnabledOptions As Integer) As Integer Implements IObjectSafety.SetInterfaceSafetyOptions Return 0 End Function
Private Sub eDataMan_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO CODE MsgBox("I'm here") End SubEnd Class-----------------------------------------------------