Hi, i need to implement the IObjectSafety interface for a vb.net COM .dll which is being used for an MCE app. I've created this in a module file (Config.vb):
Public Interface IObjectSafety
Sub GetInterfaceSafetyOptions(ByRef riid As Guid, ByRef supportedOptions As Integer, ByRef enabledOptions As Integer)
Sub SetInterfaceSafetyOptions(ByRef riid As Guid, ByVal optionSetMask As Integer, ByVal enabledOptions As Integer)
End Interface
Public
Enum ObjectSafetyFlags As Integer
INTERFACESAFE_FOR_UNTRUSTED_CALLER = 1
INTERFACESAFE_FOR_UNTRUSTED_DATA = 2
INTERFACE_USES_DISPEX = 4
INTERFACE_USES_SECURITY_MANAGER = 8
SafeForScripting = INTERFACESAFE_FOR_UNTRUSTED_CALLER Or INTERFACESAFE_FOR_UNTRUSTED_DATA
End Enumand for each class i implement it using:Public
Class Item
Implements IObjectSafetyand the following is within each class:
Public Sub GetInterfaceSafetyOptions(ByRef riid As System.Guid, ByRef supportedOptions As Integer, ByRef enabledOptions As Integer) Implements Config.IObjectSafety.GetInterfaceSafetyOptions
supportedOptions = ObjectSafetyFlags.SafeForScripting
enabledOptions = ObjectSafetyFlags.SafeForScripting
End Sub
Public Sub SetInterfaceSafetyOptions(ByRef riid As System.Guid, ByVal optionSetMask As Integer, ByVal enabledOptions As Integer) Implements Config.IObjectSafety.SetInterfaceSafetyOptionsEnd Subbut when the .dll is invoke within the HTML page on the MCE machine, IE still says it's unsafe so im assuming it's not implemented properly. So has anyone else successfully done this in vb.net and if so could you let me know how?
Thanks in advance.
Dan.