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 9022143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:25:53+00:00 2026-06-16T05:25:53+00:00

Trying to use some COM-objects in my C# app. 1-st variant: using AXVLC; Type

  • 0

Trying to use some COM-objects in my C# app.

1-st variant:

using AXVLC;

Type t = Type.
           GetTypeFromCLSID(
           Guid.Parse("E23FE9C6-778E-49D4-B537-38FCDE4887D8")
           );

AXVLC.VLCPluginClass vid = Activator.CreateInstance(t) as VLCPluginClass;

But getting such error:
Interop type ‘AXVLC.VLCPluginClass’ cannot be embedded. Use the applicable interface instead. ComObjectCalls

I have understood that the COM object does not expose a public constructor then I shall have to find some other means of using the object. A lot of time COM objects use the factory model to create instances of objects (eg. IClass instance = COMClass.CreateInstance(); )

Or trying using Activator.CreateInstance()

Also I have another question with COM objects:
– I have using dynamic type: dynamic shell = AutomationFactory.CreateObject(“WMPlayer.OCX.7”);

It creates – ok. But how to get known, which metods I can use in it. How can I cast it?

The main problem is: that I want to access COM-object with Silverlight application.
So there is a way to work with dynamic/expondo object or calling with P/Invoke some native libraries in Silverlight like:

[DllImport("user32.dll", CharSet = CharSet.Auto, EntryPoint = "MessageBox")]
public static extern IntPtr MineMessageBox(int hWnd, string text,
string caption, uint type);

...
MineMessageBox(0, "Hello World", "Platform Invoke Sample", 0);

What is the best way to access COM-object features in Silverlight and also may to get all info in Runtime about this COM-object ( get methods, which I can call etc )

Thank you!

  • 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-06-16T05:25:54+00:00Added an answer on June 16, 2026 at 5:25 am

    All COM objects conform to an interface, this is where your methods would come from.

    In the case of the VLC ActiveX control, it’s likely that you would instead of using AXVLC.VLCPluginClass, use AXVLC.VLCPlugin. This is akin to Office’s interop of using Application instead of ApplicationClass.

    In your second instance when using dynamic, a hacky way to get your IntelliSense working is to simply cast the return from CreateObject to the interface. You’ll need to remember to remove it before you build, though, otherwise the cast will fail at runtime.

    The alternative (and better way) would be to simply work off of the documentation for that COM object.

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

Sidebar

Related Questions

I've trying to use the API for CapsuleCRM... http://capsulecrm.com/help/page/api_gettingstarted I've been reading some articles
I am trying to use some external Framework in my iPhone app. I did
I'm trying to import Parse.com's framework into an existing project, but for some reason
I am trying to use ember-data using https://github.com/emberjs/data as a reference. Specifically, I am
I am trying to use some parameters in my sql query like this; Answer_table
I am trying to use some Word 2007 automation where we give the user
I am trying to use some rails code withing a javascript and need to
I am trying to use some action when I click button in navigation controller.
I'm trying to use some of the functions that are in the /lib/libproc-3.2.6.so library
I am trying to use some sample code and my compiler won't compile this

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.