зеркало из
1
0
Форкнуть 0
This commit is contained in:
Duncan Horn 2018-07-11 12:36:49 -07:00
Родитель 66320afc50
Коммит 209f2fa1db
9 изменённых файлов: 15 добавлений и 17467 удалений

Просмотреть файл

@ -1,44 +0,0 @@
# Shim Launcher
The Shim Launcher executable is provided to be the entry point to the target application whose sole purpose is to ensure that the Shim Runtime gets loaded into the target process. The Shim Launcher executable does little more than read from `config.json` when launched to determine which executable to launch, based off the current application id. For example, an AppxManifest that initially looks something like:
```xml
<Package ...>
...
<Applications>
<Application Id="ContosoApp"
Executable="VFS\ProgramFilesX64\ContosoApp.exe"
EntryPoint="Windows.FullTrustApplication">
...
</Application>
</Applications>
</Package>
```
Would become:
```xml
<Package ...>
...
<Applications>
<Application Id="ContosoApp"
Executable="ShimLauncher64.exe"
EntryPoint="Windows.FullTrustApplication">
...
</Application>
</Applications>
</Package>
```
With a corresponding `config.json` that looks like:
```json
{
"applications": [
{
"id": "ContosoApp",
"executable": "VFS\\ProgramFilesX64\\ContosoApp.exe"
}
],
...
}
```

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -11,6 +11,21 @@
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>

Двоичные данные
samples/PSFSample/PSFSamplePackage/Package_TemporaryKey.pfx Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -1,30 +0,0 @@
#include <shim_framework.h>
auto MessageBoxAImpl = &::MessageBoxA;
auto MessageBoxWImpl = &::MessageBoxW;
int WINAPI MessageBoxAShim(
_In_opt_ HWND hwnd,
_In_opt_ LPCSTR text,
_In_opt_ LPCSTR caption,
_In_ UINT type)
{
std::string textStr = text;
textStr += " And you've been shimmed again!";
return MessageBoxAImpl(hwnd, textStr.c_str(), caption, type);
}
int WINAPI MessageBoxWShim(
_In_opt_ HWND hwnd,
_In_opt_ LPCWSTR text,
_In_opt_ LPCWSTR caption,
_In_ UINT type)
{
std::wstring textStr = text;
textStr += L" And you've been shimmed again!";
return MessageBoxWImpl(hwnd, textStr.c_str(), caption, type);
}
DECLARE_SHIM(MessageBoxAImpl, MessageBoxAShim);
DECLARE_SHIM(MessageBoxWImpl, MessageBoxWShim);

Просмотреть файл

@ -1,26 +0,0 @@
#include <shim_framework.h>
auto MessageBoxAImpl = &::MessageBoxA;
auto MessageBoxWImpl = &::MessageBoxW;
int WINAPI MessageBoxAShim(
_In_opt_ HWND hwnd,
_In_opt_ LPCSTR,
_In_opt_ LPCSTR caption,
_In_ UINT type)
{
return MessageBoxAImpl(hwnd, "SUCCESS: You've been shimmed!", caption, type);
}
int WINAPI MessageBoxWShim(
_In_opt_ HWND hwnd,
_In_opt_ LPCWSTR,
_In_opt_ LPCWSTR caption,
_In_ UINT type)
{
return MessageBoxWImpl(hwnd, L"SUCCESS: You've been shimmed!", caption, type);
}
DECLARE_SHIM(MessageBoxAImpl, MessageBoxAShim);
DECLARE_SHIM(MessageBoxWImpl, MessageBoxWShim);

Просмотреть файл

@ -1,48 +0,0 @@
<?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>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp" />
<ClCompile Include="MessageBoxShim.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\ShimRuntime\ShimRuntime.vcxproj">
<Project>{87cce0ac-a7fb-4a31-89d3-c0acdb315ee0}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{0C1F7A43-65DE-4460-A9EB-F44F40AF0968}</ProjectGuid>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<SubSystem>Windows</SubSystem>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(MSBuildThisFileDirectory)\..\..\..\Shims.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<Import Project="$(MSBuildThisFileDirectory)\..\..\..\Common.Build.props" />
<ItemDefinitionGroup>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

Просмотреть файл

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{2f29a350-d4bd-4b67-9383-a77c7f7b4e22}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="MessageBoxShim.cpp">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
</Project>

Просмотреть файл

@ -1,3 +0,0 @@
#define SHIM_DEFINE_EXPORTS
#include <shim_framework.h>