Support Board
Date/Time: Sun, 22 Dec 2024 13:06:10 +0000
Post From: Different values in SC and VS during debugging
[2015-04-19 15:02:07] |
ejtrader - Posts: 688 |
zaza - Here is a sample code you can use for this. typedef int (__cdecl *SETINT)(int); typedef int (__cdecl *GETINT)(void); HINSTANCE hinstLib = LoadLibrary(TEXT("F:\\temp\\M_GV_d.dll")); SETINT SetInt = (SETINT) GetProcAddress(hinstLib, "GV_SetInteger"); GETINT GetInt = (GETINT) GetProcAddress(hinstLib, "GV_GetInteger"); SCSFExport scsf_ExternalCallTest(SCStudyInterfaceRef sc) { SCSubgraphRef Volume = sc.Subgraph[0]; if (sc.SetDefaults) { sc.GraphName = "ExternalCallTest"; sc.StudyDescription = "ExternalCallTest."; sc.AutoLoop = 1; Volume.Name = "Volume from Dll"; Volume.DrawStyle = DRAWSTYLE_BAR; Volume.LineWidth = 2; Volume.PrimaryColor = RGB(0, 255, 0); sc.FreeDLL = FREEDLL; return; } if (sc.LastCallToFunction) { FreeLibrary(hinstLib); return; } SetInt((int)sc.Volume[sc.Index]); Volume[sc.Index] = GetInt(); return; } http://www.sierrachart.com/image.php?l=1429469107752.png Date Time Of Last Edit: 2015-04-19 19:16:47
|