473,651 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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 = CreateReportOnR untimeDS(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 CreateReportOnR untimeDS 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 pblsCreateRepor t(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 = CreateReportOnR untimeDS(Rs, svReportFile, svTTXFile,
False, True)

End Sub

End Module

Thanks and Regards,

Peri
Nov 19 '05 #1
2 1582
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

Nov 19 '05 #2
Still it is not working.

"Phillip Ian" <ph****@comcast .net> wrote in message
news:11******** **************@ g47g2000cwa.goo glegroups.com.. .
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

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1948
by: Chris Michael | last post by:
Hello everybody, Newbie here. I've been working on this for the last two days and I can't figure out where this problem is. I think it's something so obvious, but I can't see it! OK, firstly in a very simple page (please see www.intomobiles.com/test3.htm - it just displays the code that i use in an asp page) I call a function "processForm". The actual form is described in an asp page and is SSI linked to the page (for the full...
1
1400
by: Hartmut Schroth | last post by:
Hi, is it possible to call a Windows function from VB code behind an aspx page? Shell seems not to work?? Task: I want to execute an SQL script for SQL Server and want to avoid to be forced to write a very complicated stored procedure (with all the dynamic SQL problems and ....), as I have a (generated) script, that is working quite fine. Thanks for help in advance Regards
3
3731
by: CW | last post by:
I find it necessary to mix code-behind and non-code behind techniques sometimes. I have utility functions defined in a VB module. Is there anyway for me to call functions defined in VB module from aspx form (i.e., code mixed in with html elements) or even call public shared functions from other code behind classes)?
171
7692
by: tshad | last post by:
I am just trying to decide whether to split my code and uses code behind. I did it with one of my pages and found it was quite a bit of trouble. I know that most people (and books and articles) like it because you can split the code from the design. That is logical. But if you are the only one working on the code, it seem a little overkill. I use Dreamweaver to do my design and find it a bit of a hassle to have multiple files open...
7
2541
by: J-T | last post by:
I have a user control called "Test1" with two button on it ,one is input and the other one is a server control as follow: <input type="button" onClick="this.disabled=true;document.getElementById(btnSend).click();value="Go!"> <asp:button id="btnSend" runat="server" onClick="click" Width="90px" Text="HiddenControl" Visible="False"></asp:button> As you can see the asp.net button is calling a java script function as follows:
5
1920
by: Peri | last post by:
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
5
2579
by: settyv | last post by:
Hi, Below is the Javascript function that am trying to call from asp:Button control. <script language="javascript"> function ValidateDate(fromDate,toDate) { var fromDate=new Date();
0
982
by: sandeepkavade | last post by:
hi everybody, i want to call a function from c++ dll. previously it was working fine. but now i want to add unicode support to it. it works fine if _UNICODE is not defined in c++ dll. but if i define _UNICODE it gives error that Can't find DLL entry point. what i am missing. Thanx in advance.
4
38644
by: sajithkahawatta | last post by:
i want to call a java script function from code behind. in page1.aspx page i placed script' <script language="javascript"> function SetSelected() { infoTextBox.select(); } </script>
6
5908
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with or without parms. I know that any function that is passed to Eval() must be declared Public. It can be a Sub or Function, as long as it's Public. I even have it where the "function" evaluated by Eval can be in a form (class) module or in a standard...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4281
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.