dotnet / dotnet/docs-desktop

Error in code example

Open
#1,193 3 comments 0 reactions 1 assignee Claimed by @adegeo View on GitHub
doc-bug dotnet-framework/svc okr-health okr-quality Pri2 wpf/subsvc
Dominant language
C#
Stars
237
Forks
191
Avg merge
4d 16h
Merged PRs (30d)
3

Description

### Type of issue

Other (describe below)

### Description

The code example on step 9 of the **To host the ActiveX control** section has an error.

The line:
`WmpAxLib.AxWindowsMediaPlayer axWmp = new WmpAxLib.AxWindowsMediaPlayer();`
Should be:
`AxWMPLib.AxWindowsMediaPlayer axWmp = new AxWMPLib.AxWindowsMediaPlayer();`

At least I had to make that change or the above type would not resolve.

### Page URL

https://learn.microsoft.com/en-us/dotnet/desktop/wpf/advanced/walkthrough-hosting-an-activex-control-in-wpf

### Content source URL

https://github.com/dotnet/docs-desktop/blob/main/dotnet-desktop-guide/wpf/advanced/walkthrough-hosting-an-activex-control-in-wpf.md

### Document Version Independent Id

80d1e579-7811-cc70-90a6-04d1954ed61b

### Article author

adegeo

### Metadata

* ID: 80d1e579-7811-cc70-90a6-04d1954ed61b
* Service: **dotnet-framework**
* Sub-service: **wpf**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.