This is a subroutine to get inverse of a matrix, passing an array form visual basic, it was in fortran. if i do not understand you have a problem like this. i think it can help you.
#include <windows.h>
#include <math.h>
void __stdcall matinv( int n, double *a_, double *ai_);
BOOL WINAPI...