Click here to Skip to main content
Licence 
First Posted 7 Sep 2005
Views 23,882
Bookmarked 32 times

CCodecList

By | 7 Sep 2005 | Article
A class that retrieves a list of Codecs found on the local computer using the registry.

What does the code do

CCodecList's class retrieves a list of Codecs found on the local computer using the registry.

How to use it

The Zip file contains a simple demo. Here it is:

#include "stdafx.h"
#include "CodecList.h"

CCodecList codec; // an object of CCodecList class

int main()
{
    system ("color 5F"); // color
    system ("title Codecs list using the registry..."); // a title

    int nb = codec.m_aCodec.GetCount(); // number of Codec(s)

    if(nb > 0) // Show a list only if at least one Codec is found.
    {
        // loop until we find a Codecs and show (it) them.
        for (int i = 0; i < codec.m_aCodec.GetCount(); i++)
        {
            printf("%s\r\n", codec.m_aCodec[i]);
        }

        printf("\r\n\r\n"); 

        // Here we show numbers of Codecs found.
        printf("--> Found %i Codecs installed on local computer.\r\n\r\n", 
                                           codec.m_aCodec.GetCount());
    }

    else // No Codecs found, inform user.
    {
        printf("No Codecs found.\r\n\r\n");
    }
    

    system("pause"); 
    return 0;
}

Restrictions

Tested and works on Windows XP SP1. To know: some Codecs' description aren't retrieved, like in the case for "ffdshow" and "mastroka". To retrieve more information about Codecs, you should use the WMI.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

sicks

Web Developer

France France

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralHere is my approach PinmemberJustin Hallet22:46 8 Sep '05  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120517.1 | Last Updated 7 Sep 2005
Article Copyright 2005 by sicks
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid