🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: DLL GetProcAddress problem

#16312
From: Russell Hind
Date: Wed, 21 May 2003 08:16
21 lines
1806 bytes

Remy Lebeau (TeamB) wrote:
> 
> Your DLL function is not using the __stdcall convention, thus the actual
> name exported from the DLL will be "_Txdevice_init" instead of
> "Txdevice_init".  I would suggest adding __stdcall:
> 

AFAICT, GetProcAddress isn't affected by calling convention.  It is 
mearly a string look up on what you give it.  What you do with the 
pointer (void*) it returns, is up to you.  You will get crashes if you 
declare the calling convention wrong, but the OPs problem was that 
GetProcAddress is returning 0.

Still, worth pointing out as that may well be his next problem after he 
has the address :)

Cheers

Russell
Technical Details
Message-ID: <3ecb362d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ec9e11d@newsgroups.borland.com> <3eca64ba$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,103aeaad97b09526
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-21 01:25:28 PST
Date: Wed, 21 May 2003 09:16:40 +0100
From: Russell Hind <rhind@mac.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: DLL GetProcAddress problem
References: <3ec9e11d@newsgroups.borland.com> <3eca64ba$1@newsgroups.borland.com>
In-Reply-To: <3eca64ba$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.240.15.125
Message-ID: <3ecb362d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053505069 212.240.15.125 (21 May 2003 01:17:49 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail