这是一个SIGMA方案的PMP播放器的UCLINUX程序,可播放DVD,VCD,CD MP3...有很好的参考价值.

源代码在线查看: com.c

软件大小: 10027 K
上传用户: xingxian
关键词: UCLINUX SIGMA PMP DVD
下载地址: 免注册下载 普通下载 VIP

相关代码

				/*****************************************************************************				*  com.c : our implementation of COM				*  REALmagic Quasar Hardware Library				*  Created by Michael Ignaszewski				*  Copyright Sigma Designs Inc				*  Sigma Designs Proprietary and confidential				*  Created on 8/27/99				*  Description:				*****************************************************************************/								#include "pch.h"				#include "template.h"								// General Module Definitions				int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);								//called by COM to get the class factory object for a given class				HRESULT ModCreateInstance(DWORD dwInstance, QIID*  rclsid, QIID* riid, LPVOID * ppv)				{					int i = 0;				    // traverse the array of templates looking for one with this				    // class id				    for (i = 0; i < g_cTemplates; i++) {				        CSDFactoryTemplate * pT = &g_Templates[i];				        if (pT->m_QIID == (QIID*)rclsid)						{				            // found a template - make a class factory based on this				            // template											if (pT->m_lpfnNew != NULL)								pT->m_lpfnNew (ppv, dwInstance);							else								return CLASS_E_CLASSNOTAVAILABLE;				            if (*ppv == NULL) {				                return E_OUTOFMEMORY;				            }				            return NOERROR;				        }				    }				    return CLASS_E_CLASSNOTAVAILABLE;				}											

相关资源