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
Solved

How do I convert VB6 call to Delphi 6

Posted on 2003-12-11
2
496 Views
Last Modified: 2007-12-19
The VB call from the vendor example to the vendor's API is:

' * SetInteractiveMode
Declare Function SetInteractiveMode Lib "ICE_API" Alias "_SetInteractiveMode@8" ( _
    ByVal hdc As Long, _
    ByVal bEnable As Long _
) As Long

My stab at this, which doesn't work, follows:

//' * SetInteractiveMode
function SetInteractiveMode(hdc: HDC; bEnable: boolean): boolean; StdCall; External 'ICE_API.dll';

The code from the ICE_API.h file is:
/*
 * SetInteractiveMode
 */
BOOL ICEAPI SetInteractiveMode(HDC /*hDC*/,
                               BOOL /*bEnable*/);

How do I make this work in Delphi 6?
0
Comment
Question by:terencenky
2 Comments
 
LVL 26

Accepted Solution

by:
Russell Libby earned 250 total points
ID: 9924120

// Delphi declaration
//   Notes:   BOOL is defined in Windows.pas as LongBool, thus the VB use of Long
//            Make sure to include the "mangled" name at the end of the external
//
function SetInteractiveMode(hDC: HDC; bEnable: BOOL): BOOL; stdcall; external 'ice_api.dll' name '_SetInteractiveMode@8';

Regards,
Russell


0
 

Author Comment

by:terencenky
ID: 9924460
Russell,

Thanks a bunch!!  Great response time!!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to convert wav to mp3 in delphi 9 219
drawing animated level bar based on numbers 3 103
Find and Replace Stream with 0s 8 69
scroll down TListBox component in Delphi 1 19
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

791 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