ClickteamLLC / windows-edif

Alternate, JSON-driven SDK for the Windows MMF2 runtime
23 stars 7 forks source link

Global Data is not working (found fix) #2

Closed LB-- closed 12 years ago

LB-- commented 12 years ago

Runtime.WriteGlobal("", new Something); if(!Runtime.ReadGlobal("")) MessageBox(0, "Debug", "Debug", MB_OK);

In the above code, the message box appears, meaning that the global data being stored is not being kept.

LB-- commented 12 years ago

Important Information: The solution is to use the hInstLib variable from General.cpp on lines 177, 188, and 223 of Edif.Runtime.cpp instead of the constant EdifGlobalID (No idea why anyone thought that would work)

Quick Fix: Comment out line 160 and add: extern HINSTANCE hInstLib;

define EdifGlobalID hInstLib