Skip to content
This repository was archived by the owner on Oct 16, 2022. It is now read-only.

Commit fa8f8f3

Browse files
Projektdateien hinzufügen.
1 parent a7d58db commit fa8f8f3

15 files changed

+573
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Sharkbyteprojects
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

SharkStringConverter.sln

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30717.126
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SharkStringConverter", "SharkStringConverter\SharkStringConverter.vcxproj", "{25B31587-B890-46BC-8FE7-B152555FB6FC}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Test", "Test\Test.vcxproj", "{3BF93258-F47F-4D68-97CE-13233D309632}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Debug|x64.ActiveCfg = Debug|x64
19+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Debug|x64.Build.0 = Debug|x64
20+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Debug|x86.ActiveCfg = Debug|Win32
21+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Debug|x86.Build.0 = Debug|Win32
22+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Release|x64.ActiveCfg = Release|x64
23+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Release|x64.Build.0 = Release|x64
24+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Release|x86.ActiveCfg = Release|Win32
25+
{25B31587-B890-46BC-8FE7-B152555FB6FC}.Release|x86.Build.0 = Release|Win32
26+
{3BF93258-F47F-4D68-97CE-13233D309632}.Debug|x64.ActiveCfg = Debug|x64
27+
{3BF93258-F47F-4D68-97CE-13233D309632}.Debug|x64.Build.0 = Debug|x64
28+
{3BF93258-F47F-4D68-97CE-13233D309632}.Debug|x86.ActiveCfg = Debug|Win32
29+
{3BF93258-F47F-4D68-97CE-13233D309632}.Debug|x86.Build.0 = Debug|Win32
30+
{3BF93258-F47F-4D68-97CE-13233D309632}.Release|x64.ActiveCfg = Release|x64
31+
{3BF93258-F47F-4D68-97CE-13233D309632}.Release|x64.Build.0 = Release|x64
32+
{3BF93258-F47F-4D68-97CE-13233D309632}.Release|x86.ActiveCfg = Release|Win32
33+
{3BF93258-F47F-4D68-97CE-13233D309632}.Release|x86.Build.0 = Release|Win32
34+
EndGlobalSection
35+
GlobalSection(SolutionProperties) = preSolution
36+
HideSolutionNode = FALSE
37+
EndGlobalSection
38+
GlobalSection(ExtensibilityGlobals) = postSolution
39+
SolutionGuid = {40E27A8E-CF6F-4950-A0EC-E0D6C8CFAF66}
40+
EndGlobalSection
41+
EndGlobal
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// SharkStringConverter.cpp : Hiermit werden die exportierten Funktionen für die DLL definiert.
2+
//
3+
4+
#include "pch.h"
5+
#include "framework.h"
6+
#include "SharkStringConverter.h"
7+
using namespace std;
8+
9+
SHARKSTRINGCONVERTER_API char * stringtochar(string stri)
10+
{
11+
int lengthd = stri.length() + 1;
12+
char* content{ (char*)malloc(lengthd) };
13+
if (content == nullptr || content == NULL) {
14+
throw ("Malloc Err");
15+
return (char*)"";
16+
}
17+
strcpy_s(content,(rsize_t)lengthd, stri.c_str());
18+
return content;
19+
}
20+
SHARKSTRINGCONVERTER_API string chartostring(char* stri)
21+
{
22+
std::stringstream ss;
23+
string outputoffile{ "" };
24+
ss << stri;
25+
ss >> outputoffile;
26+
ss.clear();
27+
return outputoffile;
28+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#ifndef sharkstringconvert
2+
#define sharkstringconvert 0x00
3+
#ifdef SHARKSTRINGCONVERTER_EXPORTS
4+
#define SHARKSTRINGCONVERTER_API __declspec(dllexport)
5+
#else
6+
#define SHARKSTRINGCONVERTER_API __declspec(dllimport)
7+
#endif
8+
extern SHARKSTRINGCONVERTER_API int nSharkStringConverter;
9+
10+
SHARKSTRINGCONVERTER_API char * stringtochar(std::string);
11+
SHARKSTRINGCONVERTER_API std::string chartostring(char*);
12+
#endif
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>16.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{25b31587-b890-46bc-8fe7-b152555fb6fc}</ProjectGuid>
25+
<RootNamespace>SharkStringConverter</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>DynamicLibrary</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v142</PlatformToolset>
33+
<CharacterSet>Unicode</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v142</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v142</PlatformToolset>
46+
<CharacterSet>Unicode</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>DynamicLibrary</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v142</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>Unicode</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74+
<LinkIncremental>true</LinkIncremental>
75+
<TargetName>SharkStringConverter</TargetName>
76+
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
78+
<LinkIncremental>false</LinkIncremental>
79+
<TargetName>SharkStringConverter</TargetName>
80+
</PropertyGroup>
81+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82+
<LinkIncremental>true</LinkIncremental>
83+
<TargetName>SharkStringConverter</TargetName>
84+
</PropertyGroup>
85+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86+
<LinkIncremental>false</LinkIncremental>
87+
<TargetName>SharkStringConverter</TargetName>
88+
</PropertyGroup>
89+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
90+
<ClCompile>
91+
<WarningLevel>Level3</WarningLevel>
92+
<SDLCheck>true</SDLCheck>
93+
<PreprocessorDefinitions>WIN32;_DEBUG;SHARKSTRINGCONVERTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<ConformanceMode>true</ConformanceMode>
95+
<PrecompiledHeader>Use</PrecompiledHeader>
96+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
97+
</ClCompile>
98+
<Link>
99+
<SubSystem>Windows</SubSystem>
100+
<GenerateDebugInformation>true</GenerateDebugInformation>
101+
<EnableUAC>false</EnableUAC>
102+
</Link>
103+
</ItemDefinitionGroup>
104+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
105+
<ClCompile>
106+
<WarningLevel>Level3</WarningLevel>
107+
<FunctionLevelLinking>true</FunctionLevelLinking>
108+
<IntrinsicFunctions>true</IntrinsicFunctions>
109+
<SDLCheck>true</SDLCheck>
110+
<PreprocessorDefinitions>WIN32;NDEBUG;SHARKSTRINGCONVERTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
111+
<ConformanceMode>true</ConformanceMode>
112+
<PrecompiledHeader>Use</PrecompiledHeader>
113+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
114+
</ClCompile>
115+
<Link>
116+
<SubSystem>Windows</SubSystem>
117+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
118+
<OptimizeReferences>true</OptimizeReferences>
119+
<GenerateDebugInformation>true</GenerateDebugInformation>
120+
<EnableUAC>false</EnableUAC>
121+
</Link>
122+
</ItemDefinitionGroup>
123+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
124+
<ClCompile>
125+
<WarningLevel>Level3</WarningLevel>
126+
<SDLCheck>true</SDLCheck>
127+
<PreprocessorDefinitions>_DEBUG;SHARKSTRINGCONVERTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
128+
<ConformanceMode>true</ConformanceMode>
129+
<PrecompiledHeader>Use</PrecompiledHeader>
130+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
131+
</ClCompile>
132+
<Link>
133+
<SubSystem>Windows</SubSystem>
134+
<GenerateDebugInformation>true</GenerateDebugInformation>
135+
<EnableUAC>false</EnableUAC>
136+
</Link>
137+
</ItemDefinitionGroup>
138+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
139+
<ClCompile>
140+
<WarningLevel>Level3</WarningLevel>
141+
<FunctionLevelLinking>true</FunctionLevelLinking>
142+
<IntrinsicFunctions>true</IntrinsicFunctions>
143+
<SDLCheck>true</SDLCheck>
144+
<PreprocessorDefinitions>NDEBUG;SHARKSTRINGCONVERTER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
145+
<ConformanceMode>true</ConformanceMode>
146+
<PrecompiledHeader>Use</PrecompiledHeader>
147+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
148+
</ClCompile>
149+
<Link>
150+
<SubSystem>Windows</SubSystem>
151+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
152+
<OptimizeReferences>true</OptimizeReferences>
153+
<GenerateDebugInformation>true</GenerateDebugInformation>
154+
<EnableUAC>false</EnableUAC>
155+
</Link>
156+
</ItemDefinitionGroup>
157+
<ItemGroup>
158+
<None Include="cpp.hint" />
159+
</ItemGroup>
160+
<ItemGroup>
161+
<ClInclude Include="framework.h" />
162+
<ClInclude Include="pch.h" />
163+
<ClInclude Include="SharkStringConverter.h" />
164+
</ItemGroup>
165+
<ItemGroup>
166+
<ClCompile Include="dllmain.cpp" />
167+
<ClCompile Include="pch.cpp">
168+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
169+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
170+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
171+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
172+
</ClCompile>
173+
<ClCompile Include="SharkStringConverter.cpp" />
174+
</ItemGroup>
175+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
176+
<ImportGroup Label="ExtensionTargets">
177+
</ImportGroup>
178+
</Project>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Quelldateien">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Headerdateien">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Ressourcendateien">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<None Include="cpp.hint" />
19+
</ItemGroup>
20+
<ItemGroup>
21+
<ClInclude Include="framework.h">
22+
<Filter>Headerdateien</Filter>
23+
</ClInclude>
24+
<ClInclude Include="SharkStringConverter.h">
25+
<Filter>Headerdateien</Filter>
26+
</ClInclude>
27+
<ClInclude Include="pch.h">
28+
<Filter>Headerdateien</Filter>
29+
</ClInclude>
30+
</ItemGroup>
31+
<ItemGroup>
32+
<ClCompile Include="SharkStringConverter.cpp">
33+
<Filter>Quelldateien</Filter>
34+
</ClCompile>
35+
<ClCompile Include="dllmain.cpp">
36+
<Filter>Quelldateien</Filter>
37+
</ClCompile>
38+
<ClCompile Include="pch.cpp">
39+
<Filter>Quelldateien</Filter>
40+
</ClCompile>
41+
</ItemGroup>
42+
</Project>

SharkStringConverter/cpp.hint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#define SHARKSTRINGCONVERTER_API __declspec(dllexport)
2+
#define SHARKSTRINGCONVERTER_API __declspec(dllimport)

SharkStringConverter/dllmain.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// dllmain.cpp : Definiert den Einstiegspunkt für die DLL-Anwendung.
2+
#include "pch.h"
3+
4+
BOOL APIENTRY DllMain( HMODULE hModule,
5+
DWORD ul_reason_for_call,
6+
LPVOID lpReserved
7+
)
8+
{
9+
switch (ul_reason_for_call)
10+
{
11+
case DLL_PROCESS_ATTACH:
12+
case DLL_THREAD_ATTACH:
13+
case DLL_THREAD_DETACH:
14+
case DLL_PROCESS_DETACH:
15+
break;
16+
}
17+
return TRUE;
18+
}
19+

SharkStringConverter/framework.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#pragma once
2+
3+
#define WIN32_LEAN_AND_MEAN // Selten verwendete Komponenten aus Windows-Headern ausschließen
4+
// Windows-Headerdateien
5+
#include <windows.h>
6+
#include <stdlib.h>
7+
#include <sstream>
8+
#include <string>

SharkStringConverter/pch.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// pch.cpp: Quelldatei, die dem vorkompilierten Header entspricht
2+
3+
#include "pch.h"
4+
5+
// Bei der Verwendung vorkompilierter Header ist diese Quelldatei für eine erfolgreiche Kompilierung erforderlich.

0 commit comments

Comments
 (0)