Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6079025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:54:00+00:00 2026-05-23T10:54:00+00:00

So I was looking to play some audio in C# and I found this

  • 0

So I was looking to play some audio in C# and I found this:
which basically says to reference quartz.dll and use the FilgraphManagerClass.

This is perfect for my application since I would like to be able to start playing the song at specific points within the song. One can do this by setting FilgraphManagerClass.CurrentPosition. Also, I wanted the song to play in the background without any special player popping up, which happens when using this dll.

Unfortunately for me, when I try to do as the example suggests, Visual Studio 2010 Express complains and tells me “Interop type FilgraphManagerClass cannot be embedded.” I am allowed to use the FilgraphManager interface, but that is missing the CurrentPosition property and any seeking ability.

This article suggests just finding the appropriate interface. But there doesn’t appear to be one that really matches the FilgraphManagerClass. It also briefly talks about the safety involved in embedding assemblies

To use the class, I ended up right clicking on the QuartzTypeLib reference and changing the setting Embed Interop Types to false. Now everything works as it’s supposed to.

Ok… finally my questions:

  • Is it safe to change the Embed Interop Types setting like I did for the QuartzTypeLib?
  • Is that true in general of all COM types?
  • What is this embedding and metadata stuff and why would it be safe or not?
  • Are there dlls that one CAN trust?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:54:00+00:00Added an answer on May 23, 2026 at 10:54 am

    You need to ignore the safety argument, it is just nonsense. The issue is that the Embed Interop Type feature requires types to have a one-to-one match with the interface in the COM server. They must have a [Guid] attribute that matches. That attribute allows them to declare that types loaded from different assemblies are compatible, even though they came from different assemblies. The match on the Guid is the key.

    Which is a problem with the classes whose name end in “Class”. They are ‘fake’ classes, synthesized from the real COM coclasses. It solves a problem with .NET not supporting multiple inheritance. Since they are auto-generated, their [Guid] doesn’t match a CLSID in the COM type library and the type cannot be embedded because their is no way to verify type equivalence.

    You can very often avoid the multiple inheritance problem and just create an instance of the coclass without the “Class” postfix. Certainly in this case:

            var player = new QuartzTypeLib.FilgraphManager();
            player.RenderFile(@"c:\temp\test.avi");
    

    Compiles and runs, doesn’t play. But that’s a different problem, you should use Windows Media Player instead. Add a reference from the COM tab.

    Disabling EIT is not really an issue, you just get an interop.dll file in your build directory that you need to deploy on the user machine. EIT was really designed to solve a problem with PIAs (Primary Interop Assemblies), a problem that you don’t have here since you are not exposing the native COM interfaces to any other assemblies.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am only looking to play some flash content on my page. found this code
I'm looking for some way in Android to play in-memory audio in a manner
I'm looking for some free silverlight styles to play with. I'd ideally like a
I'm looking for some guidance on how I can recreate this feature. As you
My application uses a remote service to play audio. I do this so that
This is not for some sort of botting program. I am not looking for
Hello, I've been looking for a way to play and record audio on a
I'm looking since some time already for information on this topic, but I'm not
Just looking for some clarification with the new play button. I notice that when
I'm looking for a way to preserve the session when using Play 2.0's fakeRequest

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.