@@ -23,7 +23,7 @@ Common scenarios:
2323
2424Usage steps:
25251 . Create ` CoreWebView2EnvironmentOptions ` .
26- 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP ` .
26+ 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP ` .
27273 . Pass the options when creating the WebView2 environment.
2828
2929
@@ -38,11 +38,11 @@ if (options.As(&optionsStaging10) == S_OK)
3838 const INT32 udpMin = 50000, udpMax = 55000;
3939
4040 CHECK_FAILURE (optionsStaging10->SetAllowedPortRange(
41- COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , udpMin, udpMax));
41+ COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , udpMin, udpMax));
4242
4343 // Get the configured port range
4444 CHECK_FAILURE (optionsStaging10->GetAllowedPortRange(
45- COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , &m_udpPortRange.minPort,
45+ COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , &m_udpPortRange.minPort,
4646 &m_udpPortRange.maxPort));
4747}
4848
@@ -64,11 +64,11 @@ if (optionsStaging10 != null)
6464 const int udpMin = 50000 , udpMax = 55000 ;
6565
6666 optionsStaging10 .SetAllowedPortRange (
67- COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , udpMin , udpMax );
67+ COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , udpMin , udpMax );
6868
6969 // Get the configured port range
7070 optionsStaging10 .GetAllowedPortRange (
71- COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP , out m_udpPortRange .minPort ,
71+ COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , out m_udpPortRange .minPort ,
7272 out m_udpPortRange .maxPort );
7373}
7474
@@ -80,12 +80,12 @@ OnCreateEnvironmentCompleted(environment);
8080# API Details
8181### C++
8282```
83- /// Specifies the network protocol type for port configuration.
83+ /// Specifies the network protocol for port configuration.
8484[v1_enum]
85- typedef enum COREWEBVIEW2_TRANSPORT_PROTOCOL {
85+ typedef enum COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND {
8686 /// User Datagram Protocol - fast, connectionless protocol.
87- COREWEBVIEW2_TRANSPORT_PROTOCOL_UDP ,
88- } COREWEBVIEW2_TRANSPORT_PROTOCOL ;
87+ COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP ,
88+ } COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND ;
8989
9090/// Additional options used to create WebView2 Environment to manage port range configuration.
9191[uuid(eaf22436-27a1-5e3d-a4e3-84d7e7a69a1a), object, pointer_default(unique)]
@@ -110,7 +110,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
110110 /// `maxPort` The maximum allowed port number (inclusive).
111111 ///
112112 HRESULT SetAllowedPortRange(
113- [in] COREWEBVIEW2_TRANSPORT_PROTOCOL protocol,
113+ [in] COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND protocol,
114114 [in] INT32 minPort,
115115 [in] INT32 maxPort
116116 );
@@ -127,7 +127,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
127127 /// `maxPort` Receives the maximum allowed port number (inclusive).
128128 ///
129129 HRESULT GetAllowedPortRange(
130- [in] COREWEBVIEW2_TRANSPORT_PROTOCOL protocol,
130+ [in] COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND protocol,
131131 [out] INT32* minPort,
132132 [out] INT32* maxPort
133133 );
@@ -140,7 +140,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
140140``` csharp
141141namespace Microsoft .Web .WebView2 .Core
142142{
143- enum CoreWebView2TransportProtocol
143+ enum CoreWebView2TransportProtocolKind
144144 {
145145 Udp = 0 ,
146146 };
@@ -150,8 +150,8 @@ namespace Microsoft.Web.WebView2.Core
150150 [interface_name (" Microsoft.Web.WebView2.Core.ICoreWebView2StagingEnvironmentOptions10" )]
151151 {
152152 // ICoreWebView2StagingEnvironmentOptions10 members
153- void SetAllowedPortRange(CoreWebView2TransportProtocol protocol, Int32 minPort, Int32 maxPort);
154- void GetAllowedPortRange(CoreWebView2TransportProtocol protocol, out Int32 minPort, out Int32 maxPort);
153+ void SetAllowedPortRange(CoreWebView2TransportProtocolKind protocol, Int32 minPort, Int32 maxPort);
154+ void GetAllowedPortRange(CoreWebView2TransportProtocolKind protocol, out Int32 minPort, out Int32 maxPort);
155155 }
156156 }
157157}
0 commit comments