LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strange DLL error

Hi,
so here is my situation... I am making a program in Labview that processes images from several infrared cameras.  I have everything worked out with one camera (which fortunately came with VI's that control it).  The other camera, however, I cannot get to work. 
 
It is a firewire camera loosely (I have discovered) based on DCAM specs... I tried to incorporate it through MAX/IMAQ, but it uses advanced CSRs, which IMAQ doesn't support.  So we bought the camera software SDK for a pretty penny... only to find that Labview can't call C++ dll's... well no worries I wrote some quick wrapper functions and put them in a DLL.  But now, when the DLL loads (right after you pick a function and click OK) this error message comes up:
 
"Error loading (the path)\SBFSDK_CLink3730rc1.dll.  The system cannot find message text for message number 0x%1 in the message file for %2."
 
I have no idea what this means.  The DLL has no load problems when examined in Dependency Walker, confirmed by the company that made the camera/SDK.  The sample programs that came in the SDK (which have the same dependencies as the C DLL) all work fine.  The makers of the SDK believe it is a problem with Labview.
 
Does anyone even know what this error means?
 
Thank you,
Colin Nichols
0 Kudos
Message 1 of 3
(2,406 Views)
Hi Colin,
 
Thank you for contacting National Instruments.  From the information you have provided it looks like this one specific DLL is the source of the problem.  The error that you have included in very vague and it looks like it unsuccessfully tried to populate the error message with more information.  Are you getting this error every single time?  Is there an error code that is included with this message?
 
However, you should be able to call the C++ DLL from LabVIEW.  A couple of resources that I have found from within our KnowledgeBase documents that are available at ni.com/kb are located here and here.  These should help outline the process of creating the DLL and calling it from LabVIEW.
 
I hope this helps!
 
Jason W.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(2,368 Views)
I would guess the problem is in your wrapper. The Call Library function node is used very heavily in LabVIEW, so I highly doubt there are any major bugs that would affect a simple wrapper dll. 

Are your wrapper functions exported right. I think they need to wrapped by
extern "c" { }
but it has been a while wince I wrote one. (Some project settings may be important as well)

Does you're wrapper dll work if you use it from a c executable? (basically I'm curious if your wrapper has a bug in it).

Is your wrapper compiled by the same compiler as the C++ dlls? (C++ dll's can be incompatible between different versions of the same compiler, which is why most apis are written in a C compatible method, hopefully this isn't as a big a problem as when I last looked into it years ago)

Are you using the right calling convention in the call library function node for the dll (you could try both, I'm not sure if those would error before you tried to call it if it was set wrong).



If there's a .Net or ActiveX interface you might be able to use that instead.

I'm not sure what you mean by "advanced CSRs", could what every they are, be controled through the low level vi's (you can write to memory and registers in there, You would need some really good documentations to use them that way though)

0 Kudos
Message 3 of 3
(2,362 Views)