The exported routine of the dll is:

extern "C" __declspec (dllexport)
double mjsolve (char* g, double r1, double r2)

g is the string containing the positions of the (remaining) tiles, as decimal 
numbers separated by whitespace, as follows:

<row_1> <column_1> <level_1> <value_1>
<row_2> <column_2> <level_2> <value_2>
:
:
<row_n> <column_n> <level_n> <value_n>

row_i and column_i must be in the interval [00..39]. level_i must be in the
interval [00..09] and value_i must be in the interval [00..99], although you
would need only [01..36] for value_i. Each value must appear an even number of
times and may appear at most four times. 

The program searches partial solutions that reduce the number of tiles to
max(r1,r2) at least, and stops searching when a solution is found that reduce
the number of tiles to min(r1,r2). If a solution is found, the best solution
found solution is written to g in the very same format as the input in g, but 
the tiles are in the take-away order. The length of g must be 12n at least. 

The return value is max(r1,r2) + 2 if no solutions are found, and the number of
tiles remaining for the returned solution otherwise.
