I'm sure this question has been answered before and I could swear I've seen Bruce demonstrate something like this, but my Google skills have failed me.
I have a C# dll that Powerbuilder classic can get to as the dll has been made COM visible and regasm'ed to death as per Bruce and Yakov's excellent guides on how to talk to .NET from Powerbuilder. I know it's working fine as I have a bunch of test functions that do nothing more than return strings or numbers and they are all callable from PB.
I now want to retrieve some data in the .NET code and return it to PB, where PB will load it into a datawindow. I an pretty easily get the data into an array of the correct class and serialize it to XML and return that string to PB, but I assume that any code I'd have to write to grab the data out of the XML, convert it to the correct datatypes and shove it onto the datawindow will be pretty slow.
Does anyone have a recommended way of doing this? I tried returning the array of data from the call into a structure in PB, but I get a "Mismatched ANY datatypes error" and I know my structure matches my C# class exactly as I've spent hours staring at it today (I also wrote a tool to create both at the same time, so they should match!).
Thanks for any help