[Docs]Replace docs.micrososft.com with learn.microsoft.com (#20662)

* Update SUPPORT.md

* Update runner.md

* Update guidance.md

* Update convert-stringtable-to-resx.ps1

* Update readme.md

* Update ControlType.cs

* Update README.md

* Update CLSID.h

* Update GenericProperty`1.cs

* Update project-overview.md

* Update interop.cpp

* Update PreviewHandlerBase.cs

* Update indexer.md

* Update common.md

* Update two_way_pipe_message_ipc.cpp

* Update PowerToys.exe.manifest

* Update HotkeySettings.cs

* push

* Update src/tests/win-app-driver/README.md

* Update doc/devdocs/akaLinks.md

* Update doc/devdocs/modules/launcher/plugins/registry.md
This commit is contained in:
Aaron Junker
2022-09-28 18:18:55 +02:00
committed by GitHub
parent 7c0bf9f1f4
commit 4e202e4523
67 changed files with 119 additions and 119 deletions

View File

@@ -196,7 +196,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Markdown
};
// WebView2.NavigateToString() limitation
// See https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// See https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// While testing the limit, it turned out it is ~1.5MB, so to be on a safe side we go for 1.5m bytes
if (markdownHTML.Length > 1_500_000)
{

View File

@@ -85,7 +85,7 @@ FileExplorerPreviewSettings(
### MSI (Recommended)
To add a new Previewer update the `Product.wxs` file in `PowerToysSetup` similar to existing Previewer to register the Preview Handler. More details about registration of Preview Handlers can be [found here.](https://docs.microsoft.com/en-us/windows/win32/shell/how-to-register-a-preview-handler)
To add a new Previewer update the `Product.wxs` file in `PowerToysSetup` similar to existing Previewer to register the Preview Handler. More details about registration of Preview Handlers can be [found here.](https://learn.microsoft.com/windows/win32/shell/how-to-register-a-preview-handler)
```xml
<Component Id="Module_PowerPreview" Guid="FF1700D5-1B07-4E07-9A62-4D206645EEA9" Win64="yes">
@@ -127,7 +127,7 @@ To add a new Previewer update the `Product.wxs` file in `PowerToysSetup` similar
**[Important] This method of registering Preview Handler DLL's is not recommended. It could lead to registry corruption.**
#### Registering Preview Handler
1. Restart Visual studio as administrator.
2. Sign `XYZPreviewHandler` and it's dependencies. To sign an assembly in VS, follow steps given [here](https://docs.microsoft.com/en-us/dotnet/standard/assembly/sign-strong-name#create-and-sign-an-assembly-with-a-strong-name-by-using-visual-studio).
2. Sign `XYZPreviewHandler` and it's dependencies. To sign an assembly in VS, follow steps given [here](https://learn.microsoft.com/dotnet/standard/assembly/sign-strong-name#create-and-sign-an-assembly-with-a-strong-name-by-using-visual-studio).
3. Build `XYZPreviewHandler` project.
4. Open developer command prompt from `Tools > Command Line > Developer Command Prompt`.
5. Run following command for each nuget and project dependency to add them to Global Assembly Cache(GAC).

View File

@@ -215,7 +215,7 @@ namespace Microsoft.PowerToys.PreviewHandler.Svg
_browser.CoreWebView2.WebResourceRequested += CoreWebView2_BlockExternalResources;
// WebView2.NavigateToString() limitation
// See https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// See https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// While testing the limit, it turned out it is ~1.5MB, so to be on a safe side we go for 1.5m bytes
if (svgData.Length > 1_500_000)
{

View File

@@ -164,7 +164,7 @@ namespace Microsoft.PowerToys.ThumbnailHandler.Svg
};
// WebView2.NavigateToString() limitation
// See https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// See https://learn.microsoft.com/dotnet/api/microsoft.web.webview2.core.corewebview2.navigatetostring?view=webview2-dotnet-1.0.864.35#remarks
// While testing the limit, it turned out it is ~1.5MB, so to be on a safe side we go for 1.5m bytes
if (wrappedContent.Length > 1_500_000)
{

View File

@@ -9,7 +9,7 @@ namespace PreviewHandlerCommonUnitTests
{
public static class NativeMethods
{
// Gets the ancestor window: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getancestor
// Gets the ancestor window: https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getancestor
[DllImport("user32.dll")]
internal static extern IntPtr GetAncestor(IntPtr hWnd, uint gaFlags);
}

View File

@@ -71,7 +71,7 @@ namespace Common.Utilities
CheckDisposed();
System.Runtime.InteropServices.ComTypes.STATSTG stat;
// Stat called with STATFLAG_NONAME. The pwcsName is not required more details https://docs.microsoft.com/en-us/windows/win32/api/wtypes/ne-wtypes-statflag
// Stat called with STATFLAG_NONAME. The pwcsName is not required more details https://learn.microsoft.com/windows/win32/api/wtypes/ne-wtypes-statflag
_stream.Stat(out stat, 1); // STATFLAG_NONAME
return stat.cbSize;
@@ -153,7 +153,7 @@ namespace Common.Utilities
CheckDisposed();
int dwOrigin;
// Maps the SeekOrigin with dworigin more details: https://docs.microsoft.com/en-us/windows/win32/api/objidl/ne-objidl-stream_seek
// Maps the SeekOrigin with dworigin more details: https://learn.microsoft.com/windows/win32/api/objidl/ne-objidl-stream_seek
switch (origin)
{
case SeekOrigin.Begin:

View File

@@ -20,7 +20,7 @@ namespace Common.ComInterlop
/// Initializes a handler with a stream.
/// </summary>
/// <param name="pstream">A pointer to an <see cref="IStream" /> interface that represents the stream source.</param>
/// <param name="grfMode">One of the <see href="https://docs.microsoft.com/en-us/windows/win32/stg/stgm-constants" >STGM</see> values that indicates the access mode for <paramref name="pstream"/>.</param>
/// <param name="grfMode">One of the <see href="https://learn.microsoft.com/windows/win32/stg/stgm-constants" >STGM</see> values that indicates the access mode for <paramref name="pstream"/>.</param>
void Initialize(IStream pstream, uint grfMode);
}
}

View File

@@ -18,7 +18,7 @@ namespace Common.ComInterlop
/// <summary>
/// Gets a list of the keyboard shortcuts for the preview host.
/// </summary>
/// <param name="pinfo">A pointer to a <see href="https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ns-shobjidl_core-previewhandlerframeinfo">PREVIEWHANDLERFRAMEINFO</see> structure
/// <param name="pinfo">A pointer to a <see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/ns-shobjidl_core-previewhandlerframeinfo">PREVIEWHANDLERFRAMEINFO</see> structure
/// that receives accelerator table information.</param>
void GetWindowContext(IntPtr pinfo);

View File

@@ -32,7 +32,7 @@ namespace Common
{
// Gets the handle of the control to create the control on the VI thread. Invoking the Control.Handle get accessor forces the creation of the underlying window for the control.
// This is important, because the thread that instantiates the preview handler component and calls its constructor is a single-threaded apartment (STA) thread, but the thread that calls into the interface members later on is a multithreaded apartment (MTA) thread. Windows Forms controls are meant to run on STA threads.
// More details: https://docs.microsoft.com/en-us/archive/msdn-magazine/2007/january/windows-vista-and-office-writing-your-own-preview-handlers.
// More details: https://learn.microsoft.com/archive/msdn-magazine/2007/january/windows-vista-and-office-writing-your-own-preview-handlers.
var forceCreation = this.Handle;
this.FormBorderStyle = FormBorderStyle.None;

View File

@@ -14,7 +14,7 @@ namespace Common
{
/// <summary>
/// Directs the preview handler to return the HWND from calling the GetFocus function.
/// Source: https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ipreviewhandler-queryfocus.
/// Source: https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ipreviewhandler-queryfocus.
/// </summary>
/// <param name="result">Returns the handle of the window with focus.</param>
void QueryFocus(out IntPtr result);
@@ -26,7 +26,7 @@ namespace Common
/// <summary>
/// Sets the font according to the font set in Windows Settings.
/// More details: https://docs.microsoft.com/en-us/windows/win32/shell/building-preview-handlers#ipreviewhandlervisualssetfont.
/// More details: https://learn.microsoft.com/windows/win32/shell/building-preview-handlers#ipreviewhandlervisualssetfont.
/// </summary>
/// <param name="font">Instance of Font.</param>
void SetFont(Font font);

View File

@@ -99,7 +99,7 @@ namespace Common
public uint TranslateAccelerator(ref MSG pmsg)
{
// Current implementation simply directs all Keystrokes to IPreviewHandlerFrame. This is the recommended approach to handle keystokes for all low-integrity preview handlers.
// Source: https://docs.microsoft.com/en-us/windows/win32/shell/building-preview-handlers#ipreviewhandlertranslateaccelerator
// Source: https://learn.microsoft.com/windows/win32/shell/building-preview-handlers#ipreviewhandlertranslateaccelerator
if (this.frame != null)
{
return this.frame.TranslateAccelerator(ref pmsg);
@@ -118,14 +118,14 @@ namespace Common
/// <inheritdoc />
public void ContextSensitiveHelp(bool fEnterMode)
{
// Should always return NotImplementedException. Source: https://docs.microsoft.com/en-us/windows/win32/shell/building-preview-handlers#iolewindowcontextsensitivehelp
// Should always return NotImplementedException. Source: https://learn.microsoft.com/windows/win32/shell/building-preview-handlers#iolewindowcontextsensitivehelp
throw new NotImplementedException();
}
/// <inheritdoc />
public void SetSite(object pUnkSite)
{
// Implementation logic details: https://docs.microsoft.com/en-us/windows/win32/shell/building-preview-handlers#iobjectwithsitesetsite
// Implementation logic details: https://learn.microsoft.com/windows/win32/shell/building-preview-handlers#iobjectwithsitesetsite
this.unkSite = pUnkSite;
this.frame = this.unkSite as IPreviewHandlerFrame;
}

View File

@@ -7,7 +7,7 @@ const CLSID CLSID_SHIMActivateSvgPreviewHandler = { 0x74619BDA, 0xA66B, 0x451D,
// ddee2b8a-6807-48a6-bb20-2338174ff779
// CLSID of the .Net Com Class for Preview Handler. Should be included in the registry.dat file under \Classes\CLSID\{guid}.
// More details here: https://docs.microsoft.com/en-us/dotnet/framework/interop/registering-assemblies-with-com
// More details here: https://learn.microsoft.com/dotnet/framework/interop/registering-assemblies-with-com
const CLSID CLSID_SvgPreviewHandler = { 0xddee2b8a, 0x6807, 0x48a6, { 0xbb, 0x20, 0x23, 0x38, 0x17, 0x4f, 0xf7, 0x79 } };
// E0907A95-6F9A-4D1B-A97A-7D9D2648881E
@@ -50,4 +50,4 @@ const std::vector<std::pair<CLSID, CLSID>> NativeToManagedClsid({
{ CLSID_SHIMActivateGcodePreviewHandler, CLSID_GcodePreviewHandler },
{ CLSID_SHIMActivateSvgPreviewHandler, CLSID_SvgPreviewHandler },
{ CLSID_SHIMActivateSvgThumbnailProvider, CLSID_SvgThumbnailProvider }
});
});