// Machine generated IDispatch wrapper class(es) created with Add Class from Typelib Wizard

#import "C:\\AlgoStars\\APPs(UAT)\\TCoreRelease\\Components\\TCTradeWrapperAPI.dll" no_namespace
// CCTCTradeAPIEx wrapper class

class CCTCTradeAPIEx : public COleDispatchDriver
{
public:
	CCTCTradeAPIEx(){} // Calls COleDispatchDriver default constructor
	CCTCTradeAPIEx(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
	CCTCTradeAPIEx(const CCTCTradeAPIEx& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}

	// Attributes
public:

	// Operations
public:


	// ICTCTradeAPIEx methods
public:
	long Connect(LPCTSTR HostAddress, LPCTSTR SystemName, LPCTSTR AppID, long ConnectType)
	{
		long result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 ;
		InvokeHelper(0x1, DISPATCH_METHOD, VT_I4, (void*)&result, parms, HostAddress, SystemName, AppID, ConnectType);
		return result;
	}
	void Disconnect()
	{
		InvokeHelper(0x2, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
	}
	void DoSomething(long FuncType, long Param1, LPCTSTR Param2, VARIANT * Param3)
	{
		static BYTE parms[] = VTS_I4 VTS_I4 VTS_BSTR VTS_PVARIANT ;
		InvokeHelper(0x3, DISPATCH_METHOD, VT_EMPTY, NULL, parms, FuncType, Param1, Param2, Param3);
	}
	long GetAccountData(long nType, long nIndex, LPCTSTR AcctMask, LPDISPATCH AccountDataItem)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_I4 VTS_BSTR VTS_DISPATCH ;
		InvokeHelper(0x4, DISPATCH_METHOD, VT_I4, (void*)&result, parms, nType, nIndex, AcctMask, AccountDataItem);
		return result;
	}
	long NewOrder(long SecurityType, LPDISPATCH NewOrderParameters)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_DISPATCH ;
		InvokeHelper(0x5, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, NewOrderParameters);
		return result;
	}
	long ReplaceOrder(LPDISPATCH ReplaceOrderParameters)
	{
		long result;
		static BYTE parms[] = VTS_DISPATCH ;
		InvokeHelper(0x6, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ReplaceOrderParameters);
		return result;
	}
	long CancelOrder(LPCTSTR ReportID, LPCTSTR Key)
	{
		long result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x7, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ReportID, Key);
		return result;
	}
	long GetReportData(long ReportType, LPCTSTR ReportID, LPDISPATCH ReportItems)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_BSTR VTS_DISPATCH ;
		InvokeHelper(0x8, DISPATCH_METHOD, VT_I4, (void*)&result, parms, ReportType, ReportID, ReportItems);
		return result;
	}
	CString GetProductCurrency(LPCTSTR SymbolID)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0x9, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, SymbolID);
		return result;
	}
	CString GetCurrencyExchangeRate(LPCTSTR Currency)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0xa, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, Currency);
		return result;
	}
	CString GetGeneralService(LPCTSTR Key)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0xb, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, Key);
		return result;
	}
	void TopicSub(LPCTSTR strTopic)
	{
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0xc, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strTopic);
	}
	void TopicUnsub(LPCTSTR strTopic)
	{
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0xd, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strTopic);
	}
	void TopicPublish(LPCTSTR strTopic, long lParam, LPCTSTR strParam, VARIANT * pvParam)
	{
		static BYTE parms[] = VTS_BSTR VTS_I4 VTS_BSTR VTS_PVARIANT ;
		InvokeHelper(0xe, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strTopic, lParam, strParam, pvParam);
	}
	void GeneralQuery(long lIndex, LPCTSTR strQueryName, LPCTSTR strQueryParam, long lContentEncodeType, LPCTSTR strAcctMask)
	{
		static BYTE parms[] = VTS_I4 VTS_BSTR VTS_BSTR VTS_I4 VTS_BSTR ;
		InvokeHelper(0xf, DISPATCH_METHOD, VT_EMPTY, NULL, parms, lIndex, strQueryName, strQueryParam, lContentEncodeType, strAcctMask);
	}
	CString GetInstrumentInfo(LPCTSTR bstrType, LPCTSTR bstrSymbolID)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x10, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, bstrType, bstrSymbolID);
		return result;
	}
	long NewOCOProtectOrder(long SecurityType, LPDISPATCH NewOrderParameters, __int64 StopLossPrice, __int64 TakeProfitPrice, long ByTickSize, long ProtectMarket)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_DISPATCH VTS_I8 VTS_I8 VTS_I4 VTS_I4 ;
		InvokeHelper(0x11, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, NewOrderParameters, StopLossPrice, TakeProfitPrice, ByTickSize, ProtectMarket);
		return result;
	}
	long NewAlertOrder(long SecurityType, LPDISPATCH NewOrderParameters, long AlertField, long AlertCondition, __int64 AlertPrice)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_DISPATCH VTS_I4 VTS_I4 VTS_I8 ;
		InvokeHelper(0x12, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, NewOrderParameters, AlertField, AlertCondition, AlertPrice);
		return result;
	}
	void SetAccountSubscriptionLevel(long Level)
	{
		static BYTE parms[] = VTS_I4 ;
		InvokeHelper(0x13, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Level);
	}
	void QueryAccountData(long lType, LPCTSTR BrokerID, LPCTSTR Account)
	{
		static BYTE parms[] = VTS_I4 VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, parms, lType, BrokerID, Account);
	}
	void SetGeneralService(LPCTSTR Key, LPCTSTR Val)
	{
		static BYTE parms[] = VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, parms, Key, Val);
	}
	long NewOrder2(long SecurityType, LPDISPATCH NewOrderParameters)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_DISPATCH ;
		InvokeHelper(0x16, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, NewOrderParameters);
		return result;
	}
	CString GetOrderTypeMatrix(LPCTSTR bstrBrokerID, LPCTSTR bstrAccount, LPCTSTR bstrSymbolID, long lSynthetic)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR VTS_I4 ;
		InvokeHelper(0x17, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, bstrBrokerID, bstrAccount, bstrSymbolID, lSynthetic);
		return result;
	}
	long SpreadToTwoSymbol(long SecurityType, long SpreadType, BSTR * Symbol, BSTR * SymbolA, BSTR * SymbolB, BSTR * Side, BSTR * Side1, BSTR * Side2)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_I4 VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR ;
		InvokeHelper(0x18, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, SpreadType, Symbol, SymbolA, SymbolB, Side, Side1, Side2);
		return result;
	}
	long TwoSymbolToSpread(long SecurityType, BSTR * Symbol, BSTR * SymbolA, BSTR * SymbolB, BSTR * Side, BSTR * Side1, BSTR * Side2)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR VTS_PBSTR ;
		InvokeHelper(0x19, DISPATCH_METHOD, VT_I4, (void*)&result, parms, SecurityType, Symbol, SymbolA, SymbolB, Side, Side1, Side2);
		return result;
	}
	long NewBankFutTransfer(long lFunCode, LPDISPATCH pdspBankFutTransfer)
	{
		long result;
		static BYTE parms[] = VTS_I4 VTS_DISPATCH ;
		InvokeHelper(0x1a, DISPATCH_METHOD, VT_I4, (void*)&result, parms, lFunCode, pdspBankFutTransfer);
		return result;
	}
	CString IceDecode(LPCTSTR sData)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR ;
		InvokeHelper(0x1b, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, sData);
		return result;
	}
	long ChangeOrderAction(LPCTSTR bstrReportID, long lAction)
	{
		long result;
		static BYTE parms[] = VTS_BSTR VTS_I4 ;
		InvokeHelper(0x1c, DISPATCH_METHOD, VT_I4, (void*)&result, parms, bstrReportID, lAction);
		return result;
	}
	CString GetBrokerInstrumentInfo(LPCTSTR bstrKey, LPCTSTR bstrSymbol, LPCTSTR bstrBrokerAccount)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x1d, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, bstrKey, bstrSymbol, bstrBrokerAccount);
		return result;
	}
	void SetUserConfig(LPCTSTR strName, long lFunCode, LPCTSTR strJson)
	{
		static BYTE parms[] = VTS_BSTR VTS_I4 VTS_BSTR ;
		InvokeHelper(0x1e, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strName, lFunCode, strJson);
	}
	void QueryUserConfig(LPCTSTR strName, long lFunCode)
	{
		static BYTE parms[] = VTS_BSTR VTS_I4 ;
		InvokeHelper(0x1f, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strName, lFunCode);
	}
	void DelUserConfig(LPCTSTR strName, long lFunCode)
	{
		static BYTE parms[] = VTS_BSTR VTS_I4 ;
		InvokeHelper(0x20, DISPATCH_METHOD, VT_EMPTY, NULL, parms, strName, lFunCode);
	}
	CString GetNoMarketTrans(LPCTSTR Account, LPCTSTR Symbol)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x21, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, Account, Symbol);
		return result;
	}
	CString GetSymbolClassifications(LPCTSTR Classify, LPCTSTR Exchange, LPCTSTR Symbol, LPCTSTR Month, LPCTSTR CallPut)
	{
		CString result;
		static BYTE parms[] = VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR VTS_BSTR ;
		InvokeHelper(0x22, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, Classify, Exchange, Symbol, Month, CallPut);
		return result;
	}

	// ICTCTradeAPIEx properties
public:

};
