Răsfoiți Sursa

added IDispatchEx support for dynamic scripting features

Arkady Trestman 16 ani în urmă
părinte
comite
f7566dc280

+ 275 - 272
direct/src/plugin_activex/P3DActiveX.vcproj

@@ -1,272 +1,275 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="P3DActiveX"
-	ProjectGUID="{74451B00-2D87-412B-9359-B5CA2C2FEC2A}"
-	Keyword="MFCActiveXProj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="2"
-			UseOfMFC="2"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\include;&quot;..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32&quot;"
-				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="2"
-				TreatWChar_tAsBuiltInType="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib"
-				OutputFile="$(OutDir)/P3DActiveX.ocx"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;../../../wintools/sdk/openssl/openssl-0.9.6d/out32.dbg&quot;;../../../wintools/built/lib"
-				IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
-				ModuleDefinitionFile=".\P3DActiveX.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				ImportLibrary="$(OutDir)/P3DActiveX.lib"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="_DEBUG"
-				MkTypLibCompatible="FALSE"
-				TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
-				HeaderFileName="$(ProjectName)idl.h"/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				Description="Performing registration"
-				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="2"
-			UseOfMFC="2"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\include;&quot;..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32&quot;"
-				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
-				RuntimeLibrary="2"
-				TreatWChar_tAsBuiltInType="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="TRUE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib"
-				OutputFile="$(OutDir)/P3DActiveX.ocx"
-				LinkIncremental="1"
-				AdditionalLibraryDirectories="&quot;../../../wintools/sdk/openssl/openssl-0.9.6d/out32&quot;;../../../wintools/built/lib"
-				IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
-				ModuleDefinitionFile=".\P3DActiveX.def"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/P3DActiveX.lib"
-				TargetMachine="1"
-				FixedBaseAddress="1"/>
-			<Tool
-				Name="VCMIDLTool"
-				PreprocessorDefinitions="NDEBUG"
-				MkTypLibCompatible="FALSE"
-				TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
-				HeaderFileName="$(ProjectName)idl.h"/>
-			<Tool
-				Name="VCPostBuildEventTool"
-				Description="Performing registration"
-				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath="..\plugin\fileSpec.cxx">
-			</File>
-			<File
-				RelativePath="..\plugin\find_root_dir.cxx">
-			</File>
-			<File
-				RelativePath="..\plugin\load_plugin.cxx">
-			</File>
-			<File
-				RelativePath="..\plugin\mkdir_complete.cxx">
-			</File>
-			<File
-				RelativePath=".\P3DActiveX.cpp">
-			</File>
-			<File
-				RelativePath=".\P3DActiveX.idl">
-			</File>
-			<File
-				RelativePath=".\P3DActiveXCtrl.cpp">
-			</File>
-			<File
-				RelativePath=".\P3DActiveXPropPage.cpp">
-			</File>
-			<File
-				RelativePath=".\PPBrowserObject.cpp">
-			</File>
-			<File
-				RelativePath=".\PPDownloadCallback.cpp">
-			</File>
-			<File
-				RelativePath=".\PPDownloadRequest.cpp">
-			</File>
-			<File
-				RelativePath=".\PPInstance.cpp">
-			</File>
-			<File
-				RelativePath=".\PPInterface.cpp">
-			</File>
-			<File
-				RelativePath=".\PPLogger.cpp">
-			</File>
-			<File
-				RelativePath=".\PPPandaObject.cpp">
-			</File>
-			<File
-				RelativePath=".\stdafx.cpp">
-				<FileConfiguration
-					Name="Debug|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="1"/>
-				</FileConfiguration>
-				<FileConfiguration
-					Name="Release|Win32">
-					<Tool
-						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="1"/>
-				</FileConfiguration>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath=".\P3DActiveX.h">
-			</File>
-			<File
-				RelativePath=".\P3DActiveXCtrl.h">
-			</File>
-			<File
-				RelativePath=".\P3DActiveXPropPage.h">
-			</File>
-			<File
-				RelativePath=".\PPBrowserObject.h">
-			</File>
-			<File
-				RelativePath=".\PPDownloadCallback.h">
-			</File>
-			<File
-				RelativePath=".\PPDownloadRequest.h">
-			</File>
-			<File
-				RelativePath=".\PPInstance.h">
-			</File>
-			<File
-				RelativePath=".\PPInterface.h">
-			</File>
-			<File
-				RelativePath=".\PPLogger.h">
-			</File>
-			<File
-				RelativePath=".\PPPandaObject.h">
-			</File>
-			<File
-				RelativePath=".\Resource.h">
-			</File>
-			<File
-				RelativePath=".\stdafx.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-			<File
-				RelativePath=".\P3DActiveX.rc">
-			</File>
-			<File
-				RelativePath=".\P3DActiveXCtrl.bmp">
-			</File>
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt">
-		</File>
-	</Files>
-	<Globals>
-		<Global
-			Name="RESOURCE_FILE"
-			Value="P3DActiveX.rc"/>
-	</Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="P3DActiveX"
+	ProjectGUID="{74451B00-2D87-412B-9359-B5CA2C2FEC2A}"
+	Keyword="MFCActiveXProj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="Debug"
+			IntermediateDirectory="Debug"
+			ConfigurationType="2"
+			UseOfMFC="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\plugin;..\..\..\dtool\src\dtoolbase;..\..\..\dtool;..\..\..\wintools\include;&quot;..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32&quot;"
+				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="2"
+				TreatWChar_tAsBuiltInType="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib mfcs71d.lib"
+				OutputFile="$(OutDir)/P3DActiveX.ocx"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;../../../wintools/sdk/openssl/openssl-0.9.6d/out32.dbg&quot;;../../../wintools/built/lib"
+				IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
+				ModuleDefinitionFile=".\P3DActiveX.def"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				ImportLibrary="$(OutDir)/P3DActiveX.lib"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="_DEBUG"
+				MkTypLibCompatible="FALSE"
+				TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
+				HeaderFileName="$(ProjectName)idl.h"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Performing registration"
+				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="Release"
+			IntermediateDirectory="Release"
+			ConfigurationType="2"
+			UseOfMFC="2"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\plugin;..\..\..\dtool\src\dtoolbase;..\..\..\dtool;..\..\..\wintools\include;&quot;..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32&quot;"
+				PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
+				RuntimeLibrary="2"
+				TreatWChar_tAsBuiltInType="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib mfcs71.lib"
+				OutputFile="$(OutDir)/P3DActiveX.ocx"
+				LinkIncremental="1"
+				AdditionalLibraryDirectories="&quot;../../../wintools/sdk/openssl/openssl-0.9.6d/out32&quot;;../../../wintools/built/lib"
+				IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
+				ModuleDefinitionFile=".\P3DActiveX.def"
+				GenerateDebugInformation="TRUE"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				ImportLibrary="$(OutDir)/P3DActiveX.lib"
+				TargetMachine="1"
+				FixedBaseAddress="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				PreprocessorDefinitions="NDEBUG"
+				MkTypLibCompatible="FALSE"
+				TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
+				HeaderFileName="$(ProjectName)idl.h"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="Performing registration"
+				CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath="..\plugin\fileSpec.cxx">
+			</File>
+			<File
+				RelativePath="..\plugin\find_root_dir.cxx">
+			</File>
+			<File
+				RelativePath="..\plugin\load_plugin.cxx">
+			</File>
+			<File
+				RelativePath="..\plugin\mkdir_complete.cxx">
+			</File>
+			<File
+				RelativePath=".\P3DActiveX.cpp">
+			</File>
+			<File
+				RelativePath=".\P3DActiveX.idl">
+			</File>
+			<File
+				RelativePath=".\P3DActiveXCtrl.cpp">
+			</File>
+			<File
+				RelativePath=".\P3DActiveXPropPage.cpp">
+			</File>
+			<File
+				RelativePath=".\PPBrowserObject.cpp">
+			</File>
+			<File
+				RelativePath=".\PPDownloadCallback.cpp">
+			</File>
+			<File
+				RelativePath=".\PPDownloadRequest.cpp">
+			</File>
+			<File
+				RelativePath=".\PPInstance.cpp">
+			</File>
+			<File
+				RelativePath=".\PPInterface.cpp">
+			</File>
+			<File
+				RelativePath=".\PPLogger.cpp">
+			</File>
+			<File
+				RelativePath=".\PPPandaObject.cpp">
+			</File>
+			<File
+				RelativePath=".\stdafx.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath="..\plugin\mkdir_complete.h">
+			</File>
+			<File
+				RelativePath=".\P3DActiveX.h">
+			</File>
+			<File
+				RelativePath=".\P3DActiveXCtrl.h">
+			</File>
+			<File
+				RelativePath=".\P3DActiveXPropPage.h">
+			</File>
+			<File
+				RelativePath=".\PPBrowserObject.h">
+			</File>
+			<File
+				RelativePath=".\PPDownloadCallback.h">
+			</File>
+			<File
+				RelativePath=".\PPDownloadRequest.h">
+			</File>
+			<File
+				RelativePath=".\PPInstance.h">
+			</File>
+			<File
+				RelativePath=".\PPInterface.h">
+			</File>
+			<File
+				RelativePath=".\PPLogger.h">
+			</File>
+			<File
+				RelativePath=".\PPPandaObject.h">
+			</File>
+			<File
+				RelativePath=".\Resource.h">
+			</File>
+			<File
+				RelativePath=".\stdafx.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+			<File
+				RelativePath=".\P3DActiveX.rc">
+			</File>
+			<File
+				RelativePath=".\P3DActiveXCtrl.bmp">
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt">
+		</File>
+	</Files>
+	<Globals>
+		<Global
+			Name="RESOURCE_FILE"
+			Value="P3DActiveX.rc"/>
+	</Globals>
+</VisualStudioProject>

+ 1 - 1
direct/src/plugin_activex/PPInstance.cpp

@@ -492,7 +492,7 @@ int PPInstance::Start( const std::string& p3dFilename  )
         nout << "Error creating P3D instance: " << GetLastError() << "\n"; 
         return 1;
     }
-    CComPtr<IDispatch> pDispatch;
+    CComPtr<IDispatchEx> pDispatch;
     PPBrowserObject *pobj = new PPBrowserObject( &m_parentCtrl, pDispatch );
     P3D_instance_set_browser_script_object( m_p3dInstance, pobj );
     P3D_OBJECT_DECREF( pobj );

+ 27 - 3
direct/src/plugin_activex/PPInterface.cpp

@@ -56,8 +56,19 @@ HRESULT PPInterface::Invoke(int nType, IDispatch* pDisp, CString& ptName, VARIAN
     DISPPARAMS dp = { NULL, NULL, 0, 0 };
     DISPID dispidNamed = DISPID_PROPERTYPUT;
     DISPID dispID;
+    CComPtr<IDispatchEx> pDispEx;
 
     HRESULT hr = GetIdOfName( pDisp, ptName, &dispID );
+    if ( DISP_E_UNKNOWNNAME == hr )
+    {
+        hr = pDisp->QueryInterface( IID_IDispatchEx, ( void** )&pDispEx );
+        if ( SUCCEEDED( hr ) && pDispEx )
+        {
+            OLECHAR* pElementName = ptName.AllocSysString();
+            hr = pDispEx->GetDispID( pElementName, fdexNameEnsure, &dispID );
+            SysFreeString( pElementName );
+        }
+    }
     if ( FAILED( hr ) )
     {
         return hr;
@@ -90,9 +101,16 @@ HRESULT PPInterface::Invoke(int nType, IDispatch* pDisp, CString& ptName, VARIAN
     }
 
     // Make the call!
-    hr = pDisp->Invoke( dispID, IID_NULL, LOCALE_SYSTEM_DEFAULT, 
-                       nType, &dp, pvResult, NULL, NULL );
-
+    if ( pDispEx )
+    {
+        hr = pDispEx->InvokeEx(dispID, LOCALE_USER_DEFAULT, 
+                        nType, &dp, pvResult, NULL, NULL);
+    }
+    else
+    {
+        hr = pDisp->Invoke( dispID, IID_NULL, LOCALE_USER_DEFAULT, 
+                        nType, &dp, pvResult, NULL, NULL );
+    }
     delete [] pArgs;
 
     return hr;
@@ -118,6 +136,12 @@ HRESULT PPInterface::GetHtmlDocDispatch( CComPtr<IDispatch>& pDispScript )
     hr = pHtmlDoc->get_Script( &pDispScript );
     ASSERT( SUCCEEDED( hr ) && pDispScript );
 
+    CComPtr<IDispatchEx> pDispExScript;
+    hr = pDispScript->QueryInterface( IID_IDispatchEx, ( void** )&pDispExScript );
+    ASSERT( SUCCEEDED( hr ) && pDispExScript );
+
+    pDispScript = pDispExScript;
+
     CComPtr<ITypeInfo> pTypeInfo;
     hr = pDispScript->GetTypeInfo( 0, 0, &pTypeInfo );
 

+ 4 - 3
direct/src/plugin_activex/PPLogger.cpp

@@ -16,6 +16,7 @@
 
 #include "windows.h"
 #include "PPLogger.h"
+#include "mkdir_complete.h"
 
 std::ofstream PPLogger::m_logfile;
 bool PPLogger::m_isOpen = false;
@@ -107,7 +108,7 @@ void PPLogger::Open( const std::string &rootDir )
     if (log_directory.empty()) {
       log_directory = rootDir + "/log";
     }
-    mkdir_complete(log_directory, cerr);
+    mkdir_complete(log_directory, std::cerr);
 
     // Ensure that the log directory ends with a slash.
     if (!log_directory.empty() && log_directory[log_directory.size() - 1] != '/') {
@@ -132,8 +133,8 @@ void PPLogger::Open( const std::string &rootDir )
       log_pathname += ".log";
       
       m_logfile.clear();
-      m_logfile.open(log_pathname.c_str(), ios::out | ios::trunc);
-      m_logfile.setf(ios::unitbuf);
+      m_logfile.open(log_pathname.c_str(), std::ios::out | std::ios::trunc);
+      m_logfile.setf(std::ios::unitbuf);
     }
 
     // If we didn't have a logfile name compiled in, we throw away log

+ 2 - 0
direct/src/plugin_activex/stdafx.h

@@ -41,3 +41,5 @@
 #include <afxdao.h>         // MFC DAO database classes
 #include <afxwin.h>
 
+#include <dispex.h>
+