Hi,
I am using an IR camera and a special analyze software with the camera.
I want to stream data from the analyze software to a C#-project (Visual studio 2010) using OLE. OLE is the only way to stream from this particular program and until yesterday I had never looked at OLE.
I have managed to stream data to Excel by typing:
=IRWinres.Session|'C:\Users\Klimator\Documents\FLIR\OLE-test.irs'!\max
into an Excel -cell. Where "OLE-test.irs" is a worksession file which apparelty contains the requested information. The file is not readble text but some binary mess.
Now I want to import the same data to a C# (studio 2010) project.
I have not been able to find a way to call this "OLE-test.irs" file and read the max (or any other) property and I really have no idea how to go about.
Any tips regarding this is mighty appreciated!
Thanks in advance!
Loading
Sam HobbsPosted Sep 16, 2011, 7:49 PM
If adding a reference that way does not work, then try adding a reference from the COM tab but you must know what the object is called. If that does not work, then another thing to try is the OLE-COM Object Viewer, which is a Windows SDK tool that is installed with Visual Studio. There are other tools that could help but the OLE-COM Object Viewer is already installed in your system.
Joe DomerPosted Sep 16, 2011, 5:45 AM
Everything happens on a Windows PC.
On my hard drive I have a file called "OLE-test.irs" which is a associated with a special camera software(running on windows pc). When I am running the camera software, some properties of the camera image is constantly being saved to this file.
In Microsoft Excel I can access the file and it's properties by typing "=IRWinres.Session|'C:\Users\Klimator\Documents\FLIR\OLE-test.irs'!\max" into an Excel-cell. In this particular example the "max" property from the file is displayed in the Excel-cell. So when the camera software is running, the Excel-cell is constantly being updated to display the "max"-property.
By looking at the Excel syntax above I draw the conclusion that "IRWinres.Session" is some sort of "OLE-class". Then it seems that Excel looks to the file specified and then picks out the "max"-property using that particular syntax.
Now I would like to access the same file and "max" property with C#-code in an windows application using OLE. The windows C# application is created in Visual Studio 2010 and I am guessing I should use the classes found in "System.Data.OleDb".
My problem is that I have no idea how to "connect" to the above .irs-file using the classes in the said library.
The reason I mention the Excel-example is that I thought it might offer some clues on how to connect to my .irs-file.
Thanks again.
Sam HobbsPosted Sep 15, 2011, 8:31 PM