Пример #1
0
void Init_Logging(IHXTLogWriter** ppILog)
{
    HXScopeLock lock(g_pCreationMutex);

    g_bTriedInit = TRUE;

    if (!g_pLogSystem)
    {
        UINT32 ulNameLen = 255;
        CHXString strDllName;
        DLLAccess::CreateName("log", "log", strDllName.GetBuffer(ulNameLen+1), ulNameLen, 0, 0);
        strDllName.ReleaseBuffer();

        FPCREATELOGSYSTEMINTERFACE fpCreateLogSystem = NULL;
        if (g_LogDLL.isOpen() || g_LogDLL.open(strDllName, DLLTYPE_ENCSDK) == DLLAccess::DLL_OK)
        {
            fpCreateLogSystem = (FPCREATELOGSYSTEMINTERFACE)(g_LogDLL.getSymbol("RMACreateLogSystem"));
        }

        // Note: Application is reponsible should display warning msg that logging
        // failed to load.  SDK plugins should not printf anything
        DoLogSystemInterfaceInit(fpCreateLogSystem, NULL);
        if (g_pLogWriter)
        {
            g_pLogWriter->QueryInterface(IID_IHXTLogWriter, (void**)ppILog);
        }
    }
}
Пример #2
0
HX_RESULT CHXAudioDeviceDS::RegisterDirectSoundFilter()
{
    HX_RESULT res = HXR_OK;

#ifdef HELIX_FEATURE_AUDIO_DEVICE_HOOKS
    DLLAccess dllAccess;
    CHXString strPath;

    if(SUCCEEDED(GetFilterPathFromRegistry(strPath)))
    {
	if(dllAccess.open(strPath) == DLLAccess::DLL_OK &&
	    dllAccess.getSymbol("DllGetClassObject") != NULL)
	    return HXR_OK;
    }

    strPath = GetDLLAccessPath()->GetPath(DLLTYPE_COMMON);
    if(strPath.Right(1) != "\\")
	strPath += '\\';
    strPath += "HXAudioDeviceHook.dll";

    if(dllAccess.open(strPath) != DLLAccess::DLL_OK)
	return HXR_FAIL;

    FPDLLREGSVR fpDllRegisterServer = (FPDLLREGSVR) dllAccess.getSymbol("DllRegisterServer");
    if(fpDllRegisterServer == NULL)
	return HXR_FAIL;
    
    res = fpDllRegisterServer();
#endif
    return res;

}