mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
added IDispatchEx support for dynamic scripting features
This commit is contained in:
parent
1386c733d8
commit
f7566dc280
@ -1,272 +1,275 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="7.10"
|
Version="7.10"
|
||||||
Name="P3DActiveX"
|
Name="P3DActiveX"
|
||||||
ProjectGUID="{74451B00-2D87-412B-9359-B5CA2C2FEC2A}"
|
ProjectGUID="{74451B00-2D87-412B-9359-B5CA2C2FEC2A}"
|
||||||
Keyword="MFCActiveXProj">
|
Keyword="MFCActiveXProj">
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="Win32"/>
|
Name="Win32"/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="Debug"
|
OutputDirectory="Debug"
|
||||||
IntermediateDirectory="Debug"
|
IntermediateDirectory="Debug"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="2"
|
UseOfMFC="2"
|
||||||
CharacterSet="2">
|
CharacterSet="2">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\include;"..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32""
|
AdditionalIncludeDirectories="..\plugin;..\..\..\dtool\src\dtoolbase;..\..\..\dtool;..\..\..\wintools\include;"..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32""
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
|
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG;_USRDLL"
|
||||||
MinimalRebuild="TRUE"
|
MinimalRebuild="TRUE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
TreatWChar_tAsBuiltInType="TRUE"
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3"/>
|
DebugInformationFormat="3"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib"
|
AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib mfcs71d.lib"
|
||||||
OutputFile="$(OutDir)/P3DActiveX.ocx"
|
OutputFile="$(OutDir)/P3DActiveX.ocx"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""../../../wintools/sdk/openssl/openssl-0.9.6d/out32.dbg";../../../wintools/built/lib"
|
AdditionalLibraryDirectories=""../../../wintools/sdk/openssl/openssl-0.9.6d/out32.dbg";../../../wintools/built/lib"
|
||||||
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
|
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
|
||||||
ModuleDefinitionFile=".\P3DActiveX.def"
|
ModuleDefinitionFile=".\P3DActiveX.def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
ImportLibrary="$(OutDir)/P3DActiveX.lib"
|
ImportLibrary="$(OutDir)/P3DActiveX.lib"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
FixedBaseAddress="1"/>
|
FixedBaseAddress="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
PreprocessorDefinitions="_DEBUG"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
MkTypLibCompatible="FALSE"
|
MkTypLibCompatible="FALSE"
|
||||||
TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
|
TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
|
||||||
HeaderFileName="$(ProjectName)idl.h"/>
|
HeaderFileName="$(ProjectName)idl.h"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
Description="Performing registration"
|
Description="Performing registration"
|
||||||
CommandLine="regsvr32 /s /c "$(TargetPath)""/>
|
CommandLine="regsvr32 /s /c "$(TargetPath)""/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions="_DEBUG"
|
PreprocessorDefinitions="_DEBUG"
|
||||||
Culture="1033"
|
Culture="1033"
|
||||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="Release"
|
OutputDirectory="Release"
|
||||||
IntermediateDirectory="Release"
|
IntermediateDirectory="Release"
|
||||||
ConfigurationType="2"
|
ConfigurationType="2"
|
||||||
UseOfMFC="2"
|
UseOfMFC="2"
|
||||||
CharacterSet="2">
|
CharacterSet="2">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="..\plugin;..\..\..\wintools\include;"..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32""
|
AdditionalIncludeDirectories="..\plugin;..\..\..\dtool\src\dtoolbase;..\..\..\dtool;..\..\..\wintools\include;"..\..\..\wintools\sdk\openssl\openssl-0.9.6d\inc32""
|
||||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
|
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_USRDLL"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
TreatWChar_tAsBuiltInType="TRUE"
|
TreatWChar_tAsBuiltInType="TRUE"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
Detect64BitPortabilityProblems="TRUE"
|
||||||
DebugInformationFormat="3"/>
|
DebugInformationFormat="3"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"/>
|
Name="VCCustomBuildTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib"
|
AdditionalDependencies="tinyxml.lib ssleay32.lib libeay32.lib mfcs71.lib"
|
||||||
OutputFile="$(OutDir)/P3DActiveX.ocx"
|
OutputFile="$(OutDir)/P3DActiveX.ocx"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories=""../../../wintools/sdk/openssl/openssl-0.9.6d/out32";../../../wintools/built/lib"
|
AdditionalLibraryDirectories=""../../../wintools/sdk/openssl/openssl-0.9.6d/out32";../../../wintools/built/lib"
|
||||||
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
|
IgnoreDefaultLibraryNames="LIBCI.LIB MSVCRTD.LIB MSVCRT.LIB"
|
||||||
ModuleDefinitionFile=".\P3DActiveX.def"
|
ModuleDefinitionFile=".\P3DActiveX.def"
|
||||||
GenerateDebugInformation="TRUE"
|
GenerateDebugInformation="TRUE"
|
||||||
SubSystem="2"
|
SubSystem="2"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
ImportLibrary="$(OutDir)/P3DActiveX.lib"
|
ImportLibrary="$(OutDir)/P3DActiveX.lib"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
FixedBaseAddress="1"/>
|
FixedBaseAddress="1"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
MkTypLibCompatible="FALSE"
|
MkTypLibCompatible="FALSE"
|
||||||
TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
|
TypeLibraryName="$(IntDir)/$(ProjectName).tlb"
|
||||||
HeaderFileName="$(ProjectName)idl.h"/>
|
HeaderFileName="$(ProjectName)idl.h"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
Description="Performing registration"
|
Description="Performing registration"
|
||||||
CommandLine="regsvr32 /s /c "$(TargetPath)""/>
|
CommandLine="regsvr32 /s /c "$(TargetPath)""/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"/>
|
Name="VCPreBuildEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"/>
|
Name="VCPreLinkEventTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
PreprocessorDefinitions="NDEBUG"
|
PreprocessorDefinitions="NDEBUG"
|
||||||
Culture="1033"
|
Culture="1033"
|
||||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
Name="VCWebServiceProxyGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
Name="VCXMLDataGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebDeploymentTool"/>
|
Name="VCWebDeploymentTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
Name="VCManagedWrapperGeneratorTool"/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||||
<File
|
<File
|
||||||
RelativePath="..\plugin\fileSpec.cxx">
|
RelativePath="..\plugin\fileSpec.cxx">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\plugin\find_root_dir.cxx">
|
RelativePath="..\plugin\find_root_dir.cxx">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\plugin\load_plugin.cxx">
|
RelativePath="..\plugin\load_plugin.cxx">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\plugin\mkdir_complete.cxx">
|
RelativePath="..\plugin\mkdir_complete.cxx">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveX.cpp">
|
RelativePath=".\P3DActiveX.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveX.idl">
|
RelativePath=".\P3DActiveX.idl">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveXCtrl.cpp">
|
RelativePath=".\P3DActiveXCtrl.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveXPropPage.cpp">
|
RelativePath=".\P3DActiveXPropPage.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPBrowserObject.cpp">
|
RelativePath=".\PPBrowserObject.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPDownloadCallback.cpp">
|
RelativePath=".\PPDownloadCallback.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPDownloadRequest.cpp">
|
RelativePath=".\PPDownloadRequest.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPInstance.cpp">
|
RelativePath=".\PPInstance.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPInterface.cpp">
|
RelativePath=".\PPInterface.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPLogger.cpp">
|
RelativePath=".\PPLogger.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPPandaObject.cpp">
|
RelativePath=".\PPPandaObject.cpp">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\stdafx.cpp">
|
RelativePath=".\stdafx.cpp">
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Debug|Win32">
|
Name="Debug|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="1"/>
|
UsePrecompiledHeader="1"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
<FileConfiguration
|
<FileConfiguration
|
||||||
Name="Release|Win32">
|
Name="Release|Win32">
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
UsePrecompiledHeader="1"/>
|
UsePrecompiledHeader="1"/>
|
||||||
</FileConfiguration>
|
</FileConfiguration>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveX.h">
|
RelativePath="..\plugin\mkdir_complete.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveXCtrl.h">
|
RelativePath=".\P3DActiveX.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveXPropPage.h">
|
RelativePath=".\P3DActiveXCtrl.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPBrowserObject.h">
|
RelativePath=".\P3DActiveXPropPage.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPDownloadCallback.h">
|
RelativePath=".\PPBrowserObject.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPDownloadRequest.h">
|
RelativePath=".\PPDownloadCallback.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPInstance.h">
|
RelativePath=".\PPDownloadRequest.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPInterface.h">
|
RelativePath=".\PPInstance.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPLogger.h">
|
RelativePath=".\PPInterface.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\PPPandaObject.h">
|
RelativePath=".\PPLogger.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Resource.h">
|
RelativePath=".\PPPandaObject.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\stdafx.h">
|
RelativePath=".\Resource.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
<File
|
||||||
<Filter
|
RelativePath=".\stdafx.h">
|
||||||
Name="Resource Files"
|
</File>
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
</Filter>
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
<Filter
|
||||||
<File
|
Name="Resource Files"
|
||||||
RelativePath=".\P3DActiveX.rc">
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||||
</File>
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||||
<File
|
<File
|
||||||
RelativePath=".\P3DActiveXCtrl.bmp">
|
RelativePath=".\P3DActiveX.rc">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
<File
|
||||||
<File
|
RelativePath=".\P3DActiveXCtrl.bmp">
|
||||||
RelativePath=".\ReadMe.txt">
|
</File>
|
||||||
</File>
|
</Filter>
|
||||||
</Files>
|
<File
|
||||||
<Globals>
|
RelativePath=".\ReadMe.txt">
|
||||||
<Global
|
</File>
|
||||||
Name="RESOURCE_FILE"
|
</Files>
|
||||||
Value="P3DActiveX.rc"/>
|
<Globals>
|
||||||
</Globals>
|
<Global
|
||||||
</VisualStudioProject>
|
Name="RESOURCE_FILE"
|
||||||
|
Value="P3DActiveX.rc"/>
|
||||||
|
</Globals>
|
||||||
|
</VisualStudioProject>
|
||||||
|
@ -492,7 +492,7 @@ int PPInstance::Start( const std::string& p3dFilename )
|
|||||||
nout << "Error creating P3D instance: " << GetLastError() << "\n";
|
nout << "Error creating P3D instance: " << GetLastError() << "\n";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
CComPtr<IDispatch> pDispatch;
|
CComPtr<IDispatchEx> pDispatch;
|
||||||
PPBrowserObject *pobj = new PPBrowserObject( &m_parentCtrl, pDispatch );
|
PPBrowserObject *pobj = new PPBrowserObject( &m_parentCtrl, pDispatch );
|
||||||
P3D_instance_set_browser_script_object( m_p3dInstance, pobj );
|
P3D_instance_set_browser_script_object( m_p3dInstance, pobj );
|
||||||
P3D_OBJECT_DECREF( pobj );
|
P3D_OBJECT_DECREF( pobj );
|
||||||
|
@ -56,8 +56,19 @@ HRESULT PPInterface::Invoke(int nType, IDispatch* pDisp, CString& ptName, VARIAN
|
|||||||
DISPPARAMS dp = { NULL, NULL, 0, 0 };
|
DISPPARAMS dp = { NULL, NULL, 0, 0 };
|
||||||
DISPID dispidNamed = DISPID_PROPERTYPUT;
|
DISPID dispidNamed = DISPID_PROPERTYPUT;
|
||||||
DISPID dispID;
|
DISPID dispID;
|
||||||
|
CComPtr<IDispatchEx> pDispEx;
|
||||||
|
|
||||||
HRESULT hr = GetIdOfName( pDisp, ptName, &dispID );
|
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 ) )
|
if ( FAILED( hr ) )
|
||||||
{
|
{
|
||||||
return hr;
|
return hr;
|
||||||
@ -90,9 +101,16 @@ HRESULT PPInterface::Invoke(int nType, IDispatch* pDisp, CString& ptName, VARIAN
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make the call!
|
// Make the call!
|
||||||
hr = pDisp->Invoke( dispID, IID_NULL, LOCALE_SYSTEM_DEFAULT,
|
if ( pDispEx )
|
||||||
nType, &dp, pvResult, NULL, NULL );
|
{
|
||||||
|
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;
|
delete [] pArgs;
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
@ -118,6 +136,12 @@ HRESULT PPInterface::GetHtmlDocDispatch( CComPtr<IDispatch>& pDispScript )
|
|||||||
hr = pHtmlDoc->get_Script( &pDispScript );
|
hr = pHtmlDoc->get_Script( &pDispScript );
|
||||||
ASSERT( SUCCEEDED( hr ) && pDispScript );
|
ASSERT( SUCCEEDED( hr ) && pDispScript );
|
||||||
|
|
||||||
|
CComPtr<IDispatchEx> pDispExScript;
|
||||||
|
hr = pDispScript->QueryInterface( IID_IDispatchEx, ( void** )&pDispExScript );
|
||||||
|
ASSERT( SUCCEEDED( hr ) && pDispExScript );
|
||||||
|
|
||||||
|
pDispScript = pDispExScript;
|
||||||
|
|
||||||
CComPtr<ITypeInfo> pTypeInfo;
|
CComPtr<ITypeInfo> pTypeInfo;
|
||||||
hr = pDispScript->GetTypeInfo( 0, 0, &pTypeInfo );
|
hr = pDispScript->GetTypeInfo( 0, 0, &pTypeInfo );
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "PPLogger.h"
|
#include "PPLogger.h"
|
||||||
|
#include "mkdir_complete.h"
|
||||||
|
|
||||||
std::ofstream PPLogger::m_logfile;
|
std::ofstream PPLogger::m_logfile;
|
||||||
bool PPLogger::m_isOpen = false;
|
bool PPLogger::m_isOpen = false;
|
||||||
@ -107,7 +108,7 @@ void PPLogger::Open( const std::string &rootDir )
|
|||||||
if (log_directory.empty()) {
|
if (log_directory.empty()) {
|
||||||
log_directory = rootDir + "/log";
|
log_directory = rootDir + "/log";
|
||||||
}
|
}
|
||||||
mkdir_complete(log_directory, cerr);
|
mkdir_complete(log_directory, std::cerr);
|
||||||
|
|
||||||
// Ensure that the log directory ends with a slash.
|
// Ensure that the log directory ends with a slash.
|
||||||
if (!log_directory.empty() && log_directory[log_directory.size() - 1] != '/') {
|
if (!log_directory.empty() && log_directory[log_directory.size() - 1] != '/') {
|
||||||
@ -132,8 +133,8 @@ void PPLogger::Open( const std::string &rootDir )
|
|||||||
log_pathname += ".log";
|
log_pathname += ".log";
|
||||||
|
|
||||||
m_logfile.clear();
|
m_logfile.clear();
|
||||||
m_logfile.open(log_pathname.c_str(), ios::out | ios::trunc);
|
m_logfile.open(log_pathname.c_str(), std::ios::out | std::ios::trunc);
|
||||||
m_logfile.setf(ios::unitbuf);
|
m_logfile.setf(std::ios::unitbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we didn't have a logfile name compiled in, we throw away log
|
// If we didn't have a logfile name compiled in, we throw away log
|
||||||
|
@ -41,3 +41,5 @@
|
|||||||
#include <afxdao.h> // MFC DAO database classes
|
#include <afxdao.h> // MFC DAO database classes
|
||||||
#include <afxwin.h>
|
#include <afxwin.h>
|
||||||
|
|
||||||
|
#include <dispex.h>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user