I didn't really take a good look at your code, but I have attached a simple example that I made that shows how to pass in a structure as an output argument to a LabView created dll function that will fill it with the value of an error cluster. Make sure to actually look at the source vi for the dll to see that I am passing in a CStr, LVBoolean, and int32 to the function and an error cluster is the output.
Now, I know you may eventually ask the question "how do I pass in an error cluster to a LabView dll" and the answer is quite simply to do it just as I have in this example (pass in each of the parameters for cluster separately and then bundle them once inside of LabView).
The reason you don't really want to create a structure in C that is exactly
the same as the structure for an error cluster that LabView would work with as an output of a vi is that you would have to work with an LStrHandle with memory allocated by the LabView memory manager, this can be a very difficult process and the creation of these LabView specific datatypes in other development environments was not intended to be done by the developers when it was designed (Note: Clusters with string values in them will always use LStr as the string type).
In summary LStrs (and handles and pointers to them) were designed for use in LabView and not in C, only use them when passed back from a LabView dll function and not as an input to one. At any rate, the example I have attached here will allow you to see how to do what you have asked.