Can't pass custom class to CLI

I have a custom class in C# that I am trying to create in CLI and pass back to a service:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//C#
//DocumentLayer
 [DataContract]
    public class DocumentLayer
    {
      string layerName;
      List<IntPtr> channelPixelData;
      int depth;
      List<int> channelSize;

      public DocumentLayer(string _layerName, List<IntPtr> _channelPixelData, int _depth, List<int> _channelSize)
      {
        layerName = _layerName;
        channelPixelData = _channelPixelData;
        depth = _depth;
        channelSize = _channelSize;
      }
    }

//Service 
    public void SetTexturesFromExternalProcess(DocumentLayer documentLayer)
    {}

//CPP
    Service::DocumentLayer^ doc = gcnew Service::DocumentLayer(layerName, channelPixelData, _depth, vector1);
    Service::ServiceClient::Client->SetTexturesFromExternalProcess(doc);


When I try receive the 'documentLayer' object back in C# everything is initialized as null, the actual 'doc' does not seem to be passed.
Last edited on
Topic archived. No new replies allowed.