_declspec(dllexport) OurType MyFun(int a,int b){ OurType ot; /* Do some processing. */ ot.x=a; // Assumed to be a ot.y=b; // Assumed to be b return ts; }