I'll start off by saying I'm a bit of a noob with ASP.NET I do know a bit of vb from the old days though.
Using Visual Web Developer 2008 express I've written a dll in vb.net that interfaces with another COM dll called CybersourceWSLib
In my class, called cybersource I interact with a few of the Interfaces inside the CybersourceWSLib COM dll.
My problem is that when I attempt to use one of the properties of the interface from my web page like so:
Imports Cybersource.cyber1.cyb
Partial Class registration
Inherits System.Web.UI.Page
Private Shared oCyb As New Cybersource.cyber1.cyb
<snip>
oCyb.EnableLog = "0"
I get:
"System.NullReferenceException: Object reference not set to an instance of an object."
I've declared the interfaces inside the dll but I'm guessing they are not initailized??? I dunno
Here is where I declare them in the class inside my vb.net dll
Private Shared oClient As CyberSourceWSLib.IClient
My web page access the properties in my dll through :
Public Shared Property LogDirectory() As String
Get
Return objMerchConfig.LogDirectory
End Get
Set(ByVal value As String)
objMerchConfig.LogDirectory = value
End Set
End Property
WebRuss
0 Points
19 Posts
COM object Interface issue
Sep 04, 2009 06:18 PM|LINK
Hello all
I'll start off by saying I'm a bit of a noob with ASP.NET I do know a bit of vb from the old days though.
Using Visual Web Developer 2008 express I've written a dll in vb.net that interfaces with another COM dll called CybersourceWSLib
In my class, called cybersource I interact with a few of the Interfaces inside the CybersourceWSLib COM dll.
My problem is that when I attempt to use one of the properties of the interface from my web page like so:
Imports Cybersource.cyber1.cyb Partial Class registration Inherits System.Web.UI.Page Private Shared oCyb As New Cybersource.cyber1.cyb <snip> oCyb.EnableLog = "0"I get:
"System.NullReferenceException: Object reference not set to an instance of an object."
I've declared the interfaces inside the dll but I'm guessing they are not initailized??? I dunno
Here is where I declare them in the class inside my vb.net dll
My web page access the properties in my dll through :
Public Shared Property LogDirectory() As String
Get
Return objMerchConfig.LogDirectory
End Get
Set(ByVal value As String)
objMerchConfig.LogDirectory = value
End Set
End Property
That is when I get the error.
What do I need to do to make this work.