@@ -23,7 +23,7 @@ Common scenarios:
2323
2424Usage steps:
25251 . Create ` CoreWebView2EnvironmentOptions ` .
26- 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ` and ` COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP ` .
26+ 2 . Call ` SetAllowedPortRange ` for ` COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ` and ` COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP ` .
27273 . Pass the options when creating the WebView2 environment.
2828
2929# Examples
@@ -37,12 +37,12 @@ if (options.As(&optionsStaging10) == S_OK)
3737 const INT32 udpMin = 50000, udpMax = 55000;
3838
3939 CHECK_FAILURE (optionsStaging10->SetAllowedPortRange(
40- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ,
40+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ,
4141 COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, udpMin, udpMax));
4242
4343 // Get the configured port range
4444 CHECK_FAILURE (optionsStaging10->GetEffectiveAllowedPortRange(
45- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ,
45+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ,
4646 COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP, &m_udpPortRange.minPort,
4747 &m_udpPortRange.maxPort));
4848}
@@ -65,12 +65,12 @@ if (optionsStaging10 != null)
6565 const int udpMin = 50000 , udpMax = 55000 ;
6666
6767 optionsStaging10 .SetAllowedPortRange (
68- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ,
68+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ,
6969 COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , udpMin , udpMax );
7070
7171 // Get the configured port range
7272 optionsStaging10 .GetEffectiveAllowedPortRange (
73- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ,
73+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ,
7474 COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND_UDP , out m_udpPortRange .minPort ,
7575 out m_udpPortRange .maxPort );
7676}
@@ -116,12 +116,12 @@ API Rules and Precedence
116116```
117117/// Specifies the scope for port configuration.
118118[v1_enum]
119- typedef enum COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE {
119+ typedef enum COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE {
120120 /// Scope applies to all components.
121- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_DEFAULT ,
121+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_DEFAULT ,
122122 /// Applies only to WebRTC peer-to-peer connection.
123- COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE_WEB_RTC ,
124- } COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE ;
123+ COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE_WEB_RTC ,
124+ } COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE ;
125125
126126/// Specifies the network protocol for port configuration.
127127[v1_enum]
@@ -169,7 +169,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
169169 /// `maxPort` The maximum allowed port number (inclusive).
170170 ///
171171 HRESULT SetAllowedPortRange(
172- [in] COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE scope,
172+ [in] COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE scope,
173173 [in] COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND protocol,
174174 [in] INT32 minPort,
175175 [in] INT32 maxPort
@@ -198,7 +198,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
198198 /// `maxPort` Receives the maximum allowed port number (inclusive).
199199 ///
200200 HRESULT GetEffectiveAllowedPortRange (
201- [in] COREWEBVIEW2_PORT_RANGE_RESTRICTION_SCOPE scope,
201+ [in] COREWEBVIEW2_ALLOWED_PORT_RANGE_SCOPE scope,
202202 [in] COREWEBVIEW2_TRANSPORT_PROTOCOL_KIND protocol,
203203 [out] INT32* minPort,
204204 [out] INT32* maxPort
@@ -212,7 +212,7 @@ interface ICoreWebView2StagingEnvironmentOptions10 : IUnknown {
212212``` csharp
213213namespace Microsoft .Web .WebView2 .Core
214214{
215- enum CoreWebview2PortRangeRestrictionScope
215+ enum CoreWebview2AllowedPortRangeScope
216216 {
217217 Default = 0 ,
218218 WebRtc = 1 ,
@@ -228,8 +228,8 @@ namespace Microsoft.Web.WebView2.Core
228228 [interface_name (" Microsoft.Web.WebView2.Core.ICoreWebView2StagingEnvironmentOptions10" )]
229229 {
230230 // ICoreWebView2StagingEnvironmentOptions10 members
231- void SetAllowedPortRange(CoreWebview2PortRangeRestrictionScope scope, CoreWebView2TransportProtocolKind protocol, Int32 minPort, Int32 maxPort);
232- void GetEffectiveAllowedPortRange(CoreWebview2PortRangeRestrictionScope scope, CoreWebView2TransportProtocolKind protocol, out Int32 minPort, out Int32 maxPort);
231+ void SetAllowedPortRange(CoreWebview2AllowedPortRangeScope scope, CoreWebView2TransportProtocolKind protocol, Int32 minPort, Int32 maxPort);
232+ void GetEffectiveAllowedPortRange(CoreWebview2AllowedPortRangeScope scope, CoreWebView2TransportProtocolKind protocol, out Int32 minPort, out Int32 maxPort);
233233 }
234234 }
235235}
0 commit comments