🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Playing a mp3 via mciSendString from Resource ?

#3025
From: Oren Halvani
Date: Tue, 12 Sep 2006 20:51
63 lines
2566 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> schrieb im Newsbeitrag
 news:45071353@newsgroups.borland.com...


> What about it?  What exactly do you want to do?  Why are you trying to load
> WinMM.DLL manually anyway?


Because i don't want my programm to be depend directly to the "WinMM.DLL"
if it's existing, otherwise my programm would be directly "linked" to the DLL...
Only if the DLL is there, than the programm should use its function: "mciSendDtring",


> You never call a DLL's entry point yourself.  It is called automatically by
> the DLL loader.  In the case above, by LoadLibrary().
>
>
> Gambit

sorry, no "entry point"...my mistake.....i mean: GetProcAddress( ) ....

how should i call:

        GetProcAddress((HMODULE)hInstance, "Name_Of_Dll_Function");


i remember, i've used something similar in the past....


in header...
-------------------------------------------------------------------------
private:
   typedef int (DLLFUNCTION)(int, int);

   DLLFUNCTION   *WinMM_DllFunction;

public:
    TDLLTest();
    void CallDllFunction(int iTest1, int iTest2);
}

// in cpp....


TDLLTest::TDLLTest( )
{
   HINSTANCE hInstance;

   hInstance = ::LoadLibrary("DelphiDLL.dll");
   WinMM_DllFunction  = (DLLFUNCTION*)::GetProcAddress((HMODULE)hInstance, "Name_Of_Dll_Function");
}

void TDLLTest::CallDllFunction(int iTest1, int iTest2)
{
    int iResult;

    if (WinMM_DllFunction)  iResult = (*WinMM_DllFunction)(iTest1, iTest2);
}
-------------------------------------------------------------------------



Oren 
Technical Details
Message-ID: <45071dcf@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <450699fa@newsgroups.borland.com> <4506e869$1@newsgroups.borland.com> <4506f88a@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
Reply-To: "Oren Halvani" <Spam@halvani.de>
From: "Oren Halvani" <Spam@halvani.de>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <450699fa@newsgroups.borland.com> <4506e869$1@newsgroups.borland.com> <4506f88a@newsgroups.borland.com>
Subject: Re: Playing a mp3 via mciSendString from Resource ?
Date: Tue, 12 Sep 2006 22:51:25 +0200
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 84.176.86.79
Message-ID: <45071dcf@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158094287 84.176.86.79 (12 Sep 2006 13:51:27 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail