🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8109

Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..

#8109
From: Remy Lebeau (TeamB)
Date: Mon, 22 Nov 2004 23:10
47 lines
3157 bytes
"Oren Halvani" <Spam@Me-Please.com> wrote in message
news:41a26c36$1@newsgroups.borland.com...

> ohh, so there aren't pointers in delphi..?

I did not say that.  Yes, there are pointers in Delphi.  No, pointers are
not used for API handles.  For API functions, Delphi uses THandle instead of
HANDLE for declaring handles.  In Delphi, THandle is a typedef for the
Integer data type.  In C++, HANDLE is a typedef for a void* pointer.  As far
as the compiled machine code is conserned, they contain the same value.  An
Integer can be cast to a void*, and vice versa.

> i didn't know that 'Result' was just a variable,
> i thought really its the equivalent for C++ return...

Close, but no.  It is the equivilent of 'return' only in that it specifies
the value to return to the calling code.  But it is not exactly equivilient
because it does not terminate the function immediately like 'return' does in
C++.  In fact, it is common practice in Delphi for the Result to be assigned
multiple times inside a function, ie:

    function DoSomething: Boolean;
    begin
        Result := False;
        //...
        if Some Condition Then Result := True;
        //...
    end;

The equivilent in C++ would be the following:

    bool __fastcall DoSomething()
    {
        bool Result = false;
        //...
        if( Some Condition ) Result = true;
        //...
        return Result;
    end;

> i guess even assembler is not a big deal for you? :-)

I'm still working on that...


Gambit
Technical Details
Message-ID: <41a27180$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <419ceea1@newsgroups.borland.com> <419cf173$1@newsgroups.borland.com> <419d2c69$1@newsgroups.borland.com> <419d3e01$1@newsgroups.borland.com> <419d8ce4@newsgroups.borland.com> <419dc340@newsgroups.borland.com> <419e5561$1@newsgroups.borland.com> <419e5ecc$1@newsgroups.borland.com> <419e6631@newsgroups.borland.com> <419e7adc$1@newsgroups.borland.com> <419e831e$1@newsgroups.borland.com> <419f0334$1@newsgroups.borland.com> <419f08b1@newsgroups.borland.com> <419fb061$1@newsgroups.borland.com> <419fc5aa@newsgroups.borland.com> <41a03fb6@newsgroups.borland.com> <41a066cc@newsgroups.borland.com> <41a23648$1@newsgroups.borland.com> <41a2651e@newsgroups.borland.com> <41a26953$1@newsgroups.borland.com> <41a26c36$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9a94ec9a8ef193c6
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <419ceea1@newsgroups.borland.com> <419cf173$1@newsgroups.borland.com> <419d2c69$1@newsgroups.borland.com> <419d3e01$1@newsgroups.borland.com> <419d8ce4@newsgroups.borland.com> <419dc340@newsgroups.borland.com> <419e5561$1@newsgroups.borland.com> <419e5ecc$1@newsgroups.borland.com> <419e6631@newsgroups.borland.com> <419e7adc$1@newsgroups.borland.com> <419e831e$1@newsgroups.borland.com> <419f0334$1@newsgroups.borland.com> <419f08b1@newsgroups.borland.com> <419fb061$1@newsgroups.borland.com> <419fc5aa@newsgroups.borland.com> <41a03fb6@newsgroups.borland.com> <41a066cc@newsgroups.borland.com> <41a23648$1@newsgroups.borland.com> <41a2651e@newsgroups.borland.com> <41a26953$1@newsgroups.borland.com> <41a26c36$1@newsgroups.borland.com>
Subject: Re: Several ways to define 2 system-wide hotkeys, without to install keyboard-hook..
Date: Mon, 22 Nov 2004 15:10:51 -0800
Lines: 49
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <41a27180$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1101164928 68.69.17.41 (22 Nov 2004 15:08:48 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail