Calling .Net dlls from MQL4

 

I have tried the simplest dll generated from

Public Class CCA24R

Public Shared Function Five() As Integer

Return 5

End Function

End Class

in VS 2008

called as

extern int xx;

#import "Trades.dll"
int Five();
#import

.

.

xx = Five();

And all that seems to happen is execution fails at the call.

Am I missing something or ?

I am new to MQL4 but not new to programming.

Thanks!

Reason: