Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direct #1386

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

direct #1386

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

This repo contains the samples that demonstrate the API usage patterns for the Universal Windows Platform (UWP) in the Windows Software Development Kit (SDK) for Windows 10. These code samples were created with the Universal Windows Platform templates available in Visual Studio, and are designed to run on desktop, mobile, and future devices that support the Universal Windows Platform.

> **Note:** If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/main.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
> **Note:** If you are unfamiliar with Git and GitHub, you can download the entire collection as a
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/main.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.

## Universal Windows Platform development

Expand All @@ -28,11 +28,12 @@ The easiest way to use these samples without using Git is to download the zip fi

[Download the samples ZIP](../../archive/main.zip)

**Notes:**
* Before you unzip the archive, right-click it, select **Properties**, and then select **Unblock**.
* Be sure to unzip the entire archive, and not just individual samples. The samples all depend on the SharedContent folder in the archive.
* In Visual Studio, the platform target defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

**Notes:**

* Before you unzip the archive, right-click it, select **Properties**, and then select **Unblock**.
* Be sure to unzip the entire archive, and not just individual samples. The samples all depend on the SharedContent folder in the archive.
* In Visual Studio, the platform target defaults to ARM, so be sure to change that to x64 or x86 if you want to test on a non-ARM device.

The samples use Linked files in Visual Studio to reduce duplication of common files, including sample template files and image assets. These common files are stored in the SharedContent folder at the root of the repository, and are referred to in the project files using links.

**Reminder:** If you unzip individual samples, they will not build due to references to other portions of the ZIP file that were not unzipped. You must unzip the entire archive if you intend to build the samples.
Expand All @@ -49,13 +50,19 @@ or contact [[email protected]](mailto:[email protected]) with any addi

## See also

For additional Windows samples, see [Windows on GitHub](http://microsoft.github.io/windows/).
For additional Windows samples, see [Windows on GitHub](http://microsoft.github.io/windows/).

## Samples by category

### App settings

``````$$
****python****
$$
python
```
<table>
```
<tr>
<td><a href="Samples/Package">App package information</a></td>
<td><a href="Samples/ApplicationData">Application data</a></td>
Expand Down
23 changes: 12 additions & 11 deletions Samples/WiFiDirect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ description: "Shows how to use the Wi-Fi Direct API to discover devices and conn

Shows how to use the Wi-Fi Direct API to discover devices and connect to the them over Wi-Fi Direct.

> **Note:** This sample is part of a large collection of UWP feature samples.
> **Note:** This sample is part of a large collection of UWP feature samples.
> You can download this sample as a standalone ZIP file
> [from docs.microsoft.com](https://docs.microsoft.com/samples/microsoft/windows-universal-samples/wifidirect/),
> or you can download the entire collection as a single
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).
> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.
> [ZIP file](https://github.com/Microsoft/Windows-universal-samples/archive/master.zip), but be
> sure to unzip everything to access shared dependencies. For more info on working with the ZIP file,
> the samples collection, and GitHub, see [Get the UWP samples from GitHub](https://aka.ms/ovu2uq).```**python**

```> For more samples, see the [Samples portal](https://aka.ms/winsamples) on the Windows Dev Center.

Specifically, this sample demonstrates the following:

Expand All @@ -59,7 +60,7 @@ The C++ and JS samples do not demonstrate advanced optional settings yet.
Support for those will come in a future sample.

**Note** This sample requires two or more devices with Wi-Fi chipsets and drivers that support Wi-Fi Direct.

**Note** This sample was created using one of the universal app templates available in Visual Studio. It shows how its solution is structured so it can run on Windows 10. For more info about how to build apps that target Windows and Windows Phone with Visual Studio, see [Build apps that target Windows 10 by using Visual Studio](http://msdn.microsoft.com/library/windows/apps/dn609832).

## Related topics
Expand All @@ -71,15 +72,15 @@ Support for those will come in a future sample.

### Related samples

* [WiFiDirect sample](/archived/WiFiDirect/) for JavaScript (archived)
- [WiFiDirect sample](/archived/WiFiDirect/) for JavaScript (archived)

## System requirements

* Windows 10
- Windows 10

## Build the sample

1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
2. Start Microsoft Visual Studio and select **File** \> **Open** \> **Project/Solution**.
3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio Solution (.sln) file.
4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**.
Expand All @@ -90,10 +91,10 @@ The next steps depend on whether you just want to deploy the sample or you want

### Deploying the sample

- Select **Build** \> **Deploy Solution**.
- Select **Build** \> **Deploy Solution**.

### Deploying and running the sample

- To debug the sample and then run it, press F5 or select **Debug** \> **Start Debugging**. To run the sample without debugging, press Ctrl+F5 or select **Debug** \> **Start Without Debugging**.
- To debug the sample and then run it, press F5 or select **Debug** \> **Start Debugging**. To run the sample without debugging, press Ctrl+F5 or select **Debug** \> **Start Without Debugging**.

**Note** You will need to deploy the sample to at least two devices in order to actually discover and connect to devices, unless you are using the sample to interact with other devices that support Wi-Fi Direct.