ctester


Hi am pretty new to the forums, am trying to make a smple apps to read a dvd movie ID am using the GetDiscID method but i cant make it work can someone help me or point me in the right direction
i read this :
http://msdn2.microsoft.com/en-us/library/ms785496.aspx

what are the steps , do I have to initialized the idvdgraph to just read the disc id
or only the dvd navigator filter

need help


Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

Mike Wasson-MSFT

Both of these worked for me:

Code Block

CComPtr<IDvdInfo2> pInfo;

ULONGLONG id = 0;

hr = pInfo.CoCreateInstance(CLSID_DVDNavigator);

hr = pInfo->GetDiscID(NULL, &id);

// or

hr = pInfo->GetDiscID(L"E:\\VIDEO_TS\\", &id);

Did you get a specific error code

----------------------------------------------------------------------------
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.






Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

ctester

like 5 errors ...first am using C++ VS 2005.

is that all the code

thanks... I was like giving up on this cause no one answer the post.




Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

Mike Wasson-MSFT

The only thing I left out was CoInitialize/CoUninitialize. What errors

----------------------------------------------------------------------------
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.







Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

ctester

Error 10 error C2296: '/' : illegal, left operand has type 'HRESULT (__stdcall *)(LPVOID)' c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 11 error C2297: '/' : illegal, right operand has type 'void (__stdcall *)(void)' c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 12 error C2146: syntax error : missing ';' before identifier 'CComPtr' c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 13 error C2065: 'CComPtr' : undeclared identifier c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 14 error C2275: 'IDvdInfo2' : illegal use of this type as an expression c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 15 error C2065: 'pInfo' : undeclared identifier c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 12
Error 16 error C2065: 'hr' : undeclared identifier c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 18
Error 17 error C2228: left of '.CoCreateInstance' must have class/struct/union c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 18
Error 18 error C2227: left of '->GetDiscID' must point to class/struct/union/generic type c:\users\reaven\documents\visual studio 2005\projects\dvdtest\dvdtest\dvdtest.cpp 20




just somes !! sorry am a bit rookie in this

am only want to take that number a send it to a text file ...




Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

Chris P.

#include <streams.h>

When in doubt always refer to the samples.






Re: DirectShow Development Getting start with IDvdInfo2::GetDiscID

Mike Wasson-MSFT

Also:

Error 13 error C2065: 'CComPtr' : undeclared identifier c:\users\reaven\documents\visual studio 2005

# include <atlbase.h>

----------------------------------------------------------------------------
Mike Wasson, SDK Documentation
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

(c) 2007 Microsoft Corporation. All rights reserved.