Click here to Skip to main content
15,894,337 members
Home / Discussions / COM
   

COM

 
QuestionA basic question ? Pin
Member 470820223-Apr-08 21:01
Member 470820223-Apr-08 21:01 
AnswerRe: A basic question ? Pin
CPallini23-Apr-08 21:23
mveCPallini23-Apr-08 21:23 
GeneralRe: A basic question ? Pin
Member 470820223-Apr-08 21:30
Member 470820223-Apr-08 21:30 
Questionwindows media player plugin Pin
Member 387187821-Apr-08 20:47
Member 387187821-Apr-08 20:47 
AnswerRe: windows media player plugin Pin
Michael Dunn28-Apr-08 11:11
sitebuilderMichael Dunn28-Apr-08 11:11 
QuestionHow to convert COM dll to Normal dll Pin
Prazwol21-Apr-08 20:01
Prazwol21-Apr-08 20:01 
GeneralRe: How to convert COM dll to Normal dll Pin
Mike Dimmick22-Apr-08 2:41
Mike Dimmick22-Apr-08 2:41 
QuestionHow to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: [modified] Pin
XuanThinh TRAN21-Apr-08 16:58
XuanThinh TRAN21-Apr-08 16:58 
Hi,
I have code to find simulated a EHCI controller. But i alway get error 0x80070057 when want to get DSFDevice from DSFDevices collection. Please help me.

const IID_CLSID= "{E927C266-5364-449E-AE52-D6A782AFDA9C}"
......

STDMETHODIMP CLoopbackDevice::CheckSimulatedDev(BSTR CLSID, VARIANT_BOOL *pvBool)
{
HRESULT hr = S_OK;
CComPtr<IDSF> spDsf;
CComPtr<IDSFDevices> spDsfDevices;
CComPtr<IDSFDevice> spDsfDevice;
long mDeviceCount = 0;
short mValue = 0;

*pvBool = VARIANT_FALSE;
hr = spDsf.CoCreateInstance(__uuidof(DSF));
IfFailHrGo(hr); //Go to Exit
//Get Dsfdevices list from root
IfFailHrGo(spDsf->get_Devices(reinterpret_cast<DSFDevices **>(&spDsfDevices)));
//Get number of device in list
IfFailHrGo(spDsfDevices->get_Count(&mDeviceCount));

for(INT i =1; i<= mDeviceCount; i++)
{
VARIANT vt;
VariantInit(&vt);
vt.vt = VT_INT;
vt.intVal = i;
IfFailHrGo(spDsfDevices->get_Item(vt, (DSFDevice **)(&mDsfDevice))); //<-- Error from here
hr = spDsfDevice->HasObject(CLSID, &mValue);
if (mValue && SUCCEEDED (hr) )
{
*pvBool = VARIANT_TRUE;
break;
}
}

Exit:
printf("HR = 0x%X\n", hr); //--->0x80070057
// RELEASE(spDsf);

return hr;
}

xuanthinh

<div class="ForumMod">modified on Tuesday, April 22, 2008 12:09 AM</div>
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
User 21559722-Apr-08 2:51
User 21559722-Apr-08 2:51 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
Vi222-Apr-08 17:28
Vi222-Apr-08 17:28 
QuestionRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
XuanThinh TRAN22-Apr-08 18:27
XuanThinh TRAN22-Apr-08 18:27 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
XuanThinh TRAN22-Apr-08 18:30
XuanThinh TRAN22-Apr-08 18:30 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
Vi223-Apr-08 0:53
Vi223-Apr-08 0:53 
AnswerRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: [modified] Pin
User 21559723-Apr-08 1:49
User 21559723-Apr-08 1:49 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
User 21559729-Apr-08 0:15
User 21559729-Apr-08 0:15 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
XuanThinh TRAN8-May-08 21:43
XuanThinh TRAN8-May-08 21:43 
GeneralRe: How to get DSFDevice from DSFDevices collection (simulated a EHCI controller):sigh: :sigh: Pin
User 2155978-May-08 21:55
User 2155978-May-08 21:55 
GeneralMSXML DOM and MFC Pin
Raja Shekar17-Apr-08 13:34
Raja Shekar17-Apr-08 13:34 
GeneralRe: MSXML DOM and MFC Pin
Baltoro23-Apr-08 13:29
Baltoro23-Apr-08 13:29 
QuestionSinking mshtml.HTMLDocument events in C# BHO Pin
Kim Briggs17-Apr-08 3:26
Kim Briggs17-Apr-08 3:26 
GeneralC++ COM Library Pin
thatsgreat234516-Apr-08 16:58
thatsgreat234516-Apr-08 16:58 
GeneralRe: C++ COM Library Pin
Christian Graus16-Apr-08 17:56
protectorChristian Graus16-Apr-08 17:56 
GeneralAccessing COM Class error during runtime... Pin
Prabakar15-Apr-08 23:31
Prabakar15-Apr-08 23:31 
GeneralReleasing late binding COM object in C# Pin
Crazy Joe Devola15-Apr-08 16:28
Crazy Joe Devola15-Apr-08 16:28 
GeneralRe: Releasing late binding COM object in C# Pin
User 21559715-Apr-08 23:24
User 21559715-Apr-08 23:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.