[UPDATE_COMPONENT] (Author: Loreia L.) Make NppShell compilable under Visual Studio 2008.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@915 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-06-04 18:41:10 +00:00
parent 39da7315b1
commit 980ff19c95
4 changed files with 111 additions and 107 deletions

View File

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="9,00"
Name="NppShell"
ProjectGUID="{509B95C6-043E-4389-8351-77BDB042A6F9}"
RootNamespace="NppShell"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@ -49,8 +50,9 @@
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="4"
/>
<Tool
@ -64,13 +66,15 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib msimg32.lib"
OutputFile="$(OutDir)\..\$(ProjectName)_D.dll"
LinkIncremental="2"
ModuleDefinitionFile="..\src\export.def"
GenerateDebugInformation="true"
SubSystem="2"
BaseAddress="0x1C000000"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
@ -92,7 +96,86 @@
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\..\build_$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=".\..\build_$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;WIN64;_DEBUG;_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_VC80_UPGRADE=0x0710;WIN64"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib msimg32.lib"
OutputFile="$(OutDir)\..\$(ProjectName)64_D.dll"
LinkIncremental="2"
ModuleDefinitionFile="..\src\export.def"
GenerateDebugInformation="true"
SubSystem="2"
BaseAddress="0x1C000000"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
@ -131,8 +214,9 @@
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
@ -146,7 +230,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib msimg32.lib"
OutputFile="$(OutDir)\..\$(ProjectName).dll"
LinkIncremental="1"
AdditionalLibraryDirectories=".\..\src\libs"
@ -156,6 +240,8 @@
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
@ -176,91 +262,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory=".\..\build_$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=".\..\build_$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;WIN64;_DEBUG;_WINDOWS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_VC80_UPGRADE=0x0710;WIN64"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib"
OutputFile="$(OutDir)\..\$(ProjectName)64_D.dll"
LinkIncremental="2"
ModuleDefinitionFile="..\src\export.def"
GenerateDebugInformation="true"
SubSystem="2"
BaseAddress="0x1C000000"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
@ -299,8 +300,9 @@
RuntimeLibrary="2"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
@ -315,7 +317,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib"
AdditionalDependencies="shell32.lib comctl32.lib shlwapi.lib msimg32.lib"
OutputFile="$(OutDir)\..\$(ProjectName)64.dll"
LinkIncremental="1"
AdditionalLibraryDirectories=".\..\src\libs"
@ -326,6 +328,8 @@
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
/>
<Tool
@ -346,9 +350,6 @@
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>

View File

@ -1,7 +1,9 @@
#include <windows.h>
#include <uxtheme.h>
#ifndef BPPF_ERASE
#define BPPF_ERASE 1
#endif
typedef DWORD ARGB;
typedef HRESULT (WINAPI *FN_GetBufferedPaintBits) (HPAINTBUFFER hBufferedPaint, RGBQUAD **ppbBuffer, int *pcxRow);

View File

@ -120,8 +120,6 @@ STDAPI DllInstall(BOOL bInstall, LPCWSTR /*pszCmdLine*/) {
MsgBoxError(TEXT("Uninstalling not supported, use DllUnregisterServer instead"));
return E_NOTIMPL;
}
return S_OK;
}
//---------------------------------------------------------------------------
@ -673,7 +671,7 @@ STDMETHODIMP CShellExt::InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi) {
return hr;
}
STDMETHODIMP CShellExt::GetCommandString(UINT_PTR /*idCmd*/, UINT uFlags, UINT FAR */*reserved*/, LPSTR pszName, UINT cchMax) {
STDMETHODIMP CShellExt::GetCommandString(UINT_PTR, UINT uFlags, UINT FAR *, LPSTR pszName, UINT cchMax) {
LPWSTR wBuffer = (LPWSTR) pszName;
if (uFlags == GCS_HELPTEXTA) {
lstrcpynA(pszName, szHelpTextA, cchMax);
@ -1025,7 +1023,7 @@ STDMETHODIMP CShellExt::InvokeNPP(HWND /*hParent*/, LPCSTR /*pszWorkingDir*/, LP
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = iShowCmd; //SW_RESTORE;
si.wShowWindow = (WORD)iShowCmd; //SW_RESTORE;
if (!CreateProcess (NULL, pszCommand, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) {
DWORD errorCode = GetLastError();
if (errorCode == ERROR_ELEVATION_REQUIRED) { //Fallback to shellexecute

View File

@ -19,7 +19,10 @@
#define WINVER_VISTA 0x600
//This is not ideal, but missing from current mingw
#ifndef ERROR_ELEVATION_REQUIRED
#define ERROR_ELEVATION_REQUIRED 740
#endif
#define GIL_DEFAULTICON 0x0040
#define GUID_SIZE 128
@ -114,11 +117,11 @@ public:
STDMETHODIMP HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult);
// *** IPersistFile methods ***
STDMETHODIMP GetClassID(CLSID */*pClassID*/) { return E_NOTIMPL; };
STDMETHODIMP GetClassID(CLSID *) { return E_NOTIMPL; };
STDMETHODIMP IsDirty(void) { return E_NOTIMPL; };
STDMETHODIMP Save(LPCOLESTR /*pszFileName*/, BOOL /*fRemember*/) { return E_NOTIMPL; };
STDMETHODIMP SaveCompleted(LPCOLESTR /*pszFileName*/) { return E_NOTIMPL; };
STDMETHODIMP GetCurFile(LPOLESTR */*ppszFileName*/) { return E_NOTIMPL; };
STDMETHODIMP Save(LPCOLESTR, BOOL) { return E_NOTIMPL; };
STDMETHODIMP SaveCompleted(LPCOLESTR) { return E_NOTIMPL; };
STDMETHODIMP GetCurFile(LPOLESTR *) { return E_NOTIMPL; };
STDMETHODIMP Load(LPCOLESTR pszFileName, DWORD dwMode);
// *** IExtractIcon methods ***