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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:54:37+00:00 2026-05-27T11:54:37+00:00

I am having some trouble with assemblies and DLL’s. instrument_ is declared as an

  • 0

I am having some trouble with assemblies and DLL’s.

instrument_ is declared as an object and I’m creating an instance of “PP150” from the dll whose path is specified by path_.

string className = ContineoProperties.getSingleton().getClassName(path_);
assembly_ = Assembly.LoadFrom(path_);
Type classType = assembly_.GetType("Instrument." + className);
instrument_ = Activator.CreateInstance(classType);

Later I to call the method isntrument_.instrumentCommand(cmd.getCommandName())

The error I get is with when i call the method.

‘object’ does not contain a definition for ‘instrumentCommand’

The isntrument_ is created fine. its just the method call that’s giving me a problem. The method does exist in the “PP150.dll”. Do I need some DLLImport to allow it to recognize it as a function?

Thanks,
P

  • 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-27T11:54:38+00:00Added an answer on May 27, 2026 at 11:54 am

    If object type is not known in compile time,

    To call a method defined on an object, you must use Reflection.

    MethodInfo mInfo = classType.GetMethod("instrumentCommand");
    
    mInfo.Invoke(instrument_, new Object[] { _parameters});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am having some trouble hooking up instance variables in the visual object editor using
Having some trouble sending properly formatted HTML e-mail from a PHP script. I am
After having some trouble with object deletion, I ran a simple test: Created a
Having some trouble with some SQL. Take the following result for instance: LOC_CODE CHANNEL
Having some trouble getting this query to work correctly. mysql_query(DELETE FROM `table` WHERE `id`
Having some trouble passing values from one class to another. I basically have a
Having some trouble with NSUserDefaults here. Here's how I'm creating it: NSString *theCity =
Having some trouble getting a JSON feed to load from my site. I'm starting
Having some trouble with the VideoPlayer Class in XNA (see: XNA VideoPlayer object causes
Having some trouble here with this. The setup: A select object with a choice

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.