### App Installer Related Packages Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s3-updatesettings.md
This example demonstrates how to specify related packages, either as a bundle or a single package, within an App Installer file. Ensure the Uri points to a valid location for the package.
```xml
```
--------------------------------
### Configure App Installer Update Checks
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s4-onlaunch.md
This example configures the App Installer to check for updates on every app launch. If an update is found, it prompts the user to install it and blocks app activation until the update is applied. It also allows the app version to be incremented or decremented.
```xml
true
```
--------------------------------
### Configure App Updates on Launch
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s2-onlaunch.md
This example configures the app to check for updates on every launch. If an update is found, the user will be prompted to install it, and the app's activation will be blocked until the update is applied. It also forces updates from any version.
```xml
true
```
--------------------------------
### Configure App Installer Update Checks
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s3-onlaunch.md
Configures the App Installer to check for updates on every launch and prompt the user to update before launching the app. This example also allows forcing updates from any version.
```xml
true
```
--------------------------------
### CustomInstall Element Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-desktop6-custominstall.md
This snippet demonstrates how to use the desktop6:CustomInstall element within the Appx manifest to specify custom installation, repair, and uninstallation actions for an application. It includes an example of installing an anti-cheat executable.
```xml
```
--------------------------------
### OnLaunch Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-onlaunch.md
Example of configuring the OnLaunch element within UpdateSettings to check for updates on every launch and prompt the user, blocking activation until the update is applied.
```APIDOC
## Example
```xml
true
```
```
--------------------------------
### Example DeviceCompanionApplication Element
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/storemanifest/storemanifestschema2015/element-devicecompanionapplication.md
This example demonstrates how to use the DeviceCompanionApplication element to declare an app as a device app by including an ExperienceId.
```xml
aeabdaa8-3bcd-4f03-a7f5-54647fd574c2
```
--------------------------------
### Example: Playing a specific sound
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/tiles/toastschema/element-audio.md
This example demonstrates how to use the audio element to play a specific sound, like an email notification, without looping.
```APIDOC
## Example: Playing a specific sound
### Code
``` xml
```
```
--------------------------------
### winrt::implements Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/cpp-ref-for-winrt/implements.md
A practical example of using winrt::implements to define an application's main view source.
```APIDOC
## Example
```cppwinrt
// App.cpp
...
struct App : implements
{
IFrameworkView CreateView()
{
return ...
}
}
...
```
```
--------------------------------
### WsWriteEnvelopeStart
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Writes the start of the SOAP envelope.
```APIDOC
## WsWriteEnvelopeStart
### Description
Writes the start of the SOAP envelope.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
Introduced into webservices.dll in 10.0.10240.
```
--------------------------------
### Example of using macros in Application element
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/macros.md
This example shows how to use the $(package.effectivePath) macro within the uap10:Parameters attribute of the Application element to dynamically specify the path to a Python script. This ensures the application can find its script regardless of the installation path.
```xml
```
--------------------------------
### AppExtension Manifest Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap3-appextension.md
This example shows how to declare an app extension in the package manifest, specifying the extension category and details for a low-performance browser extension.
```xml
```
--------------------------------
### Example Usage of s2:OptionalPackages
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s2-optionalpackages.md
This example demonstrates how to use the s2:OptionalPackages element to include multiple optional .appxbundle and .appx packages in an AppInstaller file.
```APIDOC
## Example
```xml
```
```
--------------------------------
### StartTraceW
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Starts a trace session.
```APIDOC
## StartTraceW
### Description
Starts a trace session. This API is part of the eventing-controller-l1-1-0.dll.
### Method
`StartTraceW`
### Endpoint
`/windows/win32/api/evntrace/nf-evntrace-starttracea`
### Requirements
Introduced into api-ms-win-eventing-controller-l1-1-0.dll in 10.0.10240.
```
--------------------------------
### ExcludedDirectory Syntax Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-virtualization-excludeddirectory.md
Defines the syntax for specifying an excluded directory. It must start with a known folder identifier and be followed by a relative path.
```xml
This element is a case-insensitive string that must start with "$(KnownFolder:)"" where "known folder name" specifies one of the known folders under the AppData directory. The rest of the string is the relative path to the excluded directory. For example, "$(KnownFolder:LocalAppData)\Fabrikam\Shared".
```
--------------------------------
### WsWriteStartElement
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Writes the start of an element in the XML output.
```APIDOC
## WsWriteStartElement
### Description
Writes the start of an element in the XML output.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
Introduced into webservices.dll in 10.0.10240.
```
--------------------------------
### UAP VisualElements Manifest Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap-visualelements.md
Example of how to define application visual elements in the AppxPackage manifest, including logos, display name, and splash screen.
```xml
```
--------------------------------
### AppInstaller Dependencies Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s2-dependencies.md
Example of an s2:Dependencies element in an AppInstaller file, specifying two s2:Package dependencies for different processor architectures. The Uri locations provided are illustrative and do not point to actual resources.
```xml
```
--------------------------------
### StartTraceA
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-extension-apis.md
The StartTraceA function starts a trace session.
```APIDOC
## StartTraceA
### Description
Starts a trace session.
### Requirements
Introduced into api-ms-win-downlevel-advapi32-l2-1-1.dll in 10.0.16299. Moved into api-ms-win-eventing-controller-l1-1-0.dll in 10.0.16299. Moved into advapi32.dll in 10.0.16299. Removed in 10.0.17134.
```
--------------------------------
### WsStartWriterCanonicalization
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Starts the canonicalization process for an XML writer.
```APIDOC
## WsStartWriterCanonicalization
### Description
Starts the canonicalization process for an XML writer.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
Introduced into webservices.dll in 10.0.10240.
```
--------------------------------
### WsWriteMessageStart
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Writes the start of a web service message.
```APIDOC
## WsWriteMessageStart
### Description
Writes the start of a web service message.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
Introduced into webservices.dll in 10.0.10240.
```
--------------------------------
### MIDL 3.0 Syntax Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/midl-3/intro.md
This example demonstrates most of the language syntax elements commonly used in MIDL 3.0 for defining a Windows Runtime type. It includes namespaces, delegates, runtime classes, constructors, properties, methods, and events.
```idl
// Photo.idl
namespace PhotoEditor
{
delegate void RecognitionHandler(Boolean arg); // delegate type, for an event.
runtimeclass Photo : Windows.UI.Xaml.Data.INotifyPropertyChanged // interface.
{
Photo(); // constructors.
Photo(Windows.Storage.StorageFile imageFile);
String ImageName{ get; }; // read-only property.
Single SepiaIntensity; // read-write property.
Windows.Foundation.IAsyncAction StartRecognitionAsync(); // (asynchronous) method.
event RecognitionHandler ImageRecognized; // event.
}
}
```
--------------------------------
### Shortcut File Path Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-desktop7-shortcut.md
Demonstrates how to specify a shortcut's target file path using predefined constants like $(Desktop) for the user's desktop directory.
```xml
File="$(Desktop)\Shortcut.lnk"
```
--------------------------------
### Configure OnLaunch Update Checks and Prompts
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-onlaunch.md
Example demonstrating how to configure the OnLaunch element to check for updates on every launch, prompt the user for updates, and block activation until the update is applied. It also includes a ForceUpdateFromAnyVersion setting.
```xml
true
```
--------------------------------
### alljoyn_busattachment_getpeerguid
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Gets the peer GUID of the bus attachment. Introduced into MSAJApi.dll in 10.0.10240. Moved into msajapi.dll in 10.0.14393.
```APIDOC
## alljoyn_busattachment_getpeerguid
### Description
Gets the peer GUID of the bus attachment.
### Introduced
MSAJApi.dll in 10.0.10240. Moved into msajapi.dll in 10.0.14393.
```
--------------------------------
### Enable File System Write Virtualization
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-desktop6-filesystemwritevirtualization.md
Example of how to enable file system write virtualization in the app manifest.
```xml
enabled
```
--------------------------------
### alljoyn_busattachment_getglobalguidstring
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Gets the global GUID string of the bus attachment. Introduced into MSAJApi.dll in 10.0.10240. Moved into msajapi.dll in 10.0.14393.
```APIDOC
## alljoyn_busattachment_getglobalguidstring
### Description
Gets the global GUID string of the bus attachment.
### Introduced
MSAJApi.dll in 10.0.10240. Moved into msajapi.dll in 10.0.14393.
```
--------------------------------
### WsWriteEndStartElement
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Writes the end of a start element in the XML output.
```APIDOC
## WsWriteEndStartElement
### Description
Writes the end of a start element in the XML output.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
Introduced into webservices.dll in 10.0.10240.
```
--------------------------------
### Enable Background Updates and Other Settings
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s4-automaticbackgroundtask.md
This example shows how to configure background updates along with on-launch checks and version flexibility. The app will check for updates every 12 hours on launch and in the background, and can increment or decrement the app version.
```xml
true
```
--------------------------------
### AppContent-ms File Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appcontentschema/element-name.md
This XML file defines an item named 'Sample 1' and includes custom elements for indexing.
```XML
Sample 1Sample 1 - keyword 1Sample 1 - keyword 2Sample 1 commentSample 1 Titlebryan@contoso.comvincent@contoso.com
The text included here will be indexed, enabling full-text search.
```
--------------------------------
### StoreManifest XML Example for UWP
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/storemanifest/storemanifestschema2015/storemanifest-xml-example-windows-10.md
This XML declares the app as a Microsoft Store device app tied to a single device experience. It also specifies the minimum memory and DirectX level required for installation.
```XML
258E1783-155C-4577-9077-DBF6A4B71A01
```
--------------------------------
### InstalledLocationVirtualization Extension Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap10-installedlocationvirtualization.md
This XML snippet demonstrates how to declare the uap10:InstalledLocationVirtualization extension in an MSIX package manifest. It configures update actions for modified, deleted, and added items within the installation directory.
```xml
```
--------------------------------
### Example Element for Command
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/voicecommands/voice-command-elements-and-attributes-1-2.md
Provides a sample phrase for a specific command, visible to users on the 'What can I say' screen. Should include the AppName or CommandPrefix.
```XML
Send a text to John Doe
```
--------------------------------
### Show App Name on Tiles
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles.md
This example demonstrates how to use the ShowNameOnTiles and ShowOn elements to specify that the app name should appear on specific tile sizes.
```xml
```
--------------------------------
### IIDFromString
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Converts a string representation of a GUID into a GUID structure.
```APIDOC
## IIDFromString
### Description
Converts a string representation of a GUID into a GUID structure. This function is essential for working with interface identifiers in COM.
### Method
`IIDFromString()`
### Endpoint
N/A (Win32 API)
### Parameters
None
### Request Example
N/A
### Response
N/A
```
--------------------------------
### s3:AppInstaller Element
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s3-appinstaller.md
Defines the root element of an App Installer file. It includes attributes for the installer URI and version, and can contain various child elements to manage the installation process.
```APIDOC
## s3:AppInstaller
### Description
Defines the root element of an App Installer file. This element is used to specify the main package or bundle, along with settings for updates, dependencies, and related packages.
### Attributes
* **Uri** (string) - Required - Web URI to the redirected App Installer file. The App Installer file can only be redirected a max of three times. Query strings with multiple key/value pairs are currently not supported. Must be between 1 and 2084 characters in length.
* **Version** (string) - Required - The version of the App Installer file in quad notation (Major.Minor.Build.Revision), where Major cannot be "0".
* **IgnorableNamespaces** (string) - Optional - Declares namespaces used in the app installer file that should be ignored. Multiple namespaces are specified with a space between each namespace. Must be between 1 and 32767 characters in length with a non-whitespace character at its beginning and end.
### Child Elements
* **[s4:UpdateUris](element-s4-updateuris.md)** - Optional - Specifies a list of Uris pointing to App Installer files for updating an installation.
* **[s4:RepairUris](element-s4-repairuris.md)** - Optional - Specifies a list of Uris pointing to App Installer files for repairing an installation.
* **MainPackageType** - Required - An abstract element that must be substituted with either a [s3:MainPackage](element-s3-mainpackage.md) or a [s3:MainBundle](element-s3-mainbundle.md) element.
* **[s3:OptionalPackages](element-s3-optionalpackages.md)** - Optional - Specifies the optional packages that will be installed along with the main package.
* **[s3:RelatedPackages](element-s3-relatedpackages.md)** - Optional - Specifies the related packages. These packages won't be installed as part of the deployment operation.
* **[s3:Dependencies](element-s3-dependencies.md)** - Optional - Specifies dependencies that will be installed if required.
* **[s3:UpdateSettings](element-s3-updatesettings.md)** - Optional - Toggles the auto update setting of installed packages.
### Remarks
* The `` element can have either a `` or `` element. The deployment operation will fail if more than one of either are included.
* Only `encoding="UTF-8"` with no escape characters, and no non-ascii characters is accepted.
### Requirements
* `xmlns:s3="http://schemas.microsoft.com/appx/appinstaller/2018"` (Required for features introduced in Windows 10, version 1809)
* `xmlns:s4="http://schemas.microsoft.com/appx/appinstaller/2021"` (Required for features introduced in Windows version 21H2 build 22000)
* Minimum OS version: Windows 10 version 1809
```
--------------------------------
### Example Capabilities Node
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-f-capability.md
Illustrates how to declare various capabilities within the Capabilities node of an AppxManifest.xml file. This includes standard capabilities and namespace-specific ones like documentsLibrary.
```xml
```
--------------------------------
### s4:RepairUri Element
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s4-repairuri.md
Specifies a Uri pointing to an App Installer file for repairing an installation.
```APIDOC
## s4:RepairUri
### Description
Specifies a Uri pointing to an App Installer file for repairing an installation.
### Syntax
```xml
Web URI as a string between 1 and 2084 characters in length.
```
### Parent Elements
* s4:RepairUris
```
--------------------------------
### Find midl.exe Installation Path
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/midl-3/intro.md
Uses the 'where' command to locate the installation path of the midl.exe compiler.
```console
where midl
```
--------------------------------
### Example Element for CommandSet
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/voicecommands/voice-command-elements-and-attributes-1-2.md
Provides a sample phrase for the entire CommandSet, visible to users on the 'What can I say' screen. Should include the AppName or CommandPrefix.
```XML
Call Contoso
```
--------------------------------
### Example: Muting toast notification audio
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/tiles/toastschema/element-audio.md
This example shows how to use the silent attribute to completely mute the audio for a toast notification.
```APIDOC
## Example: Muting toast notification audio
### Code
``` xml
```
```
--------------------------------
### Registering In-Process and Out-of-Process Servers
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-com4-inprocessserver.md
This example demonstrates how to register both an out-of-process and an in-process server implementation for the same COM class within an application manifest.
```xml
```
--------------------------------
### Enabling Trusted Launch with PackageIntegrity
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-trustedlaunch-trustedlaunch.md
Demonstrates how to enable Trusted Launch by setting the trustedlaunch:TrustedLaunch element to 'true' and configuring the uap10:PackageIntegrity element with Enforcement set to 'on'. This example includes necessary XML namespaces.
```xml
...
true
```
--------------------------------
### Identity Element Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-f-identity.md
This is an example of an Identity element used in an app manifest file, demonstrating required attributes like Name, Publisher, and Version.
```xml
```
--------------------------------
### Macro expansion examples
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/macros.md
This table lists available macros and their corresponding runtime expansions, such as retrieving environment variables or package paths.
```plaintext
env:environmentvariable|GetEnvironmentVariable(environmentvariable)
```
```plaintext
package.currentDirectoryPath|GetCurrentDirectory()
```
```plaintext
package.effectiveExternalPath|GetPackagePathByFullName2(...PackagePathType_EffectiveExternal...)
```
```plaintext
package.effectivePath|GetPackagePathByFullName2(...PackagePathType_Effective...)
```
```plaintext
package.installedPath|GetPackagePathByFullName2(...PackagePathType_Install...)
```
```plaintext
package.machineExternalPath|GetPackagePathByFullName2(...PackagePathType_MachineExternal...)
```
```plaintext
package.mutablePath|GetPackagePathByFullName2(...PackagePathType_Mutable...)
```
```plaintext
package.userExternalPath|GetPackagePathByFullName2(...PackagePathType_UserExternal...)
```
```plaintext
system.path|GetSystemDirectory()
```
```plaintext
windows.path|GetWindowsDirectory()
```
--------------------------------
### Show App Name on Tiles
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap-showon.md
This example demonstrates how to use the uap:ShowNameOnTiles and uap:ShowOn elements to specify which tile sizes should display the app's name.
```xml
```
--------------------------------
### MIDL Compiler Error: Missing GUID Attribute
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/midl-3/advanced.md
This console output shows the error produced when an empty interface is declared without an explicit [uuid(...)] attribute. The compiler cannot find the required GUID.
```console
error MIDL4010 : [msg]Cannot find the guid attribute of an interface or a delegate. [context]Windows.Widgets.ISomethingMarker
```
--------------------------------
### UnregisterTraceGuids
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Unregisters trace GUIDs.
```APIDOC
## UnregisterTraceGuids
### Description
Unregisters trace GUIDs. This API is part of the eventing-classicprovider-l1-1-0.dll.
### Method
`UnregisterTraceGuids`
### Endpoint
`/windows/win32/api/evntrace/nf-evntrace-unregistertraceguids`
### Requirements
Introduced into api-ms-win-eventing-classicprovider-l1-1-0.dll in 10.0.10240.
```
--------------------------------
### Example RelatedPackages Configuration
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-related-packages.md
Illustrates how to specify related app bundles and packages within the RelatedPackages element. Includes attributes for Name, Publisher, Version, ProcessorArchitecture, and Uri.
```xml
```
--------------------------------
### RegisterTraceGuidsW
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Registers trace GUIDs.
```APIDOC
## RegisterTraceGuidsW
### Description
Registers trace GUIDs. This API is part of the eventing-classicprovider-l1-1-0.dll.
### Method
`RegisterTraceGuidsW`
### Endpoint
`/windows/win32/api/evntrace/nf-evntrace-registertraceguidsa`
### Requirements
Introduced into api-ms-win-eventing-classicprovider-l1-1-0.dll in 10.0.10240.
```
--------------------------------
### WSAStartup
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Initiates the use of the Windows Sockets DLL. Introduced in Windows 10.0.10240.
```APIDOC
## WSAStartup
### Description
Initiates the use of the Windows Sockets DLL.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
### Introduced
10.0.10240
```
--------------------------------
### IMFGetService
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-extension-apis.md
Interface for getting services.
```APIDOC
## IMFGetService
### Description
This interface provides a generic mechanism for an object to expose other services it supports, identified by GUIDs.
### Introduced
10.0.10240.
```
--------------------------------
### InitializeContext
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Initializes an XState context.
```APIDOC
## InitializeContext
### Description
Initializes an XState context. This API is part of the xstate-l2-1-0.dll.
### Method
`InitializeContext`
### Endpoint
`/windows/win32/api/winbase/nf-winbase-initializecontext`
### Requirements
Introduced into api-ms-win-core-xstate-l2-1-0.dll in 10.0.10240.
```
--------------------------------
### Authoring a runtime class with implements
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/cpp-ref-for-winrt/implements.md
This example demonstrates deriving from implements when authoring a runtime class, often used with generated base classes like BookSkuT.
```cpp
struct BookSku : BookSkuT
{
...
}
```
--------------------------------
### WsReadMessageStart
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Reads the start of the message.
```APIDOC
## WsReadMessageStart
### Description
Reads the start of the message.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
```
--------------------------------
### OnLaunch Element Syntax
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-onlaunch.md
Defines the syntax for the OnLaunch element, including optional attributes for controlling update check frequency, user prompts, and activation blocking.
```xml
```
--------------------------------
### Background Task ResourceGroup Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap-extension.md
This example demonstrates how the ResourceGroup attribute on the uap:Extension element affects the activation of background tasks. Different ResourceGroup values can lead to separate background task host processes.
```xml
```
--------------------------------
### JetBackupInstance
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Starts a backup instance for the Extensible Storage Engine (ESE). Introduced in 10.0.16299, removed in 10.0.17134.
```APIDOC
## JetBackupInstance
### Description
Starts a backup instance for the Extensible Storage Engine (ESE).
### Introduced
10.0.16299
### Removed
10.0.17134
```
--------------------------------
### Related Packages Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s2-relatedpackages.md
This example demonstrates how to declare related packages, including a bundle and a single package, within the s2:RelatedPackages element. The Uri locations provided are for illustrative purposes and do not point to actual resources.
```xml
```
--------------------------------
### StringFromGUID2
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Converts a GUID into a string representation.
```APIDOC
## StringFromGUID2
### Description
Converts a GUID (Globally Unique Identifier) into a string representation. This function is similar to `StringFromCLSID` but works with any GUID.
### Method
`StringFromGUID2()`
### Endpoint
N/A (Win32 API)
### Parameters
None
### Request Example
N/A
### Response
N/A
```
--------------------------------
### Define Optional Packages in AppInstaller
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s3-optionalpackages.md
Use this element to list optional packages that will be installed with the main app. Include either a Package for .appx files or a Bundle for .appxbundle files.
```xml
```
--------------------------------
### WsReadStartAttribute
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Reads the start of an attribute in the XML.
```APIDOC
## WsReadStartAttribute
### Description
Reads the start of an attribute in the XML.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
```
--------------------------------
### WsReadEnvelopeStart
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Reads the start of the message envelope.
```APIDOC
## WsReadEnvelopeStart
### Description
Reads the start of the message envelope.
### Method
[Not specified in source]
### Endpoint
[Not specified in source]
### Parameters
[Not specified in source]
### Request Example
[Not specified in source]
### Response
[Not specified in source]
```
--------------------------------
### select
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Monitors socket sets for readiness. Introduced in ws2_32.dll in 10.0.10240.
```APIDOC
## select
### Description
Monitors one or more socket sets for readiness to perform I/O operations.
### Method
[Function Signature - details not provided in source]
### Endpoint
N/A (Win32 API)
### Parameters
[Parameter details not provided in source]
### Request Example
N/A
### Response
[Response details not provided in source]
```
--------------------------------
### MIDL 3 Instance Methods
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/midl-3/intro.md
Demonstrates various forms of instance methods, including those with no return value, with a return value, accepting/returning runtime classes, asynchronous operations, output parameters, reference parameters, and arrays.
```idl
// Instance method with no return value.
void AddData(String data);
```
```idl
// Instance method *with* a return value.
Int32 GetDataSize();
```
```idl
// Instance method accepting/returning a runtime class.
// Notice that you don't say "&" nor "*" for reference types.
BasicClass MergeWith(BasicClass other);
```
```idl
// Asynchronous instance methods.
Windows.Foundation.IAsyncAction UpdateAsync();
Windows.Foundation.IAsyncOperation TrySaveAsync();
```
```idl
// Instance method that returns a value through a parameter.
Boolean TryParseInt16(String input, out Int16 value);
```
```idl
// Instance method that receives a reference to a value type.
Double CalculateArea(ref const Windows.Foundation.Rect value);
```
```idl
// Instance method accepting or returning a conformant array.
void SetBytes(UInt8[] bytes);
UInt8[] GetBytes();
```
```idl
// instance method that writes to a caller-provided conformant array
void ReadBytes(ref UInt8[] bytes);
```
--------------------------------
### JsStartDebugging
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/win32-and-com/win32-apis.md
Starts debugging a JavaScript script.
```APIDOC
## JsStartDebugging
### Description
Starts debugging a JavaScript script.
### Introduced
10.0.10240
```
--------------------------------
### App Manifest Application XML Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/generate-package-manifest.md
This XML snippet demonstrates the Application section of an app manifest, specifying the Id, Executable, and EntryPoint for an application.
```xml
```
--------------------------------
### Authoring a runtime class with winrt::implements
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/cpp-ref-for-winrt/implements.md
This example demonstrates how to use winrt::implements when authoring a runtime class, typically by deriving from a generated base class.
```APIDOC
## Authoring a runtime class with winrt::implements
### Description
This next example is for when you're authoring a runtime class.
### Code Example
```cppwinrt
struct BookSku : BookSkuT
{
// ... implementation details ...
}
```
```
--------------------------------
### WinRT Parameterized Type Guid Generation Grammar
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/winrt-cref/winrt-type-system.md
This grammar defines the structure of type signatures used in the computation of GUIDs for parameterized types in WinRT. It specifies how base types, interfaces, delegates, and other parameterized types are represented as strings for hashing.
```syntax
signature_octets => guid_to_octets(wrt_pinterface_namespace) string_to_utf8_octets(ptype_instance_signature)
wrt_pinterface_namespace => "11f47ad5-7b73-42c0-abae-878b1e16adee"
ptype_instance_signature => pinterface_instance_signature | pdelegate_instance_ signature
pinterface_instance _signature => "pinterface(" piid_guid ";" args ")"
pdelegate_instance _signature => "pinterface(" piid_guid ";" args ")"
piid_guid => guid
args => arg | arg ";" args
arg => type_signature
type_signature => base_type_identifier | com_interface_signature | interface _signature | delegate_signature | interface_group_signature | runtime_class_signature | struct_signature | enum_signature | pinterface_instance_signature | pdelegate_instance_signature
com_interface_signature => "cinterface(IInspectable)"
base_type_identifier is defined below
interface_signature => guid
interface_group_signature => "ig(" interface_group_name ";" default_interface ")"
runtime_class_signature => "rc(" runtime_class_name ";" default_interface ")"
default_interface => type_signature
struct_signature => "struct(" struct_name ";" args ")"
enum_signature => "enum(" enum_name ";" enum_underlying_type ")"
enum_underlying_type => type_signature
delegate_signature => "delegate(" guid ")"
guid => "{" dashed_hex "}"
dashed_hex is the format that uuidgen writes in when passed no arguments.
dashed_hex => hex{8} "-" hex{4} "-" hex{4} "-" hex{4} "-" hex{12}
hex => [0-9a-f]
```
--------------------------------
### Define App Dependencies
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appinstallerschema/element-s3-dependencies.md
Specifies required packages for an application. The Uri location in this example is a placeholder and does not exist.
```xml
```
--------------------------------
### uap10:UpdateActions Element Example
Source: https://github.com/microsoftdocs/winrt-related/blob/docs/winrt-related-src/schemas/appxpackage/uapmanifestschema/element-uap10-updateactions.md
This example shows how to use the uap10:UpdateActions element within the uap10:InstalledLocationVirtualization extension to configure file handling during app updates. It specifies that modified and added items are kept, while deleted items are reset.
```xml
```