Sending data via IdleRefcon
Hi. Inside the entryPointFunc I create my data and send it like this:
my_global_data myStruct;
AEFX_CLR_STRUCT(myStruct);
myStruct.my_int = 5;
my_global_dataP globP = &myStruct;
AEGP_IdleRefcon idleRefcon = reinterpret_cast<AEGP_IdleRefcon>(globP);
ERR(suites.RegisterSuite5()->AEGP_RegisterIdleHook(S_my_id, IdleHook, idleRefcon));
When I retrieve the data inside the idleHook the address looks correct but the data is different:
my_global_dataP globP = reinterpret_cast<my_global_dataP>(refconP);
Any ideas what could be the cause/s of my problem? Thank you.