Hay guys, I seem to have hit a bit of a brick wall and could do with some help...
The problem is this: I am currently writing a DLL in VC++, the purpose of which is to get data from a number of C++ classes (which I may add I'm not allowed to alter) and send the resulting data to LabVIEW. The same classes also deal with data flow the other way, but we wont worry about that because I have them working fine from labview. I have all of the numeric data comming into labview sucsessfully in the form of a cluster (aka a struct on the C++ side of things), however I can't for the life of me figure out how to get the three CStrings into labview.
Now, you will have to forgive me, as I'm still a novice programmer (only been coding a couple of years now) and this is the first time I've tried to get C++ and G to talk to oneanother. On my searches, I've found a few things that look like they should be usefull, but dont seem to have worked in this case. It appears that there are several ways of doing this, but I can't seem to find a complete example to work from (ie i can find examples for the C side, and examples for the G side, but not both together) The best I could find is this:
http://forums.ni.com/ni/board/message?board.id=170&message.id=30585&query.id=95730#M30585But the example links are dead-and-burried, and I must confess the explanation is a bit above my head. Most the other examples I've found are aimed at sending a string FROM labview TO a DLL, which is the opposite of what I'm trying to do.
So what I'm asking for is a link to a good example of what I need to do both on the C side and the G side of things to get LabVIEW to take a CString from a DLL. I'm not able to alter the CString at its root, however there is nothing stopping me performing some kind of conversion once it enters the DLL wrapper. I say this because on my travels I've picked up the fact that C and G treat arrays differently (and CString being effectively an array of chars, I'm guessing that applies somewhere along the line here). If I understand correctly, C sticks a \0 null terminator at the end of the array, whereas G defines the array length as the 1st elliment...
Anyway, some help, advice and links would be greatly appreciated. Cheers guys.
~Andy~