A "Functions" section is parsed in gamedata files that allow you to define the signature of functions including metadata like the calling convention and specifying the register an argument is passed in. A new native DHookCreateFromConf can be used to setup a hook or detour from one of that function sections in the "Functions" section.
		
			
				
	
	
		
			142 lines
		
	
	
		
			7.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			142 lines
		
	
	
		
			7.9 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0" encoding="utf-8"?>
 | 
						|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
						|
  <ItemGroup Label="ProjectConfigurations">
 | 
						|
    <ProjectConfiguration Include="Debug|Win32">
 | 
						|
      <Configuration>Debug</Configuration>
 | 
						|
      <Platform>Win32</Platform>
 | 
						|
    </ProjectConfiguration>
 | 
						|
    <ProjectConfiguration Include="Release|Win32">
 | 
						|
      <Configuration>Release</Configuration>
 | 
						|
      <Platform>Win32</Platform>
 | 
						|
    </ProjectConfiguration>
 | 
						|
  </ItemGroup>
 | 
						|
  <PropertyGroup Label="Globals">
 | 
						|
    <ProjectGuid>{B3E797CF-4E77-4C9D-B8A8-7589B6902206}</ProjectGuid>
 | 
						|
    <RootNamespace>sdk</RootNamespace>
 | 
						|
    <Keyword>Win32Proj</Keyword>
 | 
						|
    <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
 | 
						|
  </PropertyGroup>
 | 
						|
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
 | 
						|
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
 | 
						|
    <ConfigurationType>DynamicLibrary</ConfigurationType>
 | 
						|
    <PlatformToolset>v141</PlatformToolset>
 | 
						|
    <CharacterSet>MultiByte</CharacterSet>
 | 
						|
    <WholeProgramOptimization>true</WholeProgramOptimization>
 | 
						|
  </PropertyGroup>
 | 
						|
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
 | 
						|
    <ConfigurationType>DynamicLibrary</ConfigurationType>
 | 
						|
    <PlatformToolset>v141</PlatformToolset>
 | 
						|
    <CharacterSet>MultiByte</CharacterSet>
 | 
						|
  </PropertyGroup>
 | 
						|
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 | 
						|
  <ImportGroup Label="ExtensionSettings">
 | 
						|
  </ImportGroup>
 | 
						|
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
 | 
						|
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 | 
						|
  </ImportGroup>
 | 
						|
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
 | 
						|
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 | 
						|
  </ImportGroup>
 | 
						|
  <PropertyGroup Label="UserMacros" />
 | 
						|
  <PropertyGroup>
 | 
						|
    <_ProjectFileVersion>11.0.51106.1</_ProjectFileVersion>
 | 
						|
  </PropertyGroup>
 | 
						|
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
						|
    <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
 | 
						|
    <IntDir>$(Configuration)\</IntDir>
 | 
						|
    <LinkIncremental>true</LinkIncremental>
 | 
						|
    <TargetName>dhooks.ext</TargetName>
 | 
						|
  </PropertyGroup>
 | 
						|
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 | 
						|
    <OutDir>$(SolutionDir)$(Configuration)\</OutDir>
 | 
						|
    <IntDir>$(Configuration)\</IntDir>
 | 
						|
    <LinkIncremental>false</LinkIncremental>
 | 
						|
    <TargetName>dhooks.ext</TargetName>
 | 
						|
  </PropertyGroup>
 | 
						|
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
						|
    <ClCompile>
 | 
						|
      <Optimization>Disabled</Optimization>
 | 
						|
      <AdditionalIncludeDirectories>..;..\sdk;$(MMSOURCE10)\core;$(MMSOURCE10)\core\sourcehook;$(SOURCEMOD)\public;$(SOURCEMOD)\sourcepawn\include;$(SOURCEMOD)\public\extensions;$(SOURCEMOD)\sourcepawn\vm;$(SOURCEMOD)\sourcepawn\vm\x86;$(SOURCEMOD)\public\amtl\amtl;$(SOURCEMOD)\public\amtl;..\DynamicHooks</AdditionalIncludeDirectories>
 | 
						|
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;META_NO_HL2SDK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
						|
      <MinimalRebuild>true</MinimalRebuild>
 | 
						|
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
 | 
						|
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
 | 
						|
      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
 | 
						|
      <RuntimeTypeInfo>false</RuntimeTypeInfo>
 | 
						|
      <PrecompiledHeader />
 | 
						|
      <WarningLevel>Level3</WarningLevel>
 | 
						|
      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
 | 
						|
    </ClCompile>
 | 
						|
    <Link>
 | 
						|
      <OutputFile>$(OutDir)dhooks.ext.dll</OutputFile>
 | 
						|
      <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
 | 
						|
      <GenerateDebugInformation>true</GenerateDebugInformation>
 | 
						|
      <SubSystem>Windows</SubSystem>
 | 
						|
      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 | 
						|
      <DataExecutionPrevention />
 | 
						|
      <TargetMachine>MachineX86</TargetMachine>
 | 
						|
    </Link>
 | 
						|
  </ItemDefinitionGroup>
 | 
						|
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 | 
						|
    <ClCompile>
 | 
						|
      <AdditionalOptions>/MP /D SE_EPISODEONE=1 /D SE_DARKMESSIAH=2 /D SE_ORANGEBOX=3 /D SE_BLOODYGOODTIME=4 /D SE_EYE=5 /D SE_ORANGEBOXVALVE=6 /D SE_LEFT4DEAD=7 /D SE_LEFT4DEAD2=8 /D SE_ALIENSWARM=9 /D SE_PORTAL2=10 /D SE_CSGO=11 %(AdditionalOptions)</AdditionalOptions>
 | 
						|
      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
 | 
						|
      <AdditionalIncludeDirectories>..;..\sdk;$(MMSOURCE10)\core;$(MMSOURCE10)\core\sourcehook;$(SOURCEMOD)\public;$(SOURCEMOD)\sourcepawn\include;$(SOURCEMOD)\public\extensions;$(SOURCEMOD)\sourcepawn\vm;$(SOURCEMOD)\sourcepawn\vm\x86;$(SOURCEMOD)\public\amtl\amtl;$(SOURCEMOD)\public\amtl;..\DynamicHooks</AdditionalIncludeDirectories>
 | 
						|
      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SDK_EXPORTS;_CRT_SECURE_NO_DEPRECATE;SOURCEMOD_BUILD;COMPILER_MSVC;COMPILER_MSVC32;META_NO_HL2SDK;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
						|
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
 | 
						|
      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
 | 
						|
      <RuntimeTypeInfo>false</RuntimeTypeInfo>
 | 
						|
      <PrecompiledHeader>
 | 
						|
      </PrecompiledHeader>
 | 
						|
      <WarningLevel>Level3</WarningLevel>
 | 
						|
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 | 
						|
    </ClCompile>
 | 
						|
    <Link>
 | 
						|
      <AdditionalDependencies>
 | 
						|
      </AdditionalDependencies>
 | 
						|
      <OutputFile>$(OutDir)dhooks.ext.dll</OutputFile>
 | 
						|
      <IgnoreSpecificDefaultLibraries>LIBC;LIBCD;LIBCMTD;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
 | 
						|
      <GenerateDebugInformation>true</GenerateDebugInformation>
 | 
						|
      <SubSystem>Windows</SubSystem>
 | 
						|
      <OptimizeReferences>true</OptimizeReferences>
 | 
						|
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
 | 
						|
      <RandomizedBaseAddress>false</RandomizedBaseAddress>
 | 
						|
      <DataExecutionPrevention>
 | 
						|
      </DataExecutionPrevention>
 | 
						|
      <TargetMachine>MachineX86</TargetMachine>
 | 
						|
    </Link>
 | 
						|
  </ItemDefinitionGroup>
 | 
						|
  <ItemGroup>
 | 
						|
    <ClCompile Include="$(SOURCEMOD)\public\smsdk_ext.cpp" />
 | 
						|
    <ClCompile Include="$(SOURCEMOD)\sourcepawn\vm\x86\assembler-x86.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\asm.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\conventions\x86MsCdecl.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\conventions\x86MsStdcall.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\conventions\x86MsThiscall.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\hook.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\manager.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\registers.cpp" />
 | 
						|
    <ClCompile Include="..\DynamicHooks\utilities.cpp" />
 | 
						|
    <ClCompile Include="..\dynhooks_sourcepawn.cpp" />
 | 
						|
    <ClCompile Include="..\extension.cpp" />
 | 
						|
    <ClCompile Include="..\listeners.cpp" />
 | 
						|
    <ClCompile Include="..\natives.cpp" />
 | 
						|
    <ClCompile Include="..\signatures.cpp" />
 | 
						|
    <ClCompile Include="..\util.cpp" />
 | 
						|
    <ClCompile Include="..\vhook.cpp" />
 | 
						|
  </ItemGroup>
 | 
						|
  <ItemGroup>
 | 
						|
    <ClInclude Include="$(SOURCEMOD)\public\smsdk_ext.h" />
 | 
						|
    <ClInclude Include="..\extension.h" />
 | 
						|
    <ClInclude Include="..\listeners.h" />
 | 
						|
    <ClInclude Include="..\natives.h" />
 | 
						|
    <ClInclude Include="..\sdk-hacks.h" />
 | 
						|
    <ClInclude Include="..\util.h" />
 | 
						|
    <ClInclude Include="..\vfunc_call.h" />
 | 
						|
    <ClInclude Include="..\vhook.h" />
 | 
						|
    <ClInclude Include="..\sdk\smsdk_config.h" />
 | 
						|
  </ItemGroup>
 | 
						|
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 | 
						|
  <ImportGroup Label="ExtensionTargets">
 | 
						|
  </ImportGroup>
 | 
						|
</Project> |