Support Board
Date/Time: Thu, 16 Jan 2025 05:43:47 +0000
Post From: Using two StorageBlocks
[2017-10-09 17:18:52] |
User44130 - Posts: 23 |
I use the following two functions with sc.StorageBlock. There was no problem with Function1, works good if used alone. But when I add Function2 in my code, it compiles ok, when I incorporate Function2 in the chartbook study it produces CPU exception error. If the chartbook is saved and opened again, the data is saved and everything works ok, no errors. CPU exception error appears only the first time the study added to the chartbook. Is that a problem at all? SCSFExport scsf_Function1 (SCStudyInterfaceRef sc); { struct s_PermData1 { int Number; }; s_PermData1* PermData1; PermData1 = (s_PermData1*)sc.StorageBlock; PermData1->Number = 10; //data processing } SCSFExport scsf_Function2 (SCStudyInterfaceRef sc); { struct s_PermData2 { int Number; }; s_PermData2* PermData2; PermData2 = (s_PermData2*)sc.StorageBlock; PermData2->Number = 10; //data processing } |