using C# and Roborealm
msg256 from United States  [1 posts]
3 years
Hello all,

I am trying to put together a c# program that only needs to receive a bitmap from a scanner, run a shape matching algorithm and output x, y, and orientation of all the found objects. I tried running the c# sample download but am getting a run time error at form opening that prevents me from running, Text from the error below.

An unhandled exception of type 'System.BadImageFormatException' occurred in SampleApp.exe

Additional information: Could not load file or assembly 'Interop.RR_COM_APILib, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

What would could be causing the error? Moreover what would be the best way to implement the shape detection in C# or even VB.NET via visual studio?  

Steven Gentner from United States  [1408 posts] 3 years
This is most likely caused by a mismatch between x32 and x64 versions. You should check what you are compiling to and also use either

regsvr32 C:\Program Files (x86)\RoboRealm\RR_COM_API.dll


regsvr32 C:\Program Files (x86)\RoboRealm\RR_COM_API_64.dll

based on what you end up using. I'd recommend using the x32 if you can.

Its also possible that the COM object isn't finding the RoboRealm.dll. You may want to ensure that you have the most recent version of RR downloaded to avoid any mismatches between those objects.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index