🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Multithread calls one DLL function

#10538
From: Oliver Young
Date: Fri, 02 Apr 2004 10:25
12 lines
1260 bytes
    How can BCB6 call one function in one dll from multiple threads? Is
there some example? I'm taking function address using GetProcAddress() and
loading dll using LoadLibrary() in run-time. Are those Windows function
calls thread safe?? Example:

HINSTANCE MyAppDLL = LoadLibrary("MyApp");
int (*fnMyFunc)(void);
fnMyFunc=(int (*)(void)) GetProcAddress(MyAppDLL,"SomeFunc");
int result = fnMyFunc();

Thank you.
Technical Details
Message-ID: <406d3f8d@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9fd9d633795f816c,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-02 02:39:26 PST
From: "Oliver Young" <none>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Multithread calls one DLL function
Date: Fri, 2 Apr 2004 12:25:19 +0200
Lines: 14
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 193.138.1.206
Message-ID: <406d3f8d@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1080901517 193.138.1.206 (2 Apr 2004 02:25:17 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail