Hi Andrew, my programming skills are not close to your level by any measure. This DLL loading thing is completely new to me.

I've read the manual and continued to hack at it and still doesn't work. I even copied SierraChart.dll to SierraChart2.dll, put in the root Zorro directory, and tried a different way of loading the DLL.

I'm getting a compile error about wrong type CONV:POINTER::DOUBLE at the BrokerOpen line. I don't think I'm passing the function pointers in correctly. I tried my best with my rusty skills. Here's my stripped down code. I'll worry about BrokerHistory once I get pass BrokerOpen :-)

Any thoughts?

Thanks.

Code
#include <stdio.h>
#include <default.c>
#include <contract.c>

int __cdecl BrokerOpen (char*, FARPROC, FARPROC); 
BrokerOpen = DefineApi("SierraChart2:BrokerOpen");

int __cdecl BrokerLogin (char*, char*, char*, char*);
BrokerLogin = DefineApi("SierraChart2:BrokerLogin");

int __cdecl BrokerHistory2 (char* , DATE , DATE , int , int , T6* );
BrokerLogin = DefineApi("SierraChart2:BrokerHistory2");

int BrokerError(char* message) {
	printf(message);
}

int BrokerProgress(DWORD progress) {
	printf("stuff");
}

void run()
{

   StartDate = 20190101;
   EndDate = 20191031;
   Verbose = 7|DIAG;

	string temp = "AAPL";
	History = "_SC.t6";

	string temp1[100];
	BrokerOpen(temp1, &BrokerError, &BrokerProgress);

	char retAcct[1024];
	BrokerLogin ("XXXXX", "XXXXXX", "Demo", retAcct);

}