Article View: borland.public.cppbuilder.nativeapi
Article #3026Re: Playing a mp3 via mciSendString from Resource ?
From: Remy Lebeau (TeamB)
Date: Tue, 12 Sep 2006 21:40
Date: Tue, 12 Sep 2006 21:40
46 lines
2398 bytes
2398 bytes
"Oren Halvani" <Spam@halvani.de> wrote in message
news:45071dcf@newsgroups.borland.com...
> Because i don't want my programm to be depend directly
> to the "WinMM.DLL" if it's existing
Why not? That is a Microsoft DLL that is on all Windows systems. Since you
are using the Windows Multimedia system anyway, you are better off
statically linking to it. There is no point in dynamically loading it in
your code.
> otherwise my programm would be directly "linked" to the DLL...
As it should be. That DLL is always available.
> Only if the DLL is there
The DLL is part of the Windows OS, and has been since the days of Windows 95
and NT 3.1. It is been available on all Sindows systems ever since.
> how should i call:
>
> GetProcAddress((HMODULE)hInstance, "Name_Of_Dll_Function");
>
>
> i remember, i've used something similar in the past....
That is how to dynamically load a DLL function. So what exactly are you
having a problem with? Please be more specific.
> typedef int (DLLFUNCTION)(int, int);
Use a pointer in the typedef, not in the variable declarations:
typedef int (*DLLFUNCTION)(int, int);
DLLFUNCTION WinMM_DllFunction;
WinMM_DllFunction = (DLLFUNCTION) ::GetProcAddress(hInstance,
"Name_Of_Dll_Function");
iResult = WinMM_DllFunction(iTest1, iTest2);
Gambit
Technical Details
Message-ID:
<450729d7$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<450699fa@newsgroups.borland.com> <4506e869$1@newsgroups.borland.com> <4506f88a@newsgroups.borland.com> <45071dcf@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,42c0c0944bd6516a X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <450699fa@newsgroups.borland.com> <4506e869$1@newsgroups.borland.com> <4506f88a@newsgroups.borland.com> <45071dcf@newsgroups.borland.com> Subject: Re: Playing a mp3 via mciSendString from Resource ? Date: Tue, 12 Sep 2006 14:40:09 -0700 Lines: 48 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 70.40.40.167 Message-ID: <450729d7$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1158097367 70.40.40.167 (12 Sep 2006 14:42:47 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail