How to grab still images from ASF files or WMV files.

Posted on 2002-05-22
Medium Priority
Last Modified: 2012-06-27
Hi experts.
I'm a rookie in DirectX Show. I have question. How can I capture still images from ASF files or WMV files.
I used to try IMediaDet, but I failed. When I take advantage of IMediaDet::put_Filename, the HRESULT always tells me a VFW_E_CERTIFICATION_FAILURE error. I dunno why. Can anybody tell the how to do the task? Thanks.

(To me, it's a very hard question)
Question by:FierceBison
  • 2
  • 2
LVL 15

Accepted Solution

lyonst earned 400 total points
ID: 7026519
You should probably start with MSDN ..


The Error is as follows :


Use of this filter is restricted by a software key. The application must unlock the filter.


You should get some help here..


Microsoft DirectX 8.1 (C++)

The put_Filter method specifies a source filter for the media detector to use.


HRESULT put_Filter(
    IUnknown *newVal



[in] Pointer to the source filter's IUnknown interface.

Return Value

Returns an HRESULT value. Possible values include the following:

Value Description
S_OK Success.
E_NOINTERFACE newVal does not point to a filter.
E_POINTER NULL pointer argument.


Instead of calling IMediaDet::put_Filename, an application can call this method with a pointer to a source filter's IUnknown interface. Do not use a filter already connected to the filter graph.

The put_Filename method specifies the name of the source file for the media detector to use.


HRESULT put_Filename(
    BSTR newVal



[in] File name of the source.

Return Value

Returns S_OK if successful. Otherwise, returns an HRESULT value indicating the cause of the error.


LVL 15

Expert Comment

ID: 7029340
Any update ??

Author Comment

ID: 7030927
Don't you think I have to get a software key for Windows Media Format SDK?. But I think what I do is just an ASF Reader not an ASF Writer. Anyway, whether I use ::put_Filename or ::put_Filter, I always get that error code. I'm vexed.

Expert Comment

ID: 7031940

Could you please explain why expert lyonst only received a "C" grade for his answer? Please provide feedback if you are not happy with an answer and our experts will try to clarify their comments.
Here are the guidelines for grading:

A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.

** Mindphaser - Community Support Moderator **

Author Comment

ID: 7036242
Thank you. But because I think that's not a clear answer. I'm sure where I can find Help from MSDN. But the VFW_E_CERTIFICATION_FAILURE is the problem. So I commented above:

"Don't you think I have to get a software key for Windows Media Format SDK?. But I think what I do is
just an ASF Reader not an ASF Writer. Anyway, whether I use ::put_Filename or ::put_Filter, I always
get that error code. I'm vexed."

I think the question might be a piece of cake. Just a software key. Maybe I could solve it as below:

    // set the site provider on the MediaDet object to allowed keyed apps to use ASF decoder
    CComQIPtr< IObjectWithSite, &IID_IObjectWithSite > pOWS( pDet );
    if( pOWS )
        pOWS->SetSite( (IServiceProvider *) &g_prov );
#endif // USE_WMF_CERT
    hr = pDet->put_Filename(...) or pDet->put_Filter(...);

But of course, I'm not sure.

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Keep your audience engaged and get the most out of your next presentation with these quick Prezi tips.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Add visuals to your Prezi to keep your audience engaged. Learn how to embed images, edit them, and more in this video micro tutorial. Select "Insert" from the top menu in your Prezi editor: Select "Image": A toolbar will pop in from the right …
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question