com.c
来自「这是一个SIGMA方案的PMP播放器的UCLINUX程序,可播放DVD,VCD,」· C语言 代码 · 共 43 行
C
43 行
/****************************************************************************** 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 Definitionsint g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);//called by COM to get the class factory object for a given classHRESULT 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;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?