05-16-2006 04:57 PM
05-16-2006 06:15 PM
I'm afraid this won't really be possible without a wrapper DLL. A CString is more like an object with internal pointers and last time I checked into a DLL with a disassembler it seemed that the actual layout of the internal structure depends on the size of the string that is contained, with small strings being entirely embedded and larger strings being a pointer to the string. Trying to figure out these difficulties is something you should leave to compiler developers and not try to do yourself.
@Nils Gokemeijer wrote:So,we bought an optiphase interferometer, and it comes with a dll and with LabVIEW example code.However, there is a big problem!The dll is a C++ dll and requires the C++ Cstring class!for example I can't get the function Boolean LoadDemodulatorDSPCore(Cstring arg1, U8Bit arg2) to work.They did provide a GetDllVersionchar(Cstr arg1, long arg2) which does work, (offcourse, it uses a standard C string pointer)but GetDllVersion(Cstring arg1) does not work. (offcourse not, it using the Cstring class)Is there a way to get CString classes to work in LabVIEW? (with a struct, or an binary array or whatever?)Or do I have to write a wrapper dll to convert CString classes to standard C string pointers?Thanks.
08-06-2007 05:27 AM
08-06-2007 09:52 AM
Sorry,
No solution yet, we are still using their standard interface application and A/D to read the signal.
-Nils
08-20-2007 04:10 AM
06-02-2008 01:19 PM
Dear Nils and Robert,
I have the same trouble with the DLL and their system and am trying to write a DLL.
You both seemed to try already and I would like to hear anything helpful.
Have you gotten any progress?
Thanks,
Chang
06-02-2008 01:55 PM
06-03-2008 01:57 PM
06-03-2008 03:32 PM - edited 06-03-2008 03:35 PM
Something along these lines should work:
@robert_p1 wrote:
Very sorry, but there's abolutely no progress on my side.
Regards,
Robert