Welcome, Guest
Username Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Using SMIEngine with C#

Using SMIEngine with C# 5 years, 11 months ago #90

I am trying to build an application using C# to communicate and control my SM2315D (ver: 440C) motors.

I have successfully referenced the IntegMotorInterface.dll, but when I try to instantiate the SMIHost object, I get:

"Additional information: Retrieving the COM class factory for component with CLSID {BC26FBBA-00E1-11D4-B5D0-00600831E1F3} failed due to the following error: 80040154."

I think its telling me that something isn't registered, but I can run the SmartMotor Interface without any problems

What am I doing wrong?

Thanks in advance

Re:Using SMIEngine with C# 5 years, 11 months ago #94

  • hsummer
  • Posts: 12
  • Karma: 1
You have a windows system registry error, It has nothing to do with the dll itself. Try this link:
It covers your error.
Windows operating system and 32 vice 64 bit makes a difference as well.
Last Edit: 5 years, 11 months ago by hsummer.

Re:Using SMIEngine with C# 5 years, 11 months ago #95

Thanks for the info.

Just after I posted this message, I found the solution to the problem. I was creating a 64-bit application using a 32-bit dll. And they didn't work together.

As soon as I changed the application to a 32-bit app, the driver loaded properly, and I'm able to communicate with the motors.

Thanks again.

Re:Using SMIEngine with C# 2 years, 4 months ago #1514

  • AndyZ
  • Posts: 4
  • Karma: 0

How did you link to the .dll? I see there's a "IntegMotorInterface.dll" in C:\Windows\SysWOW64\, but I don't see IntegMotorInterface.lib.


Re:Using SMIEngine with C# 2 years, 4 months ago #1515

  • csearcy
  • Posts: 480
  • Karma: 23
Have you installed the SMI software? It has examples and installs the dll.
The software is available at...
The latest version of the programming software is SMI_2_4_3_7.msi

Re:Using SMIEngine with C# 2 years, 3 months ago #1528

  • AndyZ
  • Posts: 4
  • Karma: 0
Yeah, I did install the SMI software. I'm making slow progress. It would be nice if the examples were simple and well-commented, as opposed to a GUI MFC application with hardly any comments. Baby steps first, you know?

So the VCClient2100 example runs perfectly. Most recently I'm having trouble creating an SMIHost instance. This code compiles but I get the "Cannot create an instance of \"SMIHost\" class!" error upon running... Am I missing an include or ??? This is a Windows console application with Visual Studio 2010 full version.

#include <iostream>
using namespace std;
#import "C:\Program Files (x86)\Animatics\SMIEngine\Samples\IntegMotorInterface.tlb"
using namespace INTEGMOTORINTERFACELib; // Must come after IntegMotorInterface.tlb

// Define a smart pointer to the interface ISMIComm
ISMICommPtr CommInterface;
ISMICMotionPtr CMotionInterface;
ISMIPathPtr PathInterface;

int main()

// Create SMIHost object and interfaces
HRESULT hr = CommInterface.CreateInstance(__uuidof(SMIHost));
cout<<"Cannot create an instance of \"SMIHost\" class!"<<endl;
//return FALSE;

return TRUE;
  • Page:
  • 1
  • 2
Moderators: hsummer, csearcy
Time to create page: 0.46 seconds