|
|
sorry ,the question :
which error handle is right and commmon?
|
|
|
|
|
I wrappered a class to play video using DirectShow, almost following the sample "playwnd", but i found it cannot destroy the media window by the destructor, unless I destroy the parent window. I checked the state of the player window, it was stopped, but I could still saw it was running after the destructor invoked... Following list the destructor, what is the problem?
<br />
CMediaPlay::~CMediaPlay(void) {<br />
HRESULT hr;<br />
<br />
if (m_pMediaControl)<br />
{<br />
LIF( m_pMediaControl->Stop());<br />
OAFilterState fs;<br />
LIF( m_pMediaControl->GetState(200L, &fs));<br />
if (fs == State_Stopped)<br />
Msg(_T("Successfully stopped the filter run"));<br />
}<br />
<br />
if(m_pVideoWindow)<br />
{<br />
LIF(m_pVideoWindow->put_Visible(OAFALSE));<br />
LIF(m_pVideoWindow->put_Owner(NULL));<br />
}<br />
<br />
if (m_pMediaEventEx)<br />
LIF(m_pMediaEventEx->SetNotifyWindow((OAHWND)NULL, 0, 0));<br />
<br />
#ifdef REGISTER_FILTERGRAPH<br />
if (g_dwGraphRegister)<br />
{<br />
RemoveGraphFromRot(g_dwGraphRegister);<br />
g_dwGraphRegister = 0;<br />
}<br />
#endif<br />
<br />
SAFE_RELEASE(m_pFileSource );<br />
SAFE_RELEASE(m_pVideoDecoder );<br />
SAFE_RELEASE(m_pAVISplitter );<br />
SAFE_RELEASE(m_pSourceReader );<br />
<br />
SAFE_RELEASE(m_pMediaEventEx );<br />
SAFE_RELEASE(m_pMediaSeeking );<br />
SAFE_RELEASE(m_pVideoFrameStep );<br />
SAFE_RELEASE(m_pMediaControl );<br />
SAFE_RELEASE(m_pBasicAudio );<br />
SAFE_RELEASE(m_pBasicVideo );<br />
SAFE_RELEASE(m_pVideoWindow );<br />
SAFE_RELEASE(m_pGraphBuilder );<br />
}<br />
<font=sans-serif>|-|3llo Wo|2ld
|
|
|
|
|
My application was developed under Visual C++ 6.0, ATL, MFC & PlatformSDK Feb2003 (the last VC6 compatible version).
I am wondering if PlatformSDK Feb2003 is compatible with Visual Studio.NET 2003? I am having major problems trying to port/build my application under Visual Studio.NET 2003 using the unmanaged/native C++ compiler.
I was told that Visual Studio.NET 2003 had native C++ compiler support. I am aware about the new C++ 1999 changes (eg. #include <iostream>, using namespace std; etc). However my errors seem to be related to the PlatformSDK Feb2003. eg:
<br />
<br />
<br />
error C2039: 'Delete' : is not a member of 'CCommandEx<TAccessor>' with [TAccessor=ATL::CManualAccessor]<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
error C2065: 'AFX_OLE_DATETIME_ERROR' : undeclared identifier<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
error C2143: syntax error : missing ',' before '<'<br />
<br />
NOTE: what is this issue about templates??? my templates are like:<br />
<br />
(code snip)<br />
template <class TAccessor = CNoAccessor, template <typename T> class TRowset = CRowset><br />
class CAccessorRowset :<br />
public TAccessor,<br />
public TRowset<TAccessor>
{<br />
(code snip>)<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
error C2440: 'type cast' : cannot convert from 'CFile' to 'HFILE'<br />
<br />
(code snip)<br />
if ((HFILE)File==CFile::hFileNull)<br />
(code snip)<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
error C2475: 'CDouble::GetDoubleValue' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name<br />
<br />
(code snip)<br />
if(Value.GetDoubleValue != 0)<br />
(code snip)<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
error C2516: 'TRowset' : is not a legal base class<br />
<br />
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
and there's more. What was wrong with Visual C++ 6.0? and why is there so many errors when trying to compile under Visual Studio.NET 2003? Does anyone know a quick conversion script?
-- modified at 9:07 Monday 6th March, 2006
|
|
|
|
|
Hmm, now that you asked am not sure myself.
I just installed Visual Studio.NET 2003 on another PC and copied my Visual C++ 6.0 entire project over. Then I double-clicked on the .dsw (Visual C++ 6.0 Workspace... solution/collection of projects).
It loaded saying it has to convert the projects into VS.NET 2003 projects. I said yes to all.
Question: But where do I find out whether my solution is building on unmanaged or managed C++?
|
|
|
|
|
Thanks. I manage to fix some of these errors. There's still some errors that
buffle me.
1. DLL creation:
HGBaseu.def(76): fatal error LNK1118: syntax error in '70' statement
(points to)
?CreateThreadProcessor@CGeneralTimerThreadQueue@@MAEPAVCGeneralTimerThread@@V<br />
<br />
CHGVoidCall@@J@Z 70 NONAME
2. Originally it said ostream cannot be inline so I commented that out.
However I don't understand the errors:
GUID.h(54): error C2143: syntax error : missing ';' before '&'<br />
GUID.h(54): error C2501: 'ostream' : missing storage-class or type specifiers<br />
GUID.h(54): error C2065: 'strm' : undeclared identifier<br />
GUID.h(54): error C2065: 'ID' : undeclared identifier<br />
GUID.h(54): error C2275: 'CGUID' : illegal use of this type as an expression<br />
GUID.h(54): error C2501: 'operator`<<'' : missing storage-class or type <br />
<br />
specifiers<br />
GUID.h(54): error C2365: 'operator`<<'' : redefinition; previous definition <br />
<br />
was a 'member function'<br />
GUID.h(54): error C2078: too many initializers<br />
GUID.h(55): error C2143: syntax error : missing ';' before '{'<br />
GUID.h(55): error C2447: '{' : missing function header (old-style formal <br />
<br />
list?)
(all points to)
ostream& operator<<(ostream& strm,CGUID& ID)<br />
{<br />
return strm<< (CString)ID;<br />
}
3. Some problems with namespaces:
SortedArray2.h(75): error C2039: '[]' : is not a member of 'operator``global <br />
<br />
namespace'''
(points to)
inline TYPE& CSortedArray2<TYPE>::operator[](int nIndex)<br />
{<br />
return m_InternalArray[nIndex];<br />
}
I get a lot of repeated errors of the above 3 plus lots of template errors. I
believe Visual C++ 6.0 didn't comply with the C++ standards on how to define
templates right?
-- modified at 11:56 Monday 6th March, 2006
|
|
|
|
|
Often when programs start (i.e. MS Word), there is a small window that shows the program icon, program info, registration info, etc... This window then disappears when the application loads in full. How do I programatically create the small start-up window that lasts until the full program loads?
Thanks,
Blitz
|
|
|
|
|
It's called a "splash screen" or "splash window."
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks, I appreciate the info.
|
|
|
|
|
|
Thanks, I really appreciate the info.
|
|
|
|
|
I want to change the color of the controls like buttons, static etc in a dialog box in MFC.
Can you please tell how to do that?
Thanks in advance.
|
|
|
|
|
There is a brief example of this here, in the Extras section.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
if a .h file contain many lib declaration.and no source .
how to locate a function ?
|
|
|
|
|
intellisense tell you in which file the declaration of your function is on (VS.NET 2003 +),
and msdn tells also at the bottom of a function doc which header is to include to have this function working.
for example, for the cos()[^] cosine function, msdn tells us that the required header is <math.h> , and the function is defined in all the C run-time libs[^]libs are
|
|
|
|
|
I mean 3nd part lib but that has no docment and source.
for dll, I can use depends to work out.
for static lib, which tool can solve it?
|
|
|
|
|
i don't understand. if you know the function you are using, and you know it comes from a 3rd part library, how don't you know the right lib it is embedded in ?
|
|
|
|
|
the function is from one of many libs.but I do not know which lib is it.
a big .h file contain all declaration for those libs.
|
|
|
|
|
|
derek7 wrote: if a .h file contain many lib declaration.and no source .
how to locate a function ?
Use dumpbin
|
|
|
|
|
dumbin and depends only work for dll. how about static lib?
|
|
|
|
|
Hello!!
I would like to concatenate the different lenghts of data (in Hex) which is from the same array.
|
|
|
|
|
What's ur problem. Clearify ur problem.
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
am getting set of data output from a machine, as i should get the data output at a time, say for eg:1024 BYTES at a time in an array[1024], but am getting the data in chunks like
Lenght: 512
0x20 0x65 0x40..........512 bytes
Length:512
0x23 0x45 0xC 0xD......512 bytes
Length's are varying, not constant all the time.
how could i append the second set of data to the first set, say
array[513]=0x23, array[514]=0x45....array[1024].
dont say MEMCPY; if i use it, again the data is being stored as chunks only.
|
|
|
|