SimConnect_CallDispach() issue

DevSim
Posts: 141
Joined: Thu Jul 07, 2011 12:45 pm

Postby DevSim » Wed Jan 04, 2012 3:11 am

Dear P3D support team,



I'm trying to get the example working to register an external callback routine.



Code:

static void CALLBACK SimConnectProcess( SIMCONNECT_RECV *pData, DWORD cbData, void *pContext)
{
LOG("SimConnectProcess called");

[...]
}

[...]

// register callback routine for message processing
hr = SimConnect_CallDispatch( simConnectHandle,
SimConnectProcess,
NULL);




This registering returnes SUCCESS. However, the routine is never called, even though I registered an external sim shortly afterwards.



What is wrong with this code? I'm running this inside of a class and a namespace.



Regards,



DevSim

virtuali
Posts: 408
Joined: Tue Sep 27, 2011 12:51 pm

Postby virtuali » Wed Jan 04, 2012 8:34 am

It's always difficult to diagnose a problem with just a snippet of code. I might asking the obvious but, have you *opened* Simconnect and checked if it's all fine ?



hr = SimConnect_Open( &simConnectHandle, "My addon", NULL, 0, NULL, 0)
Umberto Colapicchioni - VIRTUALI Sagl
http://www.fsdreamteam.com

DevSim
Posts: 141
Joined: Thu Jul 07, 2011 12:45 pm

Postby DevSim » Wed Jan 04, 2012 8:36 am

Hi Umberto,



You're right about that, but I can't post all the code, obviously. Yes, connection is established and I have full control via SimConnect. The SimConnect_Open() returned SUCCESS (otherwise the CallDispatch() wouldn't return SUCCESS at all, I assume).



Regards,

DevSim

Legacy Support
Posts: 474
Joined: Mon Aug 16, 2010 7:22 pm

Postby Legacy Support » Wed Jan 04, 2012 9:07 am

Hi DevSim,



Not ignoring this, or your other posts. The team are still filtering back from the holiday break.



John

DevSim
Posts: 141
Joined: Thu Jul 07, 2011 12:45 pm

Postby DevSim » Wed Jan 04, 2012 9:10 am

Thanks John,



I've seen the awaytime in the other forum and hope you all are having or had a good holiday.



Thanks,



DevSim


Return to “SimConnect Interface Questions”

Who is online

Users browsing this forum: No registered users and 3 guests