summaryrefslogtreecommitdiff
path: root/tests/src/Interop/PrimitiveMarshalling/EnumMarshalling/MarshalEnumNative.cpp
blob: c1e37ca4bf9904ee630c72194b6da83fb01281da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <xplatform.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef void *voidPtr;

extern "C" DLL_EXPORT long WINAPI CdeclEnum(int r,BOOL *result) 
{
	if(r != 3)
	{
		printf("\nThe enum value is different from expected one\n");
		*(result)= FALSE;
		return 0;
	}
	return r;
}


extern "C" DLL_EXPORT voidPtr WINAPI GetFptr(int i)
{
	return (voidPtr) &CdeclEnum;
}