DirectShow and ActiveX Control Combine Problem Solutions

xiaoxiao2021-03-06  75

The error was: strmbase.lib (dllentry.obj): error LNK2001: unresolved external symbol "class CFactoryTemplate * g_Templates" (g_Templates @@ 3PAVCFactoryTemplate @@ A?) Strmbase.lib (dllentry.obj): error LNK2001: unresolved external symbol " INT g_ctemplates "(? g_ctemplates @@ 3ha )

----------------------------solution-------------------- ------------------

Open the XXX_XXCTL.h header file, these code started at the beginning

#if! defined (AFX_OCX_MICPHONECTL_H__3388C6A4_9DE5_4D2F_9021_920EF2BF5CAB__INCLUDED_)

#define AFX_OCX_MICPHONECTL_H__3388C6A4_9DE5_4D2F_9021_920EF2BF5CAB__INCLUDED_

#iF _MSC_VER> 1000

#pragma overce

#ENDIF / / 100 m _ _ _

The following is added below:

/

// DLLGETCLASSOBJECT

EXTERN "C"

StDAPI DLLGETCLASSOBJECT (Refclsid Rclsid, Refiid Riid, LPVOID * PPV)

{

AFX_MANAGE_STATE (AFXGETSTATICModuleState ());

Return AFXDLLGETCLASSOBJECT (RCLSID, RIID, PPV);

}

/

// DLLCanunloadNow

EXTERN "C"

StDAPI DLLCanunloadNow (Void)

{

AFX_MANAGE_STATE (AFXGETSTATICModuleState ());

Return AFXDLCanunloadNow ();

}

Re-build!

转载请注明原文地址:https://www.9cbs.com/read-108556.html

New Post(0)