Quantcast
Viewing all articles
Browse latest Browse all 2638

Re: Returning a structure from a call to a .NET COM wrapped dll

Okay I seem to have solved it. It doesn't seem a very nice solution to me, but it works at least.

 

So I retrieve the COM method into an OLEObject I them put each property into the desired structure like so:

 

   ltr_sharepoint_site lstr_site

   OLEOBject lole

 

   lole = CREATE OLEObject

 

   lole = iole_xml.DoStuff()

 

   // Extract the results from the OLEObject into my structure

   lstr_site.sb_is_connected = lole.IsConnected

   lstr_site.ss_url = lole.URL

 

It requires the PB programmer to know the names of the properties in the C# code which is a shame, it would be nice to just assign like so lstr_site = iole_xml.DoStuff() but I can live with it Image may be NSFW.
Clik here to view.


Viewing all articles
Browse latest Browse all 2638

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>