Article View: borland.public.cppbuilder.nativeapi
Article #12087Re: Underscore in Dll export function
From: Muzzy
Date: Thu, 25 Dec 2003 15:29
Date: Thu, 25 Dec 2003 15:29
31 lines
1994 bytes
1994 bytes
Bob Gonder wrote: > Muzzy wrote: > > >>extern "C" void __declspec(dllexport) GetValue(char* AValue); >> >>But when i do a dumpbin.exe /export MyDLL.DLL, i see that _GetValue is >>exported, with underscore, and not GetValue >> >>Any ideas how to get rid of the underscore in the beginning? > > > I think you need a _stdcall (or WINAPI, same thing) in there... > extern "C" void __declspec(dllexport) _stdcall GetValue(char* AValue); > Well i got happy TOO soon... I declare the export function as: extern "C" void __declspec(dllexport) bool _stdcall GetValue(char* AValue); It shows in dll dump as 'GetValue' now, but ... when i call this function with GetProcAddress, it returns NULL unless i put '_GetValue' - with underscore... So we've found the way to get rid of underscore in export symbol of dll, but when calling it i still have to add underscore to function name... Any ideas on that? Thank you, Andrey
Technical Details
Message-ID:
<3feb0265$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3fea5c17$1@newsgroups.borland.com> <r82luvgtq0rgn35tqlnjiqk6316dmpjs9o@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,978c9ad7ff0cf7fb X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-12-25 07:39:19 PST Date: Thu, 25 Dec 2003 10:29:29 -0500 From: Muzzy <leyandrew@yahoo.com> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Underscore in Dll export function References: <3fea5c17$1@newsgroups.borland.com> <r82luvgtq0rgn35tqlnjiqk6316dmpjs9o@4ax.com> In-Reply-To: <r82luvgtq0rgn35tqlnjiqk6316dmpjs9o@4ax.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.91.233.60 Message-ID: <3feb0265$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1072366181 24.91.233.60 (25 Dec 2003 07:29:41 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail