Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Dosov authored Apr 17, 2019
1 parent 4ff553d commit cfbc1eb
Show file tree
Hide file tree
Showing 40 changed files with 671 additions and 0 deletions.
Binary file added Server/Debug/Server.exe
Binary file not shown.
Binary file added Server/Debug/Server.ilk
Binary file not shown.
Binary file added Server/Debug/Server.pdb
Binary file not shown.
28 changes: 28 additions & 0 deletions Server/Server.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Server", "Server\Server.vcxproj", "{F82E2B4D-1F1A-4905-B9DD-006B9039942A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Debug|x64.ActiveCfg = Debug|x64
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Debug|x64.Build.0 = Debug|x64
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Debug|x86.ActiveCfg = Debug|Win32
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Debug|x86.Build.0 = Debug|Win32
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Release|x64.ActiveCfg = Release|x64
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Release|x64.Build.0 = Release|x64
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Release|x86.ActiveCfg = Release|Win32
{F82E2B4D-1F1A-4905-B9DD-006B9039942A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
4 changes: 4 additions & 0 deletions Server/Server/Debug/Server.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
 main.c
c:\android studio\newproject\server\server\main.c(330): warning C4101: msg: неиспользованная локальная переменная
c:\android studio\newproject\server\server\main.c(331): warning C4101: bRet: неиспользованная локальная переменная
Server.vcxproj -> C:\Android Studio\NewProject\Server\Debug\Server.exe
Binary file added Server/Server/Debug/Server.tlog/CL.command.1.tlog
Binary file not shown.
Binary file added Server/Server/Debug/Server.tlog/CL.read.1.tlog
Binary file not shown.
Binary file added Server/Server/Debug/Server.tlog/CL.write.1.tlog
Binary file not shown.
2 changes: 2 additions & 0 deletions Server/Server/Debug/Server.tlog/Server.lastbuildstate
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.17134.0
Debug|Win32|C:\Android Studio\NewProject\Server\|
Binary file not shown.
Binary file added Server/Server/Debug/Server.tlog/link.delete.1.tlog
Binary file not shown.
Binary file added Server/Server/Debug/Server.tlog/link.read.1.tlog
Binary file not shown.
Binary file added Server/Server/Debug/Server.tlog/link.write.1.tlog
Binary file not shown.
Binary file added Server/Server/Debug/keyboard.obj
Binary file not shown.
Binary file added Server/Server/Debug/main.obj
Binary file not shown.
Binary file added Server/Server/Debug/vc140.idb
Binary file not shown.
Binary file added Server/Server/Debug/vc140.pdb
Binary file not shown.
Binary file added Server/Server/Debug/vc141.idb
Binary file not shown.
Binary file added Server/Server/Debug/vc141.pdb
Binary file not shown.
151 changes: 151 additions & 0 deletions Server/Server/Server.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
<?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>
<PropertyGroup Label="Globals">
<ProjectGuid>{F82E2B4D-1F1A-4905-B9DD-006B9039942A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Server</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="keyboard.cpp" />
<ClCompile Include="main.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
25 changes: 25 additions & 0 deletions Server/Server/Server.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Файлы исходного кода">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Заголовочные файлы">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Файлы ресурсов">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>Файлы исходного кода</Filter>
</ClCompile>
<ClCompile Include="keyboard.cpp">
<Filter>Файлы исходного кода</Filter>
</ClCompile>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions Server/Server/Server.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
68 changes: 68 additions & 0 deletions Server/Server/keyboard.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#include <windows.h>


DWORD SendScanCode(WORD scan, BOOL up)
{
INPUT inp = { 0 };
inp.type = INPUT_KEYBOARD;
inp.ki.wScan = scan;
inp.ki.dwFlags = KEYEVENTF_SCANCODE | (up ? KEYEVENTF_KEYUP : 0);
return SendInput(1, &inp, sizeof(inp)) ? NO_ERROR : GetLastError();
}
DWORD SendVirtualKey(UINT vk, BOOL up)
{
UINT scan = MapVirtualKey(vk, MAPVK_VK_TO_VSC);
return scan ? SendScanCode(scan, up) : ERROR_NO_UNICODE_TRANSLATION;
}
DWORD SendChar(TCHAR ch, BOOL up)
{
SHORT vk = VkKeyScan(ch);
DWORD Result;
if (0xFFFF == (USHORT)vk)
Result = ERROR_NO_UNICODE_TRANSLATION;
else
if (up)
Result = SendVirtualKey(LOBYTE(vk), TRUE);
else {
Result = NO_ERROR;
if (HIBYTE(vk) & 1) Result = SendVirtualKey(VK_LSHIFT, FALSE);

if (NO_ERROR == Result) {
if (HIBYTE(vk) & 2) Result = SendVirtualKey(VK_LCONTROL, FALSE);

if (NO_ERROR == Result) {
if (HIBYTE(vk) & 4) Result = SendVirtualKey(VK_LMENU, FALSE);

if (NO_ERROR == Result) {
Result = SendVirtualKey(LOBYTE(vk), FALSE);

if (NO_ERROR == Result) {
if (HIBYTE(vk) & 4) Result = SendVirtualKey(VK_LMENU, TRUE);

if (NO_ERROR == Result) {
if (HIBYTE(vk) & 2) Result = SendVirtualKey(VK_LCONTROL, TRUE);

if (NO_ERROR == Result) {
if (HIBYTE(vk) & 1) Result = SendVirtualKey(VK_LSHIFT, TRUE);
}
}
}
}
}
}
}
return Result;
}
DWORD SendString(LPCTSTR s)
{
DWORD Result = NO_ERROR;
for (; *s && !Result; ++s) {
Result = SendChar(s[0], FALSE);
if (NO_ERROR == Result) Result = SendChar(s[0], TRUE);
}
return Result;
}

void fub_q() {
SendVirtualKey(VK_TAB, FALSE);
}
Loading

0 comments on commit cfbc1eb

Please sign in to comment.