🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Import functions from gll by index.

#17383
From: Mariusz Grecki
Date: Wed, 26 Mar 2003 08:40
47 lines
2206 bytes
Hello all,

It is a shame, but I can not import a function from
kernel32.dll by index. Using the name it is possible
but by index GetProcAddress fails returning NULL.
What I am doing wrong?

Example:
=================================
HINSTANCE hlk32;
FARPROC LoadLibrary16;
FARPROC FreeLibrary16;
FARPROC GetProcAddress16;
FARPROC BeepA, BeepB;

.............
   hlk32=LoadLibrary("kernel32");

   BeepB=GetProcAddress(hlk32, (LPSTR)10);
   BeepA=GetProcAddress(hlk32, "Beep");
...........
   FreeLibrary(hlk32);
================================
BeepA is OK.
BeepB is NULL!

Any comments?

PS. In fact I do not need a Beep function,
I need functions for 16bit dll thunking
but I can not jump over that simple thing :-(

Thanks in advance.

--
Best regards.

Mariusz Grecki

****************************************************************************
 Dr Mariusz GRECKI               tel. +48 - 42  - 631 26 48
 Department of Microelectronics
 and Computer Science,           fax. +48 - 42  - 636 03 27
 Technical  University of Lodz     e-mail:grecki@DMCS.p.lodz.pl
 Al. Politechniki 11, 93-590 Lodz, Poland
 Url:                            http://www.dmcs.p.lodz.pl
****************************************************************************
Technical Details
Message-ID: <3e8165eb@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,3166b65da596fd46,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-03-26 01:04:04 PST
From: "Mariusz Grecki" <grecki@dmcs.p.lodz.pl>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Import functions from gll by index.
Date: Wed, 26 Mar 2003 09:40:35 +0100
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 212.51.219.26
Message-ID: <3e8165eb@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1048667627 212.51.219.26 (26 Mar 2003 00:33:47 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer2.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail