Skip to content

Commit 0a8e747

Browse files
committed
Add projects to hold compilable code samples for documentation examples in multiple languages
1 parent 9b4836f commit 0a8e747

22 files changed

Lines changed: 941 additions & 0 deletions
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#include "stdafx.h"
2+
3+
using namespace System;
4+
using namespace System::Reflection;
5+
using namespace System::Runtime::CompilerServices;
6+
using namespace System::Runtime::InteropServices;
7+
using namespace System::Security::Permissions;
8+
9+
//
10+
// General Information about an assembly is controlled through the following
11+
// set of attributes. Change these attribute values to modify the information
12+
// associated with an assembly.
13+
//
14+
[assembly:AssemblyTitleAttribute(L"CPPCodeSamples")];
15+
[assembly:AssemblyDescriptionAttribute(L"")];
16+
[assembly:AssemblyConfigurationAttribute(L"")];
17+
[assembly:AssemblyCompanyAttribute(L"")];
18+
[assembly:AssemblyProductAttribute(L"CPPCodeSamples")];
19+
[assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2013")];
20+
[assembly:AssemblyTrademarkAttribute(L"")];
21+
[assembly:AssemblyCultureAttribute(L"")];
22+
23+
//
24+
// Version information for an assembly consists of the following four values:
25+
//
26+
// Major Version
27+
// Minor Version
28+
// Build Number
29+
// Revision
30+
//
31+
// You can specify all the value or you can default the Revision and Build Numbers
32+
// by using the '*' as shown below:
33+
34+
[assembly:AssemblyVersionAttribute("1.0.*")];
35+
36+
[assembly:ComVisible(false)];
37+
38+
[assembly:CLSCompliantAttribute(true)];
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" 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+
</ItemGroup>
13+
<PropertyGroup Label="Globals">
14+
<ProjectGuid>{2B5E19B8-7169-4F4F-92DA-AE7D9F20DDC4}</ProjectGuid>
15+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
16+
<Keyword>ManagedCProj</Keyword>
17+
<RootNamespace>CPPCodeSamples</RootNamespace>
18+
</PropertyGroup>
19+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
20+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
21+
<ConfigurationType>DynamicLibrary</ConfigurationType>
22+
<UseDebugLibraries>true</UseDebugLibraries>
23+
<PlatformToolset>v110</PlatformToolset>
24+
<CLRSupport>true</CLRSupport>
25+
<CharacterSet>Unicode</CharacterSet>
26+
</PropertyGroup>
27+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
28+
<ConfigurationType>DynamicLibrary</ConfigurationType>
29+
<UseDebugLibraries>false</UseDebugLibraries>
30+
<PlatformToolset>v110</PlatformToolset>
31+
<CLRSupport>true</CLRSupport>
32+
<CharacterSet>Unicode</CharacterSet>
33+
</PropertyGroup>
34+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
35+
<ImportGroup Label="ExtensionSettings">
36+
</ImportGroup>
37+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
38+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
39+
</ImportGroup>
40+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
41+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
42+
</ImportGroup>
43+
<PropertyGroup Label="UserMacros" />
44+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
45+
<LinkIncremental>true</LinkIncremental>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
48+
<LinkIncremental>false</LinkIncremental>
49+
</PropertyGroup>
50+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
51+
<ClCompile>
52+
<WarningLevel>Level3</WarningLevel>
53+
<Optimization>Disabled</Optimization>
54+
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
55+
<PrecompiledHeader>Use</PrecompiledHeader>
56+
</ClCompile>
57+
<Link>
58+
<GenerateDebugInformation>true</GenerateDebugInformation>
59+
<AdditionalDependencies />
60+
</Link>
61+
</ItemDefinitionGroup>
62+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
63+
<ClCompile>
64+
<WarningLevel>Level3</WarningLevel>
65+
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66+
<PrecompiledHeader>Use</PrecompiledHeader>
67+
</ClCompile>
68+
<Link>
69+
<GenerateDebugInformation>true</GenerateDebugInformation>
70+
<AdditionalDependencies />
71+
</Link>
72+
</ItemDefinitionGroup>
73+
<ItemGroup>
74+
<Reference Include="System" />
75+
<Reference Include="System.Data" />
76+
<Reference Include="System.Xml" />
77+
</ItemGroup>
78+
<ItemGroup>
79+
<ClInclude Include="resource.h" />
80+
<ClInclude Include="Stdafx.h" />
81+
</ItemGroup>
82+
<ItemGroup>
83+
<ClCompile Include="AssemblyInfo.cpp" />
84+
<ClCompile Include="Stdafx.cpp">
85+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
86+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
87+
</ClCompile>
88+
</ItemGroup>
89+
<ItemGroup>
90+
<Text Include="ReadMe.txt" />
91+
</ItemGroup>
92+
<ItemGroup>
93+
<ResourceCompile Include="app.rc" />
94+
</ItemGroup>
95+
<ItemGroup>
96+
<Image Include="app.ico" />
97+
</ItemGroup>
98+
<ItemGroup>
99+
<ProjectReference Include="..\..\corelib\corelib.v4.0.csproj">
100+
<Project>{7dba11eb-dba7-4d3a-8d42-b5312e74b9c0}</Project>
101+
</ProjectReference>
102+
</ItemGroup>
103+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
104+
<ImportGroup Label="ExtensionTargets">
105+
</ImportGroup>
106+
</Project>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
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+
<ClInclude Include="Stdafx.h">
19+
<Filter>Header Files</Filter>
20+
</ClInclude>
21+
<ClInclude Include="resource.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
</ItemGroup>
25+
<ItemGroup>
26+
<ClCompile Include="AssemblyInfo.cpp">
27+
<Filter>Source Files</Filter>
28+
</ClCompile>
29+
<ClCompile Include="Stdafx.cpp">
30+
<Filter>Source Files</Filter>
31+
</ClCompile>
32+
</ItemGroup>
33+
<ItemGroup>
34+
<Text Include="ReadMe.txt" />
35+
</ItemGroup>
36+
<ItemGroup>
37+
<ResourceCompile Include="app.rc">
38+
<Filter>Resource Files</Filter>
39+
</ResourceCompile>
40+
</ItemGroup>
41+
<ItemGroup>
42+
<Image Include="app.ico">
43+
<Filter>Resource Files</Filter>
44+
</Image>
45+
</ItemGroup>
46+
</Project>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
========================================================================
2+
DYNAMIC LINK LIBRARY : CPPCodeSamples Project Overview
3+
========================================================================
4+
5+
AppWizard has created this CPPCodeSamples DLL for you.
6+
7+
This file contains a summary of what you will find in each of the files that
8+
make up your CPPCodeSamples application.
9+
10+
CPPCodeSamples.vcxproj
11+
This is the main project file for VC++ projects generated using an Application Wizard.
12+
It contains information about the version of Visual C++ that generated the file, and
13+
information about the platforms, configurations, and project features selected with the
14+
Application Wizard.
15+
16+
CPPCodeSamples.vcxproj.filters
17+
This is the filters file for VC++ projects generated using an Application Wizard.
18+
It contains information about the association between the files in your project
19+
and the filters. This association is used in the IDE to show grouping of files with
20+
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
21+
"Source Files" filter).
22+
23+
CPPCodeSamples.cpp
24+
This is the main DLL source file.
25+
26+
CPPCodeSamples.h
27+
This file contains a class declaration.
28+
29+
AssemblyInfo.cpp
30+
Contains custom attributes for modifying assembly metadata.
31+
32+
/////////////////////////////////////////////////////////////////////////////
33+
Other notes:
34+
35+
AppWizard uses "TODO:" to indicate parts of the source code you
36+
should add to or customize.
37+
38+
/////////////////////////////////////////////////////////////////////////////
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// stdafx.cpp : source file that includes just the standard includes
2+
// CPPCodeSamples.pch will be the pre-compiled header
3+
// stdafx.obj will contain the pre-compiled type information
4+
5+
#include "stdafx.h"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// stdafx.h : include file for standard system include files,
2+
// or project specific include files that are used frequently,
3+
// but are changed infrequently
4+
5+
#pragma once
6+
7+

src/Samples/CPPCodeSamples/app.ico

10.7 KB
Binary file not shown.

src/Samples/CPPCodeSamples/app.rc

2.5 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
//{{NO_DEPENDENCIES}}
2+
// Microsoft Visual C++ generated include file.
3+
// Used by app.rc
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F2743826-5116-42F4-B75A-3D54B6BE3462}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>CSharpCodeSamples</RootNamespace>
11+
<AssemblyName>CSharpCodeSamples</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
<Prefer32Bit>false</Prefer32Bit>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
<Prefer32Bit>false</Prefer32Bit>
34+
</PropertyGroup>
35+
<ItemGroup>
36+
<Reference Include="System" />
37+
<Reference Include="System.Core" />
38+
<Reference Include="System.Xml.Linq" />
39+
<Reference Include="System.Data.DataSetExtensions" />
40+
<Reference Include="Microsoft.CSharp" />
41+
<Reference Include="System.Data" />
42+
<Reference Include="System.Xml" />
43+
</ItemGroup>
44+
<ItemGroup>
45+
<Compile Include="Properties\AssemblyInfo.cs" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<ProjectReference Include="..\..\corelib\corelib.v4.0.csproj">
49+
<Project>{7dba11eb-dba7-4d3a-8d42-b5312e74b9c0}</Project>
50+
<Name>corelib.v4.0</Name>
51+
</ProjectReference>
52+
</ItemGroup>
53+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
54+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
55+
Other similar extension points exist, see Microsoft.Common.targets.
56+
<Target Name="BeforeBuild">
57+
</Target>
58+
<Target Name="AfterBuild">
59+
</Target>
60+
-->
61+
</Project>

0 commit comments

Comments
 (0)