How to combine 'directors' and INPUT[]? SWIG C#

View: New views
1 Messages — Rating Filter:   Alert me  

How to combine 'directors' and INPUT[]? SWIG C#

by Ldev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using the example for callback in csharp folder.
And all I do is add a parameter to the run function of type unsigned char*.
So run() becomes run(unsigned char* in).

My example.i file looks like this:

/* File : example.i */
%module(directors="1") example

%{
#include "example.h"
%}
%include "arrays_csharp.i"

%apply unsigned char INPUT[]  { unsigned char* input }

%include "example.h"

%clear unsigned char* input;

%feature("director") Callback::run;

%include "example.h"


It builds fine, but the callback to C# is never happening.
(example has one callback in C++ and the other one in C# by subclassing from the C++ wrapper class).

I've tried all sorts of different ordering of the director and apply line.
So my question is; how can one combine directors with pointer to arrays?

cheers