?
Solved

How to deal with VB ByRef in Delphi

Posted on 2004-08-02
2
Medium Priority
?
673 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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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