Jane
Joined: 06 Apr 2005
Posts: 4
|
Posted:
Sun Dec 25, 2005 8:55 am Post subject:
How to unload all the resources of WMP? |
|
|
The following is my codes list:
HRESULT hr = CoCreateInstance(__uuidof(WindowsMediaPlayer),
0, CLSCTX_INPROC_SERVER,__uuidof(IWMPCore), (VOID**)&m_pCore);
hr = m_pCore->get_cdromCollection(&pCdromColl);
hr = pCdromColl->getByDriveSpecifier(temDrv, &pCdrom);
hr = pCdrom->get_Playlist(&pList);
hr = pList->Release();
hr = pCdrom->Release();
hr = pCdromColl->Release();
hr = m_pCore->Release();
while(hr>0)
hr = m_pCore->Release();
CoUninitialize();
My trouble is why after I release all the interfaces and call CoUninitialize()(before close my application), the memory can't be released and the file CurrentDatabase_219.wmdb can't be deleted.
Is there any way to release the memory and the file CurrentDatabase_219.wmdb? or Is it normal for media player sdk?
Hope somebody can help me. Thanks a lot.
|
|