Solved

How to deal with VB ByRef in Delphi

Posted on 2004-08-02
2
667 Views
Last Modified: 2010-04-05
I am in the process of converting a VB program to Delphi. There are many calls to an external DLL that need to be made. One of these functions is:

Declare Function rtdGetParams Lib "rtdsdk.dll" (ByVal nBoardNum As Integer, ByVal nParamNum As Integer, ByRef lpParamVal As Long) As Integer

And its' use in the VB program is:

    If (rtdGetParams(0, CURRENT_POSITION, lpCurrPos) = VP_BS_ERROR) Then
        IDC_TIMER.Enabled = False
        MsgBox "rtdGetParams(CURRENT_POSITION) Failure", vbIconStop, "Error Report"
        nBoardState = VP_BS_ERROR
        IDC_TIMER.Enabled = False
    Else
        IDC_SCROLLBAR_CURRENT_FRAME.Value = lpCurrPos
    End If

The question is: How do I convert the first line to work with Delphi?

Tom
0
Comment
Question by:flight5132003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 total points
ID: 11694795
guess

Function rtdGetParams(nBoardNum : Integer; nParamNum : Integer, var lpParamVal : Integer) : Integer;
begin....

meikl ;-)

0
 

Author Comment

by:flight5132003
ID: 11694832
Thanks Meikl!

Worked like a charm!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question