Article View: borland.public.cppbuilder.nativeapi
Article #14061DirectSoundEnumerate Fail when program in CPL mode
From: LP
Date: Mon, 25 Aug 2003 09:48
Date: Mon, 25 Aug 2003 09:48
39 lines
2095 bytes
2095 bytes
Hi all,
I am writing a CPL code and using DirectX 9.0 to enumerate my direct sound
audio device.
The direct sound library has transfered to BCB library type and setting
environment is correct.
My question is "When I enumerate my audio device, my CPL program will hang.
Only RunDll32.exe
running in system process but my CPL is disapear".
But if I write the same code to an EXE file, the problem will not exist and
all functions are correct.
Anyone know how to reslove this problem.
Thanks in advance,
L.P
[Note]
The code if running in MFC, the result is correct. (MFC and CPL type)
----------------------------------------------------------------------------
----------------------------------------------------------------
Main Program:
if(GUID_NULL==_guid) // try to find GUID of DSOUND driver
DirectSoundEnumerate(DSEnumProc, 0);
BOOL CALLBACK DSEnumProc(GUID * lpguidDevice, LPCSTR lpszDesc, LPCSTR
lpszDrvName, void * lpContext)
{
if( strstr(lpszDesc,"MyDriverName")!=NULL)
{
_guid=*lpguidDevice;
}
return TRUE;
}
----------------------------------------------------------------------------
----------------------------------------------------------------------------
---
Technical Details
Message-ID:
<3f49db77@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9031ab347532438c,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-08-25 02:52:12 PST From: "LP" <lp.tsai@kimo.com.tw> Newsgroups: borland.public.cppbuilder.nativeapi Subject: DirectSoundEnumerate Fail when program in CPL mode Date: Mon, 25 Aug 2003 17:48:37 +0800 Lines: 42 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: 61.222.72.18 Message-ID: <3f49db77@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1061804919 61.222.72.18 (25 Aug 2003 02:48:39 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail