🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Import functions from gll by index.

#17417
From: Vladimir Afanasyev
Date: Thu, 27 Mar 2003 08:10
31 lines
2100 bytes
Hi,

"Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote:
>
>"Mariusz Grecki" <grecki@dmcs.p.lodz.pl> wrote in message
>news:3e8165eb@newsgroups.borland.com...
>
>> Using the name it is possible but by index
>> GetProcAddress fails returning NULL.
>> What I am doing wrong?
>
>You should be using MAKEINTRESOURECE, not LPSTR.  By using LPSTR, you're
>passing the wrong value to GetProcAddress(), whereas MAKEINTRESOURECE
>ensures the value is formatted correctly:
>
>    BeepB = GetProcAddress(hlk32, MAKEINTRESOURCE(10));

It is not exactly.
Off course you absolutely correct as a Perfect Programmer.
It is not good to use types that do not correctly coorrespond 
to meaning content of variable. And I agree with you in 
this case.
But practically both line give us the same.
It is possible to see it by debugger or CPU window.

The real problem it what I write in the reffer page in 
my another message: Microsoft did it specially to disable 
debugging kernel. That is funny.

Vladimir.
Technical Details
Message-ID: <3e82b1fc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e8165eb@newsgroups.borland.com> <3e81f8e3$2@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,3166b65da596fd46
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-27 00:17:48 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: Import functions from gll by index.
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 62.244.14.114 62.244.14.114    
X-Forwarded-For: 192.168.0.147
References: <3e8165eb@newsgroups.borland.com> <3e81f8e3$2@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3e82b1fc$1@newsgroups.borland.com>
Date: 27 Mar 2003 00:10:36 -0800
X-Trace: newsgroups.borland.com 1048752636 207.105.83.65 (27 Mar 2003 00:10:36 -0800)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!216.166.71.14.MISMATCH!border3.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail