[
	uuid(FE14BE28-C287-454C-9E5E-BD69FA312F03),
	version(1.0),
	helpstring("VSTX")
]
library vstxlib
{
	importlib("stdole2.tlb");

	interface VSTNOTIFICATION;
	[
		uuid(F193EFC3-2D9A-4B39-9AF8-EA7A6868C61D), odl, dual, oleautomation
	]
	interface VSTNOTIFICATION : IUnknown
	{
		[id(1001)] HRESULT __stdcall ParameterChanged(INT pidx, FLOAT v);
		[id(1002)] HRESULT __stdcall SetDirty(INT);
		[id(1003)] HRESULT __stdcall BeforeDelete(IUnknown*);
		[id(1004)] HRESULT __stdcall ReceiveMidi(SAFEARRAY(BSTR) s);
		[id(1005)] HRESULT __stdcall EditEnded(IUnknown*);
	};

	interface VSTZ;
	[
		uuid(F193EFC3-2D9A-4B39-9AF8-EA7A6868C61A), odl, dual, oleautomation
	]
	interface VSTZ : IDispatch
	{

		// BitRate
		[id(101), propget] HRESULT Bitrate([out, retval] INT* pBr);
		[id(101), propput] HRESULT Bitrate([in] INT pBr);

		// SampleRate
		[id(102), propget] HRESULT SamplingRate([out, retval] INT* pSr);
		[id(102), propput] HRESULT SamplingRate([in] INT pSr);

		// BufferSize
		[id(103), propget] HRESULT BufferSize([out, retval] INT* pBs);
		[id(103), propput] HRESULT BufferSize([in] INT pBs);

		// Program
		[id(104), propget] HRESULT Program([out, retval] INT* pPr);
		[id(104), propput] HRESULT Program([in] INT pPr);

		// State
		[id(105), propget] HRESULT State([in] INT IsPreset,[out, retval] SAFEARRAY(CHAR)* pPr);
		[id(105), propput] HRESULT State([in] INT IsPreset, [in] SAFEARRAY(CHAR) pPr);

		// Bypass
		[id(106), propget] HRESULT Bypass([out, retval] INT* pI);
		[id(106), propput] HRESULT Bypass([in] INT p);

		// Silence
		[id(107), propget] HRESULT Silence([out, retval] INT* pI);
		[id(107), propput] HRESULT Silence([in] INT p);

		// Parameter
		[id(108), propget] HRESULT Parameter([in] INT idx,[out, retval] FLOAT* pPr);
		[id(108), propput] HRESULT Parameter([in] INT idx,[in] FLOAT val);

		// Dirty
		[id(109), propget] HRESULT Dirty([out, retval] INT* pPr);

		// Unit
		[id(110), propget] HRESULT Unit([out, retval] INT* pPr);
		[id(110), propput] HRESULT Unit([in] INT pPr);

		// Names
		[id(111), propget] HRESULT Names([in] INT Typ,[out, retval] SAFEARRAY(BSTR)* pPr);

		// Ports
		[id(112), propget] HRESULT Ports([out] INT* nwi, [out] INT* nwo, [out] INT* nmi, [out] INT* nmo);

		// Instantiation
		[id(113), propget] HRESULT Instantiation([out, retval] INT* pPr);
		[id(113), propput] HRESULT Instantiation([in] INT pPr);
		
		// UAC Virt
		[id(114), propget] HRESULT UACVirtualization([out, retval] INT* pPr);
		[id(114), propput] HRESULT UACVirtualization([in] INT pPr);



		// Functions
		[id(1501)] HRESULT __stdcall InstallHandler(VSTNOTIFICATION*);
		[id(1502)] HRESULT __stdcall RemoveHandler(VSTNOTIFICATION*);

		[id(2001)] HRESULT __stdcall Load(BSTR File,ULONGLONG hDLL,ULONGLONG func);
		[id(2002)] HRESULT __stdcall Show(ULONG_PTR hwnd,INT Rib,INT Modal);
		[id(2003)] HRESULT __stdcall GetVSTVersion(INT* v);
		[id(2004)] HRESULT __stdcall Unload();
		[id(2005)] HRESULT __stdcall Suspend(INT killAp);
		[id(2006)] HRESULT __stdcall Resume(INT restoreAP);
		[id(2007)] HRESULT __stdcall GetNameAndVendor(BSTR* p1,BSTR* p2);
		[id(2008)] HRESULT __stdcall KeyDown(INT ww,INT ll);
		[id(2009)] HRESULT __stdcall KeyUp(INT ww, INT ll);
		[id(2011)] HRESULT __stdcall DeleteBuffers();
		[id(2012)] HRESULT __stdcall ClearIn();
		[id(2013)] HRESULT __stdcall ClearOut();
		[id(2014)] HRESULT __stdcall CopyIO();
		[id(2015)] HRESULT __stdcall ListOfParametersDirect(char* dr);
		[id(2016)] HRESULT __stdcall ListOfParametersArray(SAFEARRAY(BSTR)* sr);
		[id(2071)] HRESULT __stdcall CreateBuffers1();
		[id(2072)] HRESULT __stdcall CreateBuffers2(BSTR* SharedMap);
		[id(2073)] HRESULT __stdcall CreateBuffers3(char** inb, char** outb);
		[id(2074)] HRESULT __stdcall Reconfigure(INT sr, INT bs, INT br, INT buffrecreate);
		[id(2075)] HRESULT __stdcall ShowCustom(ULONG_PTR target);
		[id(2076)] HRESULT __stdcall GetDirectBuffers(char** inb, char** outb);
		[id(2077)] HRESULT __stdcall CanBitrate(INT br);
		[id(2078)] HRESULT __stdcall GetHwnd(ULONG_PTR* hwnd);


		[id(3001)] HRESULT __stdcall InputDirect(const char** b);
		[id(3002)] HRESULT __stdcall Process();
		[id(3003)] HRESULT __stdcall OutputDirect(char** b);
		[id(3004)] HRESULT __stdcall InputArray(SAFEARRAY(BSTR) s);
		[id(3005)] HRESULT __stdcall OutputArray(SAFEARRAY(BSTR)* s);
		[id(3006)] HRESULT __stdcall SendMidiDirect(char* p,INT n,INT type);
		[id(3007)] HRESULT __stdcall SendMidiArray(SAFEARRAY(CHAR), INT n,INT type);
		[id(3008)] HRESULT __stdcall RequestInterface([in] BSTR iid,[out] ULONG_PTR* r);
		[id(3009)] HRESULT __stdcall EnableFlag(INT what, INT value);
		[id(3010)] HRESULT __stdcall SubFunction(SAFEARRAY(CHAR) pPr);

	};


	interface VSTZ2;
	[
		uuid(F193EFC3-2D9A-4B39-9AF8-EA7A6868C61B), odl, dual, oleautomation
	]
	interface VSTZ2 : VSTZ
	{

	};

	interface VSTZ3;
	[
		uuid(F193EFC3-2D9A-4B39-9AF8-EA7A6868C61C), odl, dual, oleautomation
	]
	interface VSTZ3 : VSTZ
	{

	};


}
