By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

Accessing a custom dll file

P: n/a
I am having trouble accessing a custom dll file in VB .net for a web page.

I am using the <DLLImport way of pulling in the dll. My code is this:
<DllImport("C:\WINNT\system32\PRDewPointV1.dll", CharSet:=CharSet.Auto)> _
Public Shared Function PRDewPointV1(ByVal CalcType As Double, ByVal
UnitsType As Double, ByVal PRESSURE As Double, ByVal DEWPOINTINPUT As Double,
ByVal C6PLUSMOLWTINPUT As Double, ByVal ZINPUT As Double, ByVal ARRAYOUTPUT
As Double) As Double
End Function

My error comes when I try to access the function:

VarOut = PRDewPointV1(CalcType, UnitsType, PRESSURE, DEWPOINTINPUT,
C6PLUSMOLWTINPUT, _
ZINPUT, ARRAYOUTPUT)

The error is 'System.NullReferenceException' occurred.
Object reference not set to an instance of an object.

Any suggestions would be greatly appreciated.

Thanks,

paul
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.