🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how can i use dll file in my project?

#15535
From: Marc
Date: Thu, 03 Jul 2003 18:45
32 lines
1877 bytes
Hi

Here is some sample code to load any DLL without needing the
associated .h file or LIB.  I use this code to load visual studio DLL and windows DLLs such as User32.dll.

HMODULE hModule;
void (__cdecl *pfnGetHandle)(Actual function Params here);
// Params are usual taken from related documentation

hModule = LoadLibrary("SomeFile.dll");  // may need to include path in some cases.
if (hModule != NULL)
{
        pfnGetHandle = (void __cdecl(*)(Actual function Params here))GetProcAddress(hModule , "Actual function name contained in DLL");
    }

pfnGetHandle(pass param values here);  // actual call to function.

Hope this helps 
Marc






"newsgroups.borland.com" <skavastan@ebos.com.tr> wrote:
>hi,
>how can i use dll file in my project?
>thanks...
>
>
Technical Details
Message-ID: <3f0479b4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.bc.tac.net!cyclone.bc.net!logbridge.uoregon.edu!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f04345c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,efd7a63b49ea79e6
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-03 12:12:12 PST
From: "Marc" <Bukwheat@axess.com>
Sender: "Marc" <Bukwheat@axess.com>
Reply-To: "Marc" <Bukwheat@axess.com>
Subject: Re: how can i use dll file in my project?
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 138.11.254.204 138.11.254.204    
X-Forwarded-For: 192.168.151.116
References:  <3f04345c@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f0479b4$1@newsgroups.borland.com>
Date: 3 Jul 2003 11:45:08 -0700
X-Trace: newsgroups.borland.com 1057257908 207.105.83.65 (3 Jul 2003 11:45:08 -0700)
Lines: 34
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!newsfeed.bc.tac.net!cyclone.bc.net!logbridge.uoregon.edu!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail