Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

Call a DLL LIB function in ASP.NET (Code Behind) or VB.NET (The same code is working fine in VB 6.0)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peri - 19 Jul 2005 16:20 GMT
Dear All,

In VB 6.0 declaring this function and calling this functions works smoothly.
But in VB.NET or ASP.NET (Code behind), I am getting an error in the line
"HResult = CreateReportOnRuntimeDS(Rs, svReportFile, svTTXFile, False,
True)" saying that, "Object reference not set to an instance of an object."
Can any one help me out to solve this problem.

Module Report
       Declare Function CreateReportOnRuntimeDS Lib "p2smon.dll" (ByVal
lpUnk As Object, ByVal reportFile As String, ByVal fieldDefFile As String,
ByVal bOverWriteFile As Long, ByVal bLaunchDesigner As Long) As Long

   ---This is how I use this function in the procedure:
   Public Sub pblsCreateReport(ByRef Rs As ADODB.Recordset, ByRef
svReportFile As String, ByRef svTTXFile As String)

       Dim rsReportSet As New ADODB.Recordset()

       rsReportSet = Rs

       Dim HResult As Long

       ' Create the Report
       HResult = CreateReportOnRuntimeDS(Rs, svReportFile, svTTXFile,
False, True)

   End Sub

End Module

Thanks and Regards,

Peri
Phillip Ian - 19 Jul 2005 16:49 GMT
You might try changing the Long variables to Integer.  Not sure if that
will solve your problem, but I know that the definitions changed
between VB6 and VB.NET.

-Phil
Peri - 20 Jul 2005 04:13 GMT
Still it is not working.

> You might try changing the Long variables to Integer.  Not sure if that
> will solve your problem, but I know that the definitions changed
> between VB6 and VB.NET.
>
> -Phil

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.