Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/rarfilesource.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmada <jules.blok@gmail.com>2013-02-02 03:18:53 +0400
committerArmada <jules.blok@gmail.com>2013-02-12 02:05:56 +0400
commit59e45130f0f1d3145795cdd94e7dd028da077a01 (patch)
treea1214bef730865e7765f043abd83ac707fe5cfe3
parentf56d14a4049181c1cf3e444150feac90c2717397 (diff)
Add custom code for MPC-HC compatibility.1.6.6-1
-rw-r--r--RFS.cpp15
-rw-r--r--RFS.rc4
-rw-r--r--Utils.cpp2
-rw-r--r--resource.h2
4 files changed, 21 insertions, 2 deletions
diff --git a/RFS.cpp b/RFS.cpp
index 41e7967..92a7b4f 100644
--- a/RFS.cpp
+++ b/RFS.cpp
@@ -16,7 +16,9 @@
#include <windows.h>
#include <streams.h>
+#ifdef STANDALONE_FILTER
#include <initguid.h>
+#endif
#include <strsafe.h>
#include "RFS.h"
@@ -35,6 +37,8 @@
DEFINE_GUID(MEDIASUBTYPE_Matroska,
0x1AC0BEBD, 0x4D2B, 0x45AD, 0xBC, 0xEB, 0xF2, 0xC4, 0x1C, 0x5E, 0x37, 0x88);
+#ifdef STANDALONE_FILTER
+
// Setup information
const AMOVIESETUP_MEDIATYPE sudPinTypes =
{
@@ -61,7 +65,8 @@ const AMOVIESETUP_FILTER sudRARFileSource =
RARFileSourceName, // Filter name
MERIT_UNLIKELY, // Filter merit
1, // Number of pins
- &sudpPin // Pin information
+ &sudpPin, // Pin information
+ CLSID_LegacyAmFilterCategory
};
// List of class IDs and creator functions for the class factory.
@@ -79,6 +84,7 @@ CFactoryTemplate g_Templates [] =
int g_cTemplates = sizeof (g_Templates) / sizeof (g_Templates [0]);
+#endif
/* static */
file_type_t CRARFileSource::s_file_types [] =
@@ -99,6 +105,7 @@ file_type_t CRARFileSource::s_file_types [] =
{ NULL, NULL }
};
+#ifdef STANDALONE_FILTER
extern "C" BOOL WINAPI DllEntryPoint (HINSTANCE, ULONG, LPVOID);
@@ -197,6 +204,8 @@ STDAPI DllUnregisterServer ()
return AMovieDllRegisterServer2 (FALSE);
}
+#endif
+
CRARFileSource::CRARFileSource (LPUNKNOWN punk, HRESULT *phr) :
CBaseFilter (RARFileSourceName, punk, &m_lock, __uuidof(CRARFileSource)),
m_pin (this, &m_lock, phr),
@@ -821,7 +830,11 @@ STDMETHODIMP CRARFileSource::Load (LPCOLESTR lpwszFileName, const AM_MEDIA_TYPE
}
else
{
+#ifdef STANDALONE_FILTER
m_file = (CRFSFile *) DialogBoxParam (g_hInst, MAKEINTRESOURCE(IDD_FILELIST), 0, DlgFileList, (LPARAM) &file_list);
+#else
+ m_file = (CRFSFile *) DialogBoxParam (GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_FILELIST), 0, DlgFileList, (LPARAM) &file_list);
+#endif
if (!m_file)
{
diff --git a/RFS.rc b/RFS.rc
index 38c45a0..eda41f7 100644
--- a/RFS.rc
+++ b/RFS.rc
@@ -7,6 +7,8 @@
// Version
//
+#ifdef STANDALONE_FILTER
+
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,9,3,0
PRODUCTVERSION 0,9,3,0
@@ -42,6 +44,8 @@ BEGIN
END
END
+#endif
+
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
diff --git a/Utils.cpp b/Utils.cpp
index 786c3fb..db40f83 100644
--- a/Utils.cpp
+++ b/Utils.cpp
@@ -45,7 +45,9 @@ void ErrorMsg (DWORD errorCode, wchar_t *format, ...)
}
DbgLog((LOG_ERROR, 0, L"%s", buffer));
+#ifdef STANDALONE_FILTER
MessageBox (NULL, buffer, RARFileSourceName, MB_OK | MB_ICONERROR);
+#endif
}
#ifdef _DEBUG
diff --git a/resource.h b/resource.h
index 7015f1e..7bdeb26 100644
--- a/resource.h
+++ b/resource.h
@@ -2,4 +2,4 @@
#define IDOK 1
#define IDCANCEL 2
#define IDC_FILELIST 1000
-#define IDD_FILELIST 2000
+#define IDD_FILELIST 10057