🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #297990

Re: Dll, Nie rozumiem wyjaśnienia na msdn

#297990
From: Firkraag
Date: Sat, 13 Aug 2011 20:44
28 lines
2506 bytes
On 13 Sie, 21:09, Andrzej Budzanowski <psychob....@gmail.com> wrote:

> Teraz należy zadać pytanie, czy eksportujesz funkcje przez nazwę[1] czy
> przez numer[2]?

Przez nazwę, bez dekoracji __declspec(dllexport)

>
> Bo jeśli przez nazwę to nie musisz się przejmować - no chyba że
> eksportujesz razem z "dekoracją"...

Za msdnem:
"Pros and Cons of Using __declspec(dllexport)
 Using __declspec(dllexport) is convenient because you do not have to
worry about maintaining a .DEF file and obtaining the decorated names
of the exported functions. However, you do not have control over the
export ordinals that the compiler generates. This method is suitable
if, for example, you are designing a DLL for use with an application
that you control; if you rebuild the DLL with new exports, you will
also have to rebuild the application."

Nie wiem dlaczego nie musiałem przekompilowywać aplikacji, skoro "I
rebuilt the DLL with new exports".
Czy właśnie dlatego nie musiałem, bo użyłem extern "C"?
Jeśli tak, to czy to znaczy, że dodając do dllki i exportując nowe
funkcje, ten sam kompilator może inaczej dekorować nazwy starych?
Jeśli tak, to czy robi to "zawsze", czy tylko w przypadku
przeładowania?
Technical Details
Message-ID: <1462cfd4-d92f-4175-a8db-713700da2e5c@k15g2000yqd.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!postnews.google.com!k15g2000yqd.googlegroups.com!not-for-mail
References: <897d16db-c4b0-48f2-8d7b-be25a4593500@j15g2000yqf.googlegroups.com> <4e46cc3e$0$2451$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!postnews.google.com!k15g2000yqd.googlegroups.com!not-for-mail
From: Firkraag <peterg.uk@gmail.com>
Newsgroups: pl.comp.lang.c
Subject: Re: Dll, Nie rozumiem wyjaśnienia na msdn
Date: Sat, 13 Aug 2011 13:44:56 -0700 (PDT)
Organization: http://groups.google.com
Lines: 29
Message-ID: <1462cfd4-d92f-4175-a8db-713700da2e5c@k15g2000yqd.googlegroups.com>
References: <897d16db-c4b0-48f2-8d7b-be25a4593500@j15g2000yqf.googlegroups.com> <4e46cc3e$0$2451$65785112@news.neostrada.pl>
NNTP-Posting-Host: 80.239.242.207
Mime-Version: 1.0
X-Trace: posting.google.com 1313271916 2894 127.0.0.1 (13 Aug 2011 21:45:16 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 13 Aug 2011 21:45:16 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: k15g2000yqd.googlegroups.com; posting-host=80.239.242.207; posting-account=_UM80AoAAADQbrMS_HK6Fu-mqhqkCg7k
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: HULARCF
X-HTTP-UserAgent: Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.9.168 Version/11.50,gzip(gfe)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit