Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Problem referencing "BMP Direct" DLLs


mwassmer Jul 6, 2012 09:14 PM

When I try to add references to simplepb.dll and coralib3d.dll to a Visual Studio 2010 Windows Forms project, I get the following error:

"A reference to...[file path]...could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

I am considering purchasing the LoggerNet SDK, but I would like to try out BMP Direct before making the investment in the full SDK. I am a novice C# programmer, so I don't understand what could be causing this error. I suspect it has something to do with the fact that these DLLs contain unmanaged code which are not compatible with a modern .NET application, but I could be way off.


GTProdMgr Jul 6, 2012 09:46 PM

Neither of those DLLs are .NET native code assemblies or even ActiveX/COM. So you are correct -- they are "unsafe" in the C# world and require a specialized approach. To access them you have to do "classic" DLL references in C# (which is usually not done) as well as manage the unsafe code.

I've placed a preliminary C# code example for the BMP5Direct SDK here:

ftp://csicust:cr1000@ftp-ae.campbellsci.com/BMP5SDK.zip

It isn't a complete example, but shows you how to do the declarations and deal with "unsafe" code.


mwassmer Jul 6, 2012 10:34 PM

Awesome, thanks! That's extremely helpful.

I have a couple other questions:
1) Do the LoggerNet SDKs include .NET native code assemblies?
2) Did the LNDB developers use the LoggerNet SDKs to pull the data from the cache?

The reason for my second question is that I'd like to pull the data from the cache and load it directly into a relational OLAP database without having to deal with all of LNDB's OLTP tables in between. I'd also like to try to use Microsoft StreamInsight to create some real-time displays.


kwestwood Jul 6, 2012 11:13 PM

1) The LoggerNet SDK includes Active X controls that can be referenced in a .net project. They are not .NET native code assemblies.

2) We did use the LoggerNet SDK to access the data from the LoggerNet cache.


GTProdMgr Jul 6, 2012 11:16 PM

Q1: Do the LoggerNet SDKs include .NET native code assemblies?

A1: No, the DLLs in the LoggerNet SDKs are ActiveX/COM. However C#.NET and VB.NET code examples are included with the SDKs which leverage the ActiveX Interop services of Visual Studio and seamlessly integrate the libraries without much problem at all.

Q2: Does LNDB use the LoggerNet SDK to pull data from the LoggerNet cache ?

A2: Yes, part of the SDK, the CSIDataSource control.

Q3: Could I use the LoggerNet SDKs to pull data from the LN cache and load it directly into my own relational OLAP database ?

A3: Yes, as long as you know how to take the variable values you obtain from the LN/cache within your programming environment and put them into your own database. The SDK gives you a populated variable value (in-memory) in your programming language of choice (C#, VB, Delphi, C++). You have to do the rest of the work. (We can't support you in the part where you are trying to write values into your own database format, or out to files, etc.).

This capability was the main reason most customers purchased the SDKs in the days before LNDB.


mwassmer Jul 9, 2012 04:19 PM

I appreciate the responses. Thank you very much!


mkaker Aug 10, 2012 07:18 AM

Could you please update the reference example in VB.Net. I have problems in VBIDE to reference the dll's.

Thanks

Log in or register to post/reply in the forum.