Esempio n. 1
0
extern "C" DLL_EXPORT BOOL __stdcall DoCallBack_MarshalByRefStruct_Stdcall_OUTER3(ByRefStdcallCaller_OUTER3 caller)
{

    //init
    OUTER3 outer3;
    LPSTR str = NULL;
    for( size_t i = 0; i < NumArrElements; i++ )
    {
        outer3.arr[i].f1 = 77;
        outer3.arr[i].f2 = 77.0;
        str = GetNativeString();
        outer3.arr[i].f3 = (LPCSTR)str;
        str = NULL;
    }

    str = GetNativeString();
    outer3.f4 = (LPCSTR)str;

    if(!caller(&outer3))
    {
        PRINT_ERR_INFO();
        return FALSE;
    }

    if( !IsCorrectOUTER3( &outer3 ) )
    {
        PRINT_ERR_INFO();
        return FALSE;
    }

    return TRUE;
}
Esempio n. 2
0
extern "C" DLL_EXPORT BOOL _cdecl DoCallBack_MarshalByValStruct_Cdecl_OUTER3(ByValCdeclCaller_OUTER3 caller)
{
    //init
    OUTER3 outer3;
    LPSTR str = NULL;

    for( size_t i = 0; i < NumArrElements; i++ )
    {
        outer3.arr[i].f1 = 1;
        outer3.arr[i].f2 = 1.0;
        str = GetSomeString();
        outer3.arr[i].f3 = (LPCSTR)str;
        str = NULL;
    }

    str = GetSomeString();
    outer3.f4 = (LPCSTR)str;

    if(!caller(outer3))
    {
        PRINT_ERR_INFO();
        return FALSE;
    }

    if( !IsCorrectOUTER3( &outer3 ) )
    {
        PRINT_ERR_INFO();
        return FALSE;
    }

    return TRUE;
}
extern "C" DLL_EXPORT BOOL WINAPI MarshalStructAsParam_AsExpByRefInOUTER3(OUTER3* outer3)
{
	if(!IsCorrectOUTER3(outer3))
	{
		printf("\tMarshalStructAsParam_AsExoByRefIn4:OUTER3 param not as expected\n");
		PrintOUTER3(outer3,"OUTER3");
		return FALSE;
	}
	ChangeOUTER3(outer3);
	return TRUE;
}
Esempio n. 4
0
extern "C" DLL_EXPORT BOOL __stdcall MarshalStructAsParam_AsExpByRefOUTER3_Stdcall(OUTER3* outer3)
{
    if(!IsCorrectOUTER3(outer3))
    {
        PRINT_ERR_INFO();
        PrintOUTER3(outer3,"OUTER3");
        return FALSE;
    }
    ChangeOUTER3(outer3);
    return TRUE;
}