-
Passing Multiple Parameters to a DLL function
Hi Guyz,
Im very new to working with DLLs. I want to create DLL which will get values from a third party software and parameters passed to it to perform some process.
Here is the Defination
Public Sub Hello(YourName As String, YourAcc As String, AvailBal As String)
'Area to put code to process
MsgBox "Hello " & YourName & "!", vbInformation
MsgBox "Your Account is " & YourAcc & "!", vbInformation
MsgBox "Available Balance is " & avaibal & "!", vbInformation
End Sub
So i want to pass the three parameters when i call it but it seem not to be working. All the parameters im passing them as variables.
'Here Calling the DLL fuction
Private Sub CmdProc_Click()
Dim Jina As String
Dim AccNo As String
Dim AvaBal As String
AccNo = InputBox("Enter Account No")
FindCrit = "ACCNO='" & AccNo & "'"
DFAccs.Find FindCrit
Jina = DFAccs!ACNAME
AvaBal = DFAccs!AvailBal
Hello(Jina,AccNo,AvaBal) 'This line is not working
End Sub
When i call Hello fuction with the parameters as shown above.. the compiler doesnt accept, the lines are shown in red. So could somebody show me how to call that function and pass the three parameters to it.
Last edited by wandera; 11-24-2005 at 10:24 AM.
-
what does DFAccs this do ? cant seem to understand its presence in your code
Sri
-
DFaccs is a recordset which is opened at the form load. i.e database connection and opening is done at form load. I want to query in that recordset i.e DFaccs.
-
Hello(Jina,AccNo,AvaBal) 'This line is not working
Remove the parentheses around the parameters. You may only use parentheses when the function returns a value. In other words, this would be OK:
Result = Hello(Jina, AccNo, AvaBal)
Because your Hello Sub does not return a value, you must call it like this:
Hello Jina, AccNo, AvaBal
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
-
Thanks Phil that works preetty good.
Similar Threads
-
By Mick George in forum VB Classic
Replies: 2
Last Post: 01-02-2003, 02:32 PM
-
By Tom Staresinic in forum ASP.NET
Replies: 5
Last Post: 07-20-2001, 02:25 PM
-
By Bragi +Fannar in forum Web
Replies: 5
Last Post: 09-26-2000, 12:58 PM
-
By Julian Milano in forum VB Classic
Replies: 0
Last Post: 08-10-2000, 09:16 PM
-
By Pete Mitchell in forum VB Classic
Replies: 0
Last Post: 06-27-2000, 03:56 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks