Skip to content

Commit cc7384e

Browse files
author
dude719
committed
Rename ReClassEx vcxproj files. Fixed some warnings when compiling with VS2017.
1 parent decb887 commit cc7384e

12 files changed

+74
-61
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,4 @@ DriverPlugin_dbg.rc-plugin64d
5353
*.db-shm
5454
*.rc-plugin64d
5555
/ReClass/plugins/TestPlugin_dbg.lib
56+
*.tmp

ReClass.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
44
VisualStudioVersion = 15.0.27004.2009
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReClassEx", "ReClass\ReClass 2016.vcxproj", "{FA80DCEB-16C4-43D1-8451-6EE506D5FF82}"
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReClassEx", "ReClass\ReClassEx.vcxproj", "{FA80DCEB-16C4-43D1-8451-6EE506D5FF82}"
77
EndProject
88
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPlugin", "TestPlugin\TestPlugin\TestPlugin.vcxproj", "{1C466572-2001-4FA9-B4EB-D4A819D802E8}"
99
ProjectSection(ProjectDependencies) = postProject

ReClass/CClassView.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -620,11 +620,11 @@ void CClassView::OnLButtonDown( UINT nFlags, CPoint point )
620620
for (j = 0; j < out[s].second.size( ); j++)
621621
{
622622
MenuInner.AppendMenu( MF_STRING | MF_ENABLED, WM_CHANGECLASSMENU + out[s].second[j].second, out[s].second[j].first );
623-
MenuInner.SetMenuItemBitmaps( j, MF_BYPOSITION, &bmp, &bmp );
623+
MenuInner.SetMenuItemBitmaps( (UINT)j, MF_BYPOSITION, &bmp, &bmp );
624624
}
625625

626626
Menu.AppendMenu( MF_POPUP, (UINT_PTR)MenuInner.m_hMenu, CString( out[s].first ) );
627-
Menu.SetMenuItemBitmaps( s, MF_BYPOSITION, &bmp, &bmp );
627+
Menu.SetMenuItemBitmaps( (UINT)s, MF_BYPOSITION, &bmp, &bmp );
628628
}
629629

630630
Menu.TrackPopupMenu( TPM_LEFTALIGN | TPM_NOANIMATION, pos.left, pos.bottom, this );

ReClass/CNodeArray.cpp

+13-10
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,28 @@ CNodeArray::CNodeArray( )
1010

1111
void CNodeArray::Update( const PHOTSPOT Spot )
1212
{
13-
int IntValue;
13+
LONG LongValue;
14+
ULONG UlongValue;
1415

1516
StandardUpdate( Spot );
1617

17-
IntValue = _ttoi( Spot->Text.GetString( ) );
18-
if (IntValue < 0)
18+
LongValue = _ttol( Spot->Text.GetString( ) );
19+
if (LongValue < 0)
1920
return;
2021

22+
UlongValue = (ULONG)LongValue;
23+
2124
if (Spot->Id == 0)
2225
{
23-
if (IntValue == 0)
26+
if (UlongValue == 0)
2427
return;
25-
m_ulTotal = (ULONG)IntValue;
28+
m_ulTotal = UlongValue;
2629
}
2730
else if (Spot->Id == 1)
2831
{
29-
if (IntValue >= m_ulTotal)
32+
if (UlongValue >= m_ulTotal)
3033
return;
31-
m_iCurrent = IntValue;
34+
m_iCurrent = UlongValue;
3235
}
3336
else if (Spot->Id == 2)
3437
{
@@ -37,7 +40,7 @@ void CNodeArray::Update( const PHOTSPOT Spot )
3740
}
3841
else if (Spot->Id == 3)
3942
{
40-
if ((ULONG)m_iCurrent < m_ulTotal - 1)
43+
if (m_iCurrent < (INT)m_ulTotal - 1)
4144
m_iCurrent++;
4245
}
4346
}
@@ -70,7 +73,7 @@ NODESIZE CNodeArray::Draw( const PVIEWINFO View, int x, int y )
7073
tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "Array " ) );
7174
tx = AddText( View, tx, y, g_crName, HS_NAME, _T( "%s" ), m_strName );
7275
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "[" ) );
73-
tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%i" ), m_ulTotal );
76+
tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%u" ), m_ulTotal );
7477
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "]" ) );
7578

7679
tx = AddIcon( View, tx, y, ICON_LEFT, HS_SELECT, HS_CLICK );
@@ -79,7 +82,7 @@ NODESIZE CNodeArray::Draw( const PVIEWINFO View, int x, int y )
7982
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( ")" ) );
8083
tx = AddIcon( View, tx, y, ICON_RIGHT, HS_DROP, HS_CLICK );
8184

82-
tx = AddText( View, tx, y, g_crValue, HS_NONE, _T( "<%s Size=%i>" ), m_pNode->GetName( ), GetMemorySize( ) );
85+
tx = AddText( View, tx, y, g_crValue, HS_NONE, _T( "<%s Size=%u>" ), m_pNode->GetName( ), GetMemorySize( ) );
8386
tx = AddIcon( View, tx, y, ICON_CHANGE, HS_CLICK, HS_CHANGE_X );
8487

8588
tx += g_FontWidth;

ReClass/CNodeArray.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ class CNodeArray : public CNodeBase {
1919
protected:
2020
CNodeClass* m_pNode;
2121
ULONG m_ulTotal;
22-
int m_iCurrent;
22+
INT m_iCurrent;
2323
};

ReClass/CNodeBase.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ class CNodeBase {
133133
inline void SetParent( CNodeBase* newParentNode ) { m_pParentNode = newParentNode; }
134134

135135
inline void AddNode( CNodeBase* newNode ) { m_ChildNodes.push_back( newNode ); }
136-
inline void InsertNode( int idx, CNodeBase* newNode ) { m_ChildNodes.insert( m_ChildNodes.begin( ) + idx, newNode ); }
137-
inline CNodeBase* GetNode( int idx ) { return (CNodeBase*)m_ChildNodes[idx]; }
136+
inline void InsertNode( size_t idx, CNodeBase* newNode ) { m_ChildNodes.insert( m_ChildNodes.begin( ) + idx, newNode ); }
137+
inline CNodeBase* GetNode( size_t idx ) { return (CNodeBase*)m_ChildNodes[idx]; }
138138
inline int FindNode( CNodeBase* pNode ) {
139139
auto found = std::find( m_ChildNodes.begin( ), m_ChildNodes.end( ), pNode );
140140
return (found != m_ChildNodes.end( )) ? (int)(found - m_ChildNodes.begin( )) : -1;
141141
}
142-
inline void SetNode( int idx, CNodeBase* newNode ) { m_ChildNodes[idx] = newNode; }
143-
inline void DeleteNode( int idx ) { if (m_ChildNodes[idx]) { delete(m_ChildNodes[idx]); RemoveNode( idx ); } }
144-
inline void RemoveNode( int idx ) { m_ChildNodes.erase( m_ChildNodes.begin( ) + idx ); }
142+
inline void SetNode( size_t idx, CNodeBase* newNode ) { m_ChildNodes[idx] = newNode; }
143+
inline void DeleteNode( size_t idx ) { if (m_ChildNodes[idx]) { delete(m_ChildNodes[idx]); RemoveNode( idx ); } }
144+
inline void RemoveNode( size_t idx ) { m_ChildNodes.erase( m_ChildNodes.begin( ) + idx ); }
145145
inline size_t NodeCount( ) const { return m_ChildNodes.size( ); }
146146

147147
inline bool IsHidden( ) { return m_bHidden; }

ReClass/CNodePtrArray.cpp

+30-23
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#include "CNodePtrArray.h"
33

44
CNodePtrArray::CNodePtrArray( )
5-
: m_PtrCount( 1 )
6-
, m_CurrentIndex( 0 )
7-
, m_NodePtr( new CNodePtr )
5+
: m_ulPtrCount( 1 )
6+
, m_iCurrentIndex( 0 )
7+
, m_pNodePtr( new CNodePtr )
88
{
99
m_nodeType = nt_ptrarray;
1010
}
@@ -35,16 +35,16 @@ NODESIZE CNodePtrArray::Draw( const PVIEWINFO View, int x, int y )
3535
tx = AddText( View, tx, y, g_crType, HS_NONE, _T( "ArrayOfPointers " ) );
3636
tx = AddText( View, tx, y, g_crName, HS_NAME, _T( "%s" ), m_strName );
3737
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "[" ) );
38-
tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%i" ), m_PtrCount );
38+
tx = AddText( View, tx, y, g_crIndex, HS_EDIT, _T( "%u" ), m_ulPtrCount );
3939
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "]" ) );
4040

4141
tx = AddIcon( View, tx, y, ICON_LEFT, HS_SELECT, HS_CLICK );
4242
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( "(" ) );
43-
tx = AddText( View, tx, y, g_crIndex, 1, _T( "%i" ), m_CurrentIndex );
43+
tx = AddText( View, tx, y, g_crIndex, 1, _T( "%i" ), m_iCurrentIndex );
4444
tx = AddText( View, tx, y, g_crIndex, HS_NONE, _T( ")" ) );
4545
tx = AddIcon( View, tx, y, ICON_RIGHT, HS_DROP, HS_CLICK );
4646

47-
tx = AddText( View, tx, y, g_crValue, HS_NONE, _T( "<%s* Size=%i>" ), m_NodePtr->GetClass( )->GetName( ), GetMemorySize( ) );
47+
tx = AddText( View, tx, y, g_crValue, HS_NONE, _T( "<%s* Size=%u>" ), m_pNodePtr->GetClass( )->GetName( ), GetMemorySize( ) );
4848
tx = AddIcon( View, tx, y, ICON_CHANGE, HS_CLICK, HS_CHANGE_X );
4949

5050
tx += g_FontWidth;
@@ -53,19 +53,19 @@ NODESIZE CNodePtrArray::Draw( const PVIEWINFO View, int x, int y )
5353
y += g_FontHeight;
5454
if (m_LevelsOpen[View->Level])
5555
{
56-
if (IsMemory( View->Address + m_Offset + (sizeof( uintptr_t ) * m_CurrentIndex) ))
56+
if (IsMemory( View->Address + m_Offset + (sizeof( ULONG_PTR ) * m_iCurrentIndex) ))
5757
{
58-
ClassSize = m_NodePtr->GetClass( )->GetMemorySize( );
59-
m_NodePtr->Memory( )->SetSize( ClassSize );
58+
ClassSize = m_pNodePtr->GetClass( )->GetMemorySize( );
59+
m_pNodePtr->Memory( )->SetSize( ClassSize );
6060

6161
VIEWINFO NewView;
6262
memcpy( &NewView, View, sizeof( NewView ) );
63-
NewView.Data = m_NodePtr->Memory( )->Data( );
64-
NewView.Address = *(uintptr_t*)(View->Data + m_Offset + (sizeof( uintptr_t ) * m_CurrentIndex));
63+
NewView.Data = m_pNodePtr->Memory( )->Data( );
64+
NewView.Address = *(ULONG_PTR*)(View->Data + m_Offset + (sizeof( ULONG_PTR ) * m_iCurrentIndex));
6565

6666
ReClassReadMemory( (LPVOID)NewView.Address, (LPVOID)NewView.Data, ClassSize );
6767

68-
ChildDrawSize = m_NodePtr->GetClass( )->Draw( &NewView, x, y );
68+
ChildDrawSize = m_pNodePtr->GetClass( )->Draw( &NewView, x, y );
6969

7070
y = ChildDrawSize.y;
7171
if (ChildDrawSize.x > DrawSize.x)
@@ -79,36 +79,43 @@ NODESIZE CNodePtrArray::Draw( const PVIEWINFO View, int x, int y )
7979

8080
ULONG CNodePtrArray::GetMemorySize( )
8181
{
82-
return m_NodePtr->GetMemorySize( ) * m_PtrCount;
82+
return m_pNodePtr->GetMemorySize( ) * m_ulPtrCount;
8383
}
8484

8585
void CNodePtrArray::Update( const PHOTSPOT Spot )
8686
{
87+
LONG LongValue;
88+
ULONG UlongValue;
89+
8790
StandardUpdate( Spot );
8891

89-
int v = _ttoi( Spot->Text.GetString( ) );
90-
if (v < 0) return;
92+
LongValue = _ttol( Spot->Text.GetString( ) );
93+
if (LongValue < 0)
94+
return;
95+
96+
UlongValue = (ULONG)LongValue;
9197

9298
if (Spot->Id == 0)
9399
{
94-
if (v == 0)
100+
if (UlongValue == 0)
95101
return;
96-
m_PtrCount = (size_t)v;
102+
m_ulPtrCount = UlongValue;
97103
}
98104
else if (Spot->Id == 1)
99105
{
100-
if (v >= (int)m_PtrCount) return;
101-
m_CurrentIndex = (int)v;
106+
if (UlongValue >= m_ulPtrCount)
107+
return;
108+
m_iCurrentIndex = UlongValue;
102109
}
103110
else if (Spot->Id == 2)
104111
{
105-
if (m_CurrentIndex > 0)
106-
m_CurrentIndex--;
112+
if (m_iCurrentIndex > 0)
113+
m_iCurrentIndex--;
107114
}
108115
else if (Spot->Id == 3)
109116
{
110-
if ((size_t)m_CurrentIndex < m_PtrCount - 1)
111-
m_CurrentIndex++;
117+
if (m_iCurrentIndex < (INT)m_ulPtrCount - 1)
118+
m_iCurrentIndex++;
112119
}
113120
}
114121

ReClass/CNodePtrArray.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ class CNodePtrArray : public CNodeBase
1111

1212
virtual void Update( const PHOTSPOT Spot );
1313

14-
inline size_t Count( void ) { return m_PtrCount; }
15-
inline void SetCount( size_t Count ) { m_PtrCount = Count; }
14+
inline ULONG Count( void ) { return m_ulPtrCount; }
15+
inline void SetCount( ULONG Count ) { m_ulPtrCount = Count; }
1616

17-
void SetClass( CNodeClass* pNode ) { m_NodePtr->SetClass( pNode ); }
18-
CNodeClass* GetClass( void ) { return m_NodePtr->GetClass( ); }
17+
void SetClass( CNodeClass* pNode ) { m_pNodePtr->SetClass( pNode ); }
18+
CNodeClass* GetClass( void ) { return m_pNodePtr->GetClass( ); }
1919

2020
protected:
21-
CNodePtr* m_NodePtr;
22-
size_t m_PtrCount;
23-
unsigned m_CurrentIndex = 0;
21+
CNodePtr* m_pNodePtr;
22+
ULONG m_ulPtrCount;
23+
INT m_iCurrentIndex;
2424
};
2525

ReClass/DialogProcSelect.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,14 @@ void CDialogProcSelect::OnAttachButton( )
290290
ProgressBar.SetStep( 1 );
291291
ProgressBar.SetText( _T( "Symbols loading: " ) );
292292

293-
for (ULONG i = 0; i < g_MemMapModules.size( ); i++)
293+
for (size_t i = 0; i < g_MemMapModules.size( ); i++)
294294
{
295295
TCHAR ProgressText[256];
296296
MemMapInfo *CurrentModule = &g_MemMapModules[i];
297297

298298
ProgressBar.SetRange32( 0, (int)g_MemMapModules.size( ) );
299299

300-
_stprintf_s( ProgressText, _T( "[%d/%d] %s" ), i + 1, g_MemMapModules.size( ), CurrentModule->Name.GetString( ) );
300+
_stprintf_s( ProgressText, _T( "[%d/%d] %s" ), (UINT)i + 1, (UINT)g_MemMapModules.size( ), CurrentModule->Name.GetString( ) );
301301
StatusBar->SetPaneText( 1, ProgressText );
302302

303303
//MemMapInfo* pCurrentModule = new MemMapInfo( CurrentModule );

ReClass/ReClass 2016.vcxproj ReClass/ReClassEx.vcxproj

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -32,31 +32,31 @@
3232
<WholeProgramOptimization>true</WholeProgramOptimization>
3333
<CharacterSet>Unicode</CharacterSet>
3434
<UseOfMfc>Static</UseOfMfc>
35-
<PlatformToolset>v140</PlatformToolset>
35+
<PlatformToolset>v141</PlatformToolset>
3636
</PropertyGroup>
3737
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3838
<ConfigurationType>Application</ConfigurationType>
3939
<UseDebugLibraries>false</UseDebugLibraries>
4040
<WholeProgramOptimization>true</WholeProgramOptimization>
4141
<CharacterSet>Unicode</CharacterSet>
4242
<UseOfMfc>Static</UseOfMfc>
43-
<PlatformToolset>v140</PlatformToolset>
43+
<PlatformToolset>v141</PlatformToolset>
4444
</PropertyGroup>
4545
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4646
<ConfigurationType>Application</ConfigurationType>
4747
<UseDebugLibraries>false</UseDebugLibraries>
4848
<WholeProgramOptimization>true</WholeProgramOptimization>
4949
<CharacterSet>Unicode</CharacterSet>
5050
<UseOfMfc>Static</UseOfMfc>
51-
<PlatformToolset>v140</PlatformToolset>
51+
<PlatformToolset>v141</PlatformToolset>
5252
</PropertyGroup>
5353
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
5454
<ConfigurationType>Application</ConfigurationType>
5555
<UseDebugLibraries>false</UseDebugLibraries>
5656
<WholeProgramOptimization>true</WholeProgramOptimization>
5757
<CharacterSet>Unicode</CharacterSet>
5858
<UseOfMfc>Static</UseOfMfc>
59-
<PlatformToolset>v140</PlatformToolset>
59+
<PlatformToolset>v141</PlatformToolset>
6060
</PropertyGroup>
6161
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
6262
<ImportGroup Label="ExtensionSettings">
@@ -83,6 +83,7 @@
8383
<CodeAnalysisRules />
8484
<CodeAnalysisRuleAssemblies />
8585
<IncludePath>$(VSInstallDir)DIA SDK\include;$(IncludePath)</IncludePath>
86+
<IntDir>$(Platform)\$(Configuration)\</IntDir>
8687
</PropertyGroup>
8788
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
8889
<GenerateManifest>true</GenerateManifest>
@@ -92,6 +93,7 @@
9293
<CodeAnalysisRules />
9394
<CodeAnalysisRuleAssemblies />
9495
<TargetName>$(ProjectName)_dbg</TargetName>
96+
<IntDir>$(Platform)\$(Configuration)\</IntDir>
9597
</PropertyGroup>
9698
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
9799
<LinkIncremental>false</LinkIncremental>
File renamed without changes.

TestPlugin/TestPlugin/TestPlugin.vcxproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
44
<ProjectConfiguration Include="Debug|Win32">
55
<Configuration>Debug</Configuration>
@@ -28,27 +28,27 @@
2828
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
2929
<ConfigurationType>DynamicLibrary</ConfigurationType>
3030
<UseDebugLibraries>true</UseDebugLibraries>
31-
<PlatformToolset>v140</PlatformToolset>
31+
<PlatformToolset>v141</PlatformToolset>
3232
<CharacterSet>Unicode</CharacterSet>
3333
</PropertyGroup>
3434
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3535
<ConfigurationType>DynamicLibrary</ConfigurationType>
3636
<UseDebugLibraries>false</UseDebugLibraries>
37-
<PlatformToolset>v140</PlatformToolset>
37+
<PlatformToolset>v141</PlatformToolset>
3838
<WholeProgramOptimization>true</WholeProgramOptimization>
3939
<CharacterSet>Unicode</CharacterSet>
4040
<UseOfMfc>false</UseOfMfc>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>DynamicLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v140</PlatformToolset>
45+
<PlatformToolset>v141</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>DynamicLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v140</PlatformToolset>
51+
<PlatformToolset>v141</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>

0 commit comments

Comments
 (0)