1#include <platformdefines.h>
2#include <stdio.h>
3#include <stdlib.h>
4#include <xplatform.h>
5
6//Value Pass N-->M M--->N
7//STDcall 200 9999
8//Cdecl -1 678
9
10
11int __cdecl CdeTest()
12{
13 return -1;
14}
15
16typedef int (__cdecl *pFunc)();
17typedef int (__cdecl *Cdeclcaller)(pFunc);
18extern "C" DLL_EXPORT BOOL __cdecl DoCallBack_Cdecl(Cdeclcaller caller)
19{
20 printf("DoCallBack_Cdecl\n");
21
22 if(678 != caller(CdeTest))
23 {
24 printf("Error:The Return value from caller is wrong!\n");
25 return FALSE;
26 }
27 return TRUE;
28}
29