- Messages
- 40
- Country

when using same code from the managed data request sample from the SDK i do not receive the same results.
Only thing that is different from the original SDK sample is WndProc this is my WndProc:
problem is i receive wayy off results, such as : 7.835953401658903E-67 when it should be around 400 feet.
im lost i do not know what i could do about this, anyone that knows anything about such thing please let me know.
C#:
simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "Plane Altitude", "feet", SIMCONNECT_DATATYPE.FLOAT64, 0, SimConnect.SIMCONNECT_UNUSED);
// IMPORTANT: register it with the simconnect managed wrapper marshaller
// if you skip this step, you will only receive a uint in the .dwData field.
simconnect.RegisterDataDefineStruct<Struct1>(DEFINITIONS.Struct1);
// catch a simobject data request
simconnect.OnRecvSimobjectDataBytype += new SimConnect.RecvSimobjectDataBytypeEventHandler(simconnect_OnRecvSimobjectDataBytype);
Only thing that is different from the original SDK sample is WndProc this is my WndProc:
C#:
private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
// report that Win32 event is not handled.
handled = false;
switch (msg)
{
case WM_USER_SIMCONNECT:
{
if (simconnect != null)
{
simconnect.ReceiveMessage();
handled = true;
}
}
break;
default:
break;
}
return (IntPtr)0;
}
problem is i receive wayy off results, such as : 7.835953401658903E-67 when it should be around 400 feet.
im lost i do not know what i could do about this, anyone that knows anything about such thing please let me know.

