// APL_PSS_API.idl : IDL source for APL_PSS_API.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (APL_PSS_API.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
#include "olectl.h"
	

	[
		object,
		uuid(69A21B6E-286E-4FD7-AC87-8527A3BA9770),
		dual,
		helpstring("IAplAPI Interface"),
		pointer_default(unique)
	] 
	interface IAplAPI : IDispatch
	{
		[propput, id(DISPID_CAPTION)]
		HRESULT Caption([in]BSTR strCaption);
		[propget, id(DISPID_CAPTION)]
		HRESULT Caption([out,retval]BSTR* pstrCaption);		
		
		[id(1), helpstring("method Connect")] HRESULT Connect([in] BSTR userName, [in] BSTR passWord, [in] BSTR baseName, [out, retval] VARIANT* result);
		[id(2), helpstring("method Disconnect")] HRESULT Disconnect([out, retval] VARIANT* result);
		[id(3), helpstring("method SaveChanges")] HRESULT SaveChanges([out, retval] VARIANT* result);
		[id(4), helpstring("method InitAPI")] HRESULT InitAPI([in] long apiInstance, [out, retval] BOOL* result);
		[id(5), helpstring("method IsConnected")] HRESULT IsConnected([out, retval] VARIANT* result);
		[id(6), helpstring("method SelectInstance")] HRESULT SelectInstance([in] long selectMode, [in] VARIANT rootObjects, [in, defaultvalue("")] BSTR title, [out, retval] VARIANT* result);
		[id(7), helpstring("method LoadEntityExtentFromDB")] HRESULT LoadEntityExtentFromDB([in] BSTR entity, [out, retval] VARIANT* result);
		[id(8), helpstring("method LoadExtentInfo")] HRESULT LoadExtentInfo([in] VARIANT ext, [out, retval] VARIANT* result);
		[id(9), helpstring("method QueryExecute")] HRESULT QueryExecute([in] BSTR queryString, [out] BSTR* errorDescription, [out] VARIANT* objArray, [in, defaultvalue(FALSE)] BOOL showDlg, [out, retval] VARIANT* result);
		[id(10), helpstring("method SetInstancesAccess")] HRESULT SetInstancesAccess([in] VARIANT instances, [in] long userOrWG, [in] long accessLevel, [out, retval] VARIANT* result);
		[id(11), helpstring("method Test")] HRESULT Test([out, retval] BOOL* result);
		[propget, id(12), helpstring("property AutoSave")] HRESULT AutoSave([out, retval] BOOL *pVal);
		[propput, id(12), helpstring("property AutoSave")] HRESULT AutoSave([in] BOOL newVal);
		[propget, id(13), helpstring("property ModeInteractive")] HRESULT ModeInteractive([out, retval] BOOL *pVal);
		[propput, id(13), helpstring("property ModeInteractive")] HRESULT ModeInteractive([in] BOOL newVal);
		[propput, id(14), helpstring("property ErrorMode")] HRESULT ErrorMode([in] BOOL newVal);
		[propput, id(15), helpstring("property WarningMode")] HRESULT WarningMode([in] BOOL newVal);
		[propget, id(16), helpstring("property LastErrorDescription")] HRESULT LastErrorDescription([out, retval] BSTR* pVal);
		[id(17), helpstring("method GetInstanceName")] HRESULT GetInstanceName([in] long instance, [out, retval] VARIANT* result);
		[id(18), helpstring("method ConnectNoDlg")] HRESULT ConnectNoDlg([in] BSTR userName, [in] BSTR password, [in] BSTR connect, [out, retval] VARIANT* result);
		[id(19), helpstring("method CopyGroupeAccess")] HRESULT CopyGroupeAccess([in] long pattern, [in] VARIANT destination, [in, defaultvalue("")] BSTR sWaitText, [out, retval] VARIANT* result);
		[id(20), helpstring("method SetCheckCurAccess")] HRESULT SetCheckCurAccess([in] BOOL bBefoSetAccess, [in] BOOL bAfterSetAccess, [out, retval] VARIANT* result);
		[id(21), helpstring("method SetMaxItemsLoad")] HRESULT SetMaxItemsLoad([in] LONG MaxItemsLoad, [out, retval] VARIANT* result);
		[id(22), helpstring("method CopyAccessFromInst2Inst")] HRESULT CopyAccessFromInst2Inst([in] VARIANT patterns, [in] VARIANT destinations, [in] BSTR sWaitText, [out, retval] VARIANT* result);
		[id(23), helpstring("method StartAdministrationMode")] HRESULT StartAdministrationMode([in] BSTR Admin, [in] BSTR Password, [out, retval] VARIANT* result);
		[id(24), helpstring("method EndAdministrationMode")] HRESULT EndAdministrationMode([out, retval] VARIANT* result);
		[id(25), helpstring("method SetAccessByPatternName")] HRESULT SetAccessByPatternName([in] VARIANT instances, [in] BSTR sPatternName, [out, retval] VARIANT* result);
		[propget, id(26), helpstring("property AdminMode")] HRESULT AdminMode([out, retval] BOOL *pVal);
		[id(27), helpstring("method GetAccessString")] HRESULT GetAccessString([in] long instance, [in, defaultvalue(TRUE)] BOOL bForUI, [out, retval] VARIANT* result);
		[id(28), helpstring("method GetAPI")] HRESULT GetAPI([out, retval] long* result);
		[id(29), helpstring("method GetInstanceSysInfo")] HRESULT GetInstanceSysInfo([in] long instance, [out] BSTR* createdBy, [out] DATE* createTime, [out] BSTR* editedBy, [out] DATE* editTime, [out, retval] VARIANT* result);
		[propget, id(30), helpstring("property LastErrorCode")] HRESULT LastErrorCode([out, retval] long *pVal);
		[id(31), helpstring("method SetLoadCharacteristicValues")] HRESULT SetLoadCharacteristicValues([in] BOOL NewValue, [out, retval] VARIANT* result);
		[propget, id(32), helpstring("property LoadCharacteristicValues")] HRESULT LoadCharacteristicValues([out, retval] BOOL *pVal);
		[propput, id(32), helpstring("property LoadCharacteristicValues")] HRESULT LoadCharacteristicValues([in] BOOL newVal);
		[id(33), helpstring("method PrepareAccessStringPattern")] HRESULT PrepareAccessStringPattern([in] BSTR sPatern, [in, defaultvalue("")] BSTR* sDefinition, [out,retval] VARIANT* result);
		[id(34), helpstring("method RefreshAccessPatterns")] HRESULT RefreshAccessPatterns([out,retval] VARIANT* result);
		[id(35), helpstring("method SetAccessFromPatternInst")] HRESULT SetAccessFromPatternInst([in] VARIANT Instances, [in] long Pattern, [out,retval] VARIANT* result);
		[id(36), helpstring("method SetAccessFromPatternName")] HRESULT SetAccessFromPatternName([in] VARIANT Instances, [in] BSTR sPattern, [out,retval] VARIANT* result);
		[id(37), helpstring("method SetInstancesAccess2")] HRESULT SetInstancesAccess2([in] VARIANT Instances, [in] long userOrWG, [in] long accessLevel, [in, defaultvalue(-1)] long AccessPattern, [out, retval] VARIANT* result);
		[id(38), helpstring("method IsUsedAccessPattern")] HRESULT IsUsedAccessPattern([in] long instance, [out,retval] VARIANT* result);
		[id(39), helpstring("method IsUsedAccessPatterns")] HRESULT IsUsedAccessPatterns([in] VARIANT Instances, [out] VARIANT* UsedPatterns, [out,retval] VARIANT* result);
		[id(40), helpstring("method GetOraAlias")] HRESULT GetOraAlias([out,retval] VARIANT* result);
		[id(41), helpstring("method GetInstanceAccessMode2Users")] HRESULT GetInstanceAccessMode2Users([in] long instance, [in] VARIANT users, [out] VARIANT* usersAccess, [out,retval] VARIANT* result);
		[id(42), helpstring("method ReplaceInstance")] HRESULT ReplaceInstance([in] long instance1, [in] long instance2, [in] BOOL bSelectInstances, [in, defaultvalue(FALSE)] BOOL bAutoRun, [in, defaultvalue(FALSE)] BOOL bAutoHide, [out,retval] VARIANT* result);
		[id(43), helpstring("method UpdatePSS")] HRESULT UpdatePSS([out,retval] VARIANT* NeedExitApp);
		[id(44), helpstring("method GetCurrentUser")] HRESULT GetCurrentUser([out, retval] VARIANT* result);
		[id(45), helpstring("method GetNameCurrUser")] HRESULT GetNameCurrUser([out, retval] VARIANT* result);
		[id(46), helpstring("method GetNameCurrConnection")] HRESULT GetNameCurrConnection([out, retval] VARIANT* result);
	};

	[
		object,
		uuid(3C63C8C6-B0F0-48e0-96BA-74537A39E44D),
		dual,
		helpstring("IAplData Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Data : IDispatch
	{
		[id(1), helpstring("method CreateInstance")] HRESULT CreateInstance([in] BSTR entity, [out, retval] VARIANT* result);
		[id(2), helpstring("method DeleteInstance")] HRESULT DeleteInstance([in] long instance, [out, retval] VARIANT* result);
		[id(3), helpstring("method GetAttrBN")] HRESULT GetAttrBN([in] long instance, [in] BSTR attrName, [out, retval] VARIANT* result);
		[id(4), helpstring("method GetAttr")] HRESULT GetAttr([in] long instance, [in] long attrName, [out, retval] VARIANT* result);
		[id(5), helpstring("method PutAttrBN")] HRESULT PutAttrBN([in] long instance, BSTR attrName, [in] VARIANT value, [out, retval] VARIANT* result);
		[id(6), helpstring("method PutAttr")] HRESULT PutAttr([in] long instance, long attrName, [in] VARIANT value, [out, retval] VARIANT* result);
		[id(7), helpstring("method GetInstanceType")] HRESULT GetInstanceType([in] long instance, [out, retval] VARIANT* result);
		[id(8), helpstring("method GetInstanceId")] HRESULT GetInstanceId([in] long instance, [out, retval] VARIANT* result);
		[id(9), helpstring("method GetInstanceById")] HRESULT GetInstanceById([in] long instId, [out, retval] VARIANT* result);
		[id(10), helpstring("method IsKindOfBN")] HRESULT IsKindOfBN([in] long instance, [in] BSTR type, [out, retval] VARIANT* result);
		[id(11), helpstring("method GetEntityExtentBN")] HRESULT GetEntityExtentBN([in] BSTR entity, [out] VARIANT* extent, [out, retval] VARIANT* result);
		[id(12), helpstring("method GetEntityExtent")] HRESULT GetEntityExtent([in] long entity, [out] VARIANT* extent, [out, retval] VARIANT* result);
		[id(13), helpstring("method ClearData")] HRESULT ClearData([out, retval] VARIANT* result);
		[id(14), helpstring("method Test1")] HRESULT Test1([out, retval] BOOL* result);
		[id(15), helpstring("method GetAttrDefinition")] HRESULT GetAttrDefinition([in] long entity, [in] BSTR attrName, [out, retval] long* result);
		[id(16), helpstring("method GetEntityDefinition")] HRESULT GetEntityDefinition([in] BSTR entityName, [out, retval] long* result);
		[id(17), helpstring("method IsValidInstance")] HRESULT IsValidInstance([in] long instance, [out, retval] VARIANT* result);
		[id(18), helpstring("method GetEntityName")] HRESULT GetEntityName([in] long entity, [out, retval] VARIANT* result);
		[id(19), helpstring("method GetAttrName")] HRESULT GetAttrName([in] long attr, [out, retval] VARIANT* result);
		[id(20), helpstring("method LoadFromFile")] HRESULT LoadFromFile([in] BSTR fileName, [out, retval] VARIANT* result);
		[id(21), helpstring("method SaveToFile")] HRESULT SaveToFile([in] BSTR fileName, [in, defaultvalue(FALSE)] BOOL saveChanges, [out, retval] VARIANT* result);
		[id(22), helpstring("method LoadSystemDictionary")] HRESULT LoadSystemDictionary([in] BSTR schema, [out, retval] VARIANT* result);
		[id(23), helpstring("method LoadP21")] HRESULT LoadP21([in] BSTR fileName, [out, retval] VARIANT* result);
		[id(24), helpstring("method SaveP21")] HRESULT SaveP21([in] BSTR fileName, [out, retval] VARIANT* result);
		[id(25), helpstring("method GetInstanceAccessmode")] HRESULT GetInstanceAccessmode([in] long instance, [out, retval] VARIANT* result);
		[id(26), helpstring("method SaveBlobBN")] HRESULT SaveBlobBN([in] long instance, [in] BSTR attr, [in] BSTR filePath, [out, retval] VARIANT* result);
		[id(27), helpstring("method DeleteBlobBN")] HRESULT DeleteBlobBN([in] long instance, [in] BSTR attr, [out, retval] VARIANT* result);
		[id(28), helpstring("method IsKindOf")] HRESULT IsKindOf([in] long instance, [in] long type, [out, retval] VARIANT* result);
		[id(29), helpstring("method GetInstanceTypeId")] HRESULT GetInstanceTypeId([in] long instance, [out, retval] long* result);
		[id(30), helpstring("method FreeInstancesAttr")] HRESULT FreeInstancesAttr([in] VARIANT instances, [out, retval] VARIANT* result);
		[id(31), helpstring("method ClearInstances")] HRESULT ClearInstances([in] VARIANT instances, [out, retval] VARIANT* result);
		[propput, id(32), helpstring("property SetHideMode")] HRESULT SetHideMode([in] BOOL newVal);
		[id(33), helpstring("method LoadBlobBN")] HRESULT LoadBlobBN([in] long istance, [in] BSTR attr, [in] BSTR fileName, [out, retval] VARIANT* result);
		[id(34), helpstring("method GetBlobSizeBN")] HRESULT GetBlobSizeBN([in] long instance, [in] BSTR attr, [out, retval] VARIANT*result);
		[id(35), helpstring("method IsVersionOK")] HRESULT IsVersionOK([out, retval] VARIANT* result);
	};

	[
		object, 
		uuid(1DECE202-C8D4-453e-9B48-DBE7B9FCAEC0),
		dual,
		helpstring("IAplAPI_Autorization Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Autorization : IDispatch
	{
		[id(1), helpstring("method LoadOrgStruct")] HRESULT LoadOrgStruct([out, retval] VARIANT* result);
		[id(2), helpstring("method CreateApproval")] HRESULT CreateApproval([in] long instObject, [out, retval] VARIANT* result);
		[id(3), helpstring("method ShowApproval")] HRESULT ShowApproval([in] long approval, [out, retval] VARIANT* result);
		[id(4), helpstring("method GetCurrentPerson")] HRESULT GetCurrentPerson([out, retval] VARIANT* result);
		[id(5), helpstring("method GetPersonName")] HRESULT GetPersonName([in] long personOrOrg, [out, retval] VARIANT* result);
		[id(6), helpstring("method GetPersonOfficials")] HRESULT GetPersonOfficials([in] long person,  [out] VARIANT* officials, [in, defaultvalue(TRUE)] BOOL bOwner, [out, retval] VARIANT* result);
		[id(7), helpstring("method ShowPersonOfficials")] HRESULT ShowPersonOfficials([in] long person, [out, retval] VARIANT* result);
		[id(8), helpstring("method ShowOfficialHistory")] HRESULT ShowOfficialHistory([in] long official, [in, defaultvalue(0)] long showMode, [out, retval] VARIANT* result);
		[id(9), helpstring("method SelectPersonsOrganizations")] HRESULT SelectPersonsOrganizations([in] long mode, [in] BSTR sDialogTitle, [in] BSTR sTreeTitle, [out] VARIANT* persOrOrgs, [in, defaultvalue(TRUE)] BOOL bShowUserWG, [in, defaultvalue(TRUE)] BOOL bRecursiveSelect, [out, retval] VARIANT* result);
		[id(10), helpstring("method SelectPersonOrOrganization")] HRESULT SelectPersonOrOrganization([in] long mode, [in] BSTR sDialogTitle, [in] BSTR sTreeTitle,  [out, retval] VARIANT* result);
		[id(11), helpstring("method LoadItemApproval")] HRESULT LoadItemApproval([in] long item, [out] VARIANT* allApprovals, [out, retval] VARIANT* result);
		[id(12), helpstring("method CreateApprovalEx")] HRESULT CreateApprovalEx([in] long instObject, [in] long status, [in] BSTR role, [in] long person, [in] long apprOwner, [in] BSTR level, [in] DATE apprDate,  [in] BSTR signSystem, [in] BSTR key, [in] BSTR password, [out, retval] VARIANT* result);
		[id(13), helpstring("method SignDocument")] HRESULT SignDocument([in] long doc, [in] BSTR system, [in] BSTR key, [in] BSTR password, [out] BSTR* sign, [out] BSTR* hash, [out] BSTR* openKey, [out, retval] VARIANT* result);
		[id(14), helpstring("method CheckApproval")] HRESULT CheckApproval([in] long approval, [in, defaultvalue(TRUE)] BOOL bShowResult, [out, retval] VARIANT* result);
		[id(15), helpstring("method GetCurrentUser")] HRESULT GetCurrentUser([out, retval] VARIANT* result);
		[id(16), helpstring("method IsAdmin")] HRESULT IsAdmin([out, retval] VARIANT* result);
		[id(17), helpstring("method SelectPersonsOrganizations2")] HRESULT SelectPersonsOrganizations2([in] long mode, [in] BSTR sDialogTitle, [in] BSTR sTreeTitle, [in] VARIANT rootObjects, [out] VARIANT* persOrOrgs, [in, defaultvalue(TRUE)] BOOL bShowUserWG, [in, defaultvalue(TRUE)] BOOL bRecursiveSelect, [out, retval] VARIANT* result);
		[id(18), helpstring("method SelectPersonOrOrganization2")] HRESULT SelectPersonOrOrganization2([in] long mode, [in] BSTR sDialogTitle, [in] BSTR sTreeTitle,  [in] VARIANT rootObjects, [out, retval] VARIANT* result);
		[id(19), helpstring("method SetSignMode")] HRESULT SetSignMode([in] long lMode, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(CA640AEA-8EE1-48f9-BC64-29859DC6EB8D),
		dual,
		helpstring("IAplAPI_BProcess Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_BProcess : IDispatch
	{
		[id(1), helpstring("method CreateBP")] HRESULT CreateBP([in] BSTR id, [in] BSTR name, [in] long type, [in] long baseBP, [out, retval] VARIANT* result);
		[id(2), helpstring("method CreateBPVersion")] HRESULT CreateBPVersion([in] long bp, [in] BSTR verId, [in, defaultvalue(TRUE)] BOOL bSetActive, [out, retval] VARIANT* result);
		[id(3), helpstring("method MakeBPVersionActive")] HRESULT MakeBPVersionActive([in] long bpVersion, [out, retval] VARIANT* result);
		[id(4), helpstring("method DeleteBP")] HRESULT DeleteBP([in] long bp, [in, defaultvalue(TRUE)] BOOL bDelSubBP, [out, retval] VARIANT* result);
		[id(5), helpstring("method LoadBPInfo")] HRESULT LoadBPInfo([in] long bp, [in, defaultvalue(TRUE)] BOOL bLoadSubBPInfo, [out, retval] VARIANT* relust);
		[id(6), helpstring("method FindBPById")] HRESULT FindBPById([in] BSTR bpId, [out, retval] VARIANT* result);
		[id(7), helpstring("method ShowBPProperties")] HRESULT ShowBPProperties([in] long bp, [out, retval] VARIANT* result);
		[id(8), helpstring("method WhereUsedBP")] HRESULT WhereUsedBP([in] long bp, [out] VARIANT* objects, [out, retval] VARIANT* result);
		[id(9), helpstring("method FindAssociatedBP")] HRESULT FindAssociatedBP([in] long instance, [out] VARIANT* ext, [out] VARIANT* rels, [out, retval] VARIANT* result );
		[id(10), helpstring("method CreateBPAssociation")] HRESULT CreateBPAssociation([in] long instance, [in] long bp, [in] BSTR assocId, [out, retval] VARIANT* result);
		[id(11), helpstring("method FindBPAssociation")] HRESULT FindBPAssociation([in] long instance, [in] long bp, [out, retval] VARIANT* result);
		[id(12), helpstring("method LoadAllBPResources")] HRESULT LoadAllBPResources([in] long bp, [out] VARIANT* resources, [out, retval] VARIANT* result);
		[id(13), helpstring("method GetAllBPVersion")] HRESULT GetAllBPVersion([in] long bp, [out] VARIANT* versions, [out, retval] VARIANT* result);
		[id(14), helpstring("method AddBPToBP")] HRESULT AddBPToBP([in] long subBP, [in] long baseBP, [out, retval] VARIANT* result);
		[id(15), helpstring("method DeleteBPRelation")] HRESULT DeleteBPRelation([in] long subBP, [in] long baseBP, [out, retval] VARIANT* result);
		[id(16), helpstring("method CheckIn")] HRESULT CheckIn([in] long instance, [in, defaultvalue(FALSE)] BOOL setActive, [out, retval] VARIANT* result);
		[id(17), helpstring("method LoadBPDictionary")] HRESULT LoadBPDictionary([out, retval] VARIANT* result);
		[id(18), helpstring("method CheckOut")] HRESULT CheckOut([in] long bp, [in, defaultvalue (FALSE)] BOOL checkOutSubBP, [out, retval] VARIANT* result);
		[id(19), helpstring("method UndoCheckOut")] HRESULT UndoCheckOut([in] long bp, [in, defaultvalue (FALSE)] BOOL undoCheckOutSubBP, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(B9C4062F-3642-422c-98E9-E1501C7D108F),
		dual,
		helpstring("IAplAPI_Category Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Category : IDispatch
	{
		[id(1), helpstring("method FindCategory")] HRESULT FindCategory([in] BSTR id, [out, retval] VARIANT* result);
		[id(2), helpstring("method InsertSubCategory")] HRESULT InsertSubCategory([in] long baseCategory, [in] long subCategory, [out, retval] VARIANT* result);
		[id(3), helpstring("method RemoveSubCategory")] HRESULT RemoveSubCategory([in] long baseCategory, [in] long subCategory, [out, retval] VARIANT* result);
		[id(4), helpstring("method CreateCategory")] HRESULT CreateCategory([in] BSTR id, [in] BSTR name, [in] BSTR description, [out, retval] VARIANT* result);
		[id(5), helpstring("method GetCategoryAttr")] HRESULT GetCategoryAttr([in] long category, [out] BSTR* id, [out] BSTR* name, [out] BSTR* description, [out, retval] VARIANT* result);
		[id(6), helpstring("method GetAllSubCategory")] HRESULT GetAllSubCategory([in] long category, [in, out] VARIANT* subCategories, [out,retval] VARIANT* result);
		[id(7), helpstring("method RemoveCategory")] HRESULT RemoveCategory([in] long category, [out,retval] VARIANT* result);
		[id(8), helpstring("method GetAllParentCategory")] HRESULT GetAllParentCategory([in] long category, [in, out] VARIANT* parentCategories, [out, retval] VARIANT* result);
		[id(9), helpstring("method GetCategoryContents")] HRESULT GetCategoryContents([in] long category, [in, out] VARIANT* extent, [in, defaultvalue(FALSE)] BOOL all, [out, retval] VARIANT* result);
		[id(10), helpstring("method FindProductInCategory")] HRESULT FindProductInCategory([in] long product, [in] long category, [in, defaultvalue(FALSE)] BOOL all, [out, retval] VARIANT* result);
		[id(11), helpstring("method AddProductToCategory")] HRESULT AddProductToCategory([in] long product, [in] long category, [out, retval] VARIANT* result);
		[id(12), helpstring("method RemoveProductFromCategory")] HRESULT RemoveProductFromCategory([in] long product, [in] long category, [out, retval] VARIANT* result);
		[id(13), helpstring("method GetProductCategories")] HRESULT GetProductCategories([in] long product, [in, out] VARIANT* extent, [out, retval] VARIANT* result);
		[id(14), helpstring("method LoadCategoryInfo")] HRESULT LoadCategoryInfo([in] long categ, [out, retval] VARIANT* result);
		[id(15), helpstring("method GetAllCategoryVersion")] HRESULT GetAllCategoryVersion([in] long categ, [out] VARIANT* versions, [out, retval] VARIANT* result);
		[id(16), helpstring("method CheckIn")] HRESULT CheckIn([in] long categ, [out, retval] VARIANT* result);
		[id(17), helpstring("method CheckOut")] HRESULT CheckOut([in] long categ, [out, retval] VARIANT* result);
		[id(18), helpstring("method UndoCheckOut")] HRESULT UndoCheckOut([in] long categ, [out, retval] VARIANT* result);
		[id(19), helpstring("method RefreshRootCategories")] HRESULT RefreshRootCategories([out, retval] VARIANT* result);
	};

	[
		object,
		uuid(52185847-EFBD-4781-B76B-94EA7B1F684B),
		dual,
		helpstring("IAplAPI_Characteristic Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Characteristic : IDispatch
	{
		[id(1), helpstring("method GetCharacteristicById")] HRESULT GetCharacteristicById([in] BSTR id, [out, retval] VARIANT* result);
		[id(2), helpstring("method GetInstCharacteristic")] HRESULT GetInstCharacteristic([in] long instance, [in] long characteristic, [out, retval] VARIANT* result);
		[id(3), helpstring("method FindAssociatedCharacteristic")] HRESULT FindAssociatedCharacteristic([in] long instance, [out] VARIANT* outExt, [out] VARIANT* outGroup, [out, retval] VARIANT* result);
		[id(4), helpstring("method GetCharacteristicType")] HRESULT GetCharacteristicType([in] BSTR type, [out, retval] VARIANT* result);
		[id(5), helpstring("method CreateDescriptiveCharacteristic")] HRESULT CreateDescriptiveCharacteristic([in] long item, [in] long characteristic, [in] long type, [in] BSTR value, [out, retval] VARIANT* result);
		[id(6), helpstring("method CreateMeasuredCharacteristic")] HRESULT CreateMeasuredCharacteristic([in] long item, [in] long characteristic, [in] long type, [in] double value, [in] double maxDeviation, [in] double minDeviation, [out, retval] VARIANT* result);
		[id(7), helpstring("method SelectCharactUnionGroup")] HRESULT SelectCharactUnionGroup([in, defaultvalue(0)] long defaultCharactUnion, [in, defaultvalue(0)] long defaultCharactGroup, [out, retval] VARIANT* result);
		[id(8), helpstring("method LoadCharacteristicDictionary")] HRESULT LoadCharacteristicDictionary([out, retval] VARIANT* result);
		[id(9), helpstring("method GetUnitById")] HRESULT GetUnitById([in] BSTR name, [out, retval] VARIANT* result);
		[id(10), helpstring("method CreateCharacteristic")] HRESULT CreateCharacteristic([in] long item, [in] long base_val, [in] long new_char, [out] long* val, [out, retval] VARIANT* result);
		[id(11), helpstring("method DeleteCharacteristic")] HRESULT DeleteCharacteristic([in] long val, [out, retval] VARIANT* result);
		[id(12), helpstring("method GetUnitName")] HRESULT GetUnitName([in] long unit, [out] BSTR* name, [out, retval] VARIANT* result);
		[id(13), helpstring("method PrintCharacteristicValue")] HRESULT PrintCharacteristicValue([in] long value, [in] long unit, [out] BSTR* name, [out, retval] VARIANT* result);
		[id(14), helpstring("method CreateCopyCharacteristicVal")] HRESULT CreateCopyCharacteristicVal([in] long old_instance, [in, defaultvalue(0)] long new_instance, [out, retval] VARIANT* result);
		[id(15), helpstring("method SelectCharacteristic")] HRESULT SelectCharacteristic([in, defaultvalue(0)] long defaultCharact, [in, defaultvalue(0)] long defaultGroup, [out, retval] VARIANT* result);
		[id(16), helpstring("method CreateDateTimeCharacteristic")] HRESULT CreateDateTimeCharacteristic([in] long item, [in] long characteristic, [in] long type, [in] DATE value, [out, retval] VARIANT* result);
		[id(17), helpstring("method CheckIn")] HRESULT CheckIn([in] long instance, [in, defaultvalue(FALSE)] BOOL setActive, [out, retval] VARIANT* result);
		[id(18), helpstring("method CheckOut")] HRESULT CheckOut([in] long instance, [out, retval] VARIANT* result);
		[id(19), helpstring("method UndoCheckOut")] HRESULT UndoCheckOut([in] long instance, [out, retval] VARIANT* result);
		[id(20), helpstring("method GetInstancesCharacteristic")] HRESULT GetInstancesCharacteristic([in, out] IDispatch** longMap, [in] long characteristic, [in] long type, [out, retval] VARIANT* result);
		[id(21), helpstring("method CreateEnumirationCharacteristic")] HRESULT CreateEnumirationCharacteristic([in] long item, [in] long characteristic, [in] long type, [in] BSTR value, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(4B7D707D-470A-4c1b-8D98-21B49761FCBB),
		dual,
		helpstring("IAplAPI_Document Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Document : IDispatch
	{
		[id(1), helpstring("method SelectDocType")] HRESULT SelectDocType([in, defaultvalue(0)] long selectedDocType, [in, defaultvalue(0)] long selectedDocGroup, [out, retval] VARIANT* result);
		[id(2), helpstring("method FindDocById")] HRESULT FindDocById([in] BSTR id, [out, retval] VARIANT* result);
		[id(3), helpstring("method GetDocumentTypeBN")] HRESULT GetDocumentTypeBN([in] BSTR type, [out, retval] VARIANT* result);
		[id(4), helpstring("method GetFileName")] HRESULT GetFileName([in] long docOrRevision, [out] BSTR* buf, [out, retval] VARIANT* result);
		[id(5), helpstring("method GetFullFileName")] HRESULT GetFullFileName([in] long docOrRevision, [out] BSTR* buf, [out, retval] VARIANT* result);
		[id(6), helpstring("method CreateDocument")] HRESULT CreateDocument([in] BSTR id, [in] BSTR name, [in] BSTR description, [in] long type, [in] BSTR path, [in, defaultvalue(TRUE)] BOOL stored, [out, retval] VARIANT* result);
		[id(7), helpstring("method LoadRevision")] HRESULT LoadRevision([in] long docOrRevision, [in] BSTR path, [out, retval] VARIANT* result);
		[id(8), helpstring("method View")] HRESULT View([in] long docOrRevision, [out, retval] VARIANT* result);
		[id(9), helpstring("method CheckIn")] HRESULT CheckIn([in] long doc, [in] BSTR path, [in, defaultvalue(FALSE)] BOOL setActive, [out, retval] VARIANT* result);
		[id(10), helpstring("method Edit")] HRESULT Edit([in] long docOrRevision, [out, retval] VARIANT* result);
		[id(11), helpstring("method CheckOut")] HRESULT CheckOut([in] long docOrRevision, [in] BSTR path, [out, retval] VARIANT* result);
		[id(12), helpstring("method UndoCheckOut")] HRESULT UndoCheckOut([in] long docOrRevision, [out, retval] VARIANT* result);
		[id(13), helpstring("method FindAssociatedDocuments")] HRESULT FindAssociatedDocuments([in] long instance, [in, out] VARIANT* outExt, [in, out] VARIANT* outRel, [out, retval] VARIANT* result);
		[id(14), helpstring("method DeleteDoc")] HRESULT DeleteDoc([in] long doc, [out, retval] VARIANT* result);
		[id(15), helpstring("method CreateAssociation")] HRESULT CreateAssociation([in] long instance, [in] long doc, [out, retval] VARIANT* result);
		[id(16), helpstring("method FindAssociation")] HRESULT FindAssociation([in] long instance, [in] long doc, [out, retval] VARIANT* result);
		[id(17), helpstring("method LoadDocInfo")] HRESULT LoadDocInfo([in] long doc, [out, retval] VARIANT* result);
		[id(18), helpstring("method LoadAllDocumentRevision")] HRESULT LoadAllDocumentRevision([in] long doc, [in, out] VARIANT* revExt, [out, retval] VARIANT* result);
		[id(19), helpstring("method ShowDocumentProperties")] HRESULT ShowDocumentProperties([in] long docOrRevision, [out, retval] VARIANT* result);	
		[id(20), helpstring("method DeleteRevision")] HRESULT DeleteRevision([in] long revision, [out, retval] VARIANT* result);		
		[id(21), helpstring("method CreateDocumentRevision")] HRESULT CreateDocumentRevision([in] long document, [in] BSTR path, [in, defaultvalue(TRUE)] BOOL stored, [in, defaultvalue(FALSE)] BOOL setActive, [in, defaultvalue(0)] long baseRevision, [out, retval] VARIANT* result);
		[id(22), helpstring("method CreateFile")] HRESULT CreateFile([in] BSTR path, [in, defaultvalue(TRUE)] BOOL stored, [out, retval] VARIANT* result);
		[id(23), helpstring("method ShowDocChanges")] HRESULT ShowDocChanges([in] long document, [out, retval] VARIANT* result);
		[id(24), helpstring("method CheckSubDocument")] HRESULT CheckSubDocument([in] long docOrRevision, [out, retval] VARIANT* result);
		[id(25), helpstring("method LoadDocumentDictionary")] HRESULT LoadDocumentDictionary([out, retval] VARIANT* result);
		[id(26), helpstring("method LoadDataModule")] HRESULT LoadDataModule([in] BSTR DMCode, [in] BSTR pictureRef, [in] BSTR path,  [out] BSTR* file, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(01471701-5E75-4fc3-BF4A-BAD2D548E6CA),
		dual,
		helpstring("IAplAPI_Folder Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Folder : IDispatch
	{
		[id(1), helpstring("method LoadFolderInfo")] HRESULT LoadFolderInfo([in] long folder, [out, retval] VARIANT* result);
		[id(2), helpstring("method GetAllSubFolder")] HRESULT GetAllSubFolder([in] long folder, [in, out] VARIANT* subFolders, [out, retval] VARIANT* result);
		[id(3), helpstring("method CreateFolder")] HRESULT CreateFolder([in] long parentFolder, [in] BSTR name, [in] BSTR description, [out, retval] VARIANT* result);
		[id(4), helpstring("method DeleteFolder")] HRESULT DeleteFolder([in] long folder, [out, retval] VARIANT* result);
		[id(5), helpstring("method GetFolderContents")] HRESULT GetFolderContents([in] long folder, [out] VARIANT* folderContents, [out, retval] VARIANT* result);
		[id(6), helpstring("method AddToFolder")] HRESULT AddToFolder([in] long folder, [in] long item, [out, retval] VARIANT* result);
		[id(7), helpstring("method RemoveFromFolder")] HRESULT RemoveFromFolder([in] long folder, [in] long item, [out, retval] VARIANT* result);
		[id(8), helpstring("method ShowFolderProperties")] HRESULT ShowFolderProperties([in] long folder, [out, retval] VARIANT* result);
		[id(9), helpstring("method MoveFolder")] HRESULT MoveFolder([in] long folder, [in] long parentFolder, [out, retval] VARIANT* result);
		[id(10), helpstring("method FindFolderByName")] HRESULT FindFolderByName([in] BSTR name, [in, defaultvalue(0)] long parentFolder, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(7D805BEC-19BE-4c1d-9AED-68A1292DFF9A),
		dual,
		helpstring("IAplAPI_Product Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Product : IDispatch
	{
		[id(1), helpstring("method LoadAllSubProduct")] HRESULT LoadAllSubProduct([in] long ci, [in] long context, [in] long pdf, [out] VARIANT* extRel, [out] VARIANT* extPdf, [in, defaultvalue(TRUE)] BOOL fromBase, [out, retval] VARIANT* result);
		[id(2), helpstring("method FilterlBySN")] HRESULT FilterlBySN([in] VARIANT inExt, [in] BSTR sn, [out] VARIANT* outExt, [out, retval] VARIANT* result);
		[id(3), helpstring("method FilterlByDate")] HRESULT FilterlByDate([in] VARIANT inExt, [in] DATE time, [out] VARIANT* outExt, [out, retval] VARIANT* result);
		[id(4), helpstring("method GetAllProductVersion")] HRESULT GetAllProductVersion([in] long prd, [in, out] VARIANT* outExt, [out, retval] VARIANT* result);
		[id(5), helpstring("method FindProductByID")] HRESULT FindProductByID([in]BSTR id, [out, retval] VARIANT* result);
		[id(6), helpstring("method FindPdfByID")] HRESULT FindPdfByID([in] long product, [in] BSTR id, [out, retval] VARIANT* result);
		[id(7), helpstring("method LoadProductInfo")] HRESULT LoadProductInfo([in] long instance, [out, retval] VARIANT* result);
		[id(8), helpstring("method CreatePDF")] HRESULT CreatePDF([in] BSTR id, [in] BSTR name, [in] BSTR version, [in, defaultvalue(TRUE)] BOOL testUnique, [out, retval] VARIANT* result);
		[id(9), helpstring("method CreatePdfRelation")] HRESULT CreatePdfRelation([in] long context, [in] long relatingPDF, [in] long relatedPDF, [in] BSTR id, [in] BSTR name, [in] double count, [in, defaultvalue(0)] long unit, [out, retval] VARIANT* result);
		[id(10), helpstring("method DisassemblyProduct")] HRESULT DisassemblyProduct([in] long ci, [in] long context, [in] long pdf, [out] VARIANT*  pdfArray, [out] VARIANT* countArray, [out] VARIANT* unitArray, [in, defaultvalue(TRUE)] BOOL ReturnOnlyPart, [out, retval] VARIANT* result);
		[id(11), helpstring("method WhereProductUsed")] HRESULT WhereProductUsed([in] long pdf, [out] VARIANT* extRel, [out] VARIANT* extPdf, [in, defaultvalue(TRUE)] BOOL fromBase, [out, retval] VARIANT* result);
		[id(12), helpstring("method LoadProductAlternates")] HRESULT LoadProductAlternates([in] long product, [out] VARIANT* extRel, [out] VARIANT* extPrd, [out, retval] VARIANT* result);
		[id(13), helpstring("method LoadAllZagotov")] HRESULT LoadAllZagotov([in] long pdf, [out] VARIANT* extRel, [out] VARIANT* extPdf, [in, defaultvalue(FALSE)] BOOL includeDesign, [in, defaultvalue(TRUE)] BOOL fromBase, [out, retval] VARIANT* result);
		[id(14), helpstring("method StrConvertPdfType2Rus")] HRESULT StrConvertPdfType2Rus([in] BSTR sType, [out, retval] VARIANT* result);
		[id(15), helpstring("method StrConvertRus2PdfType")] HRESULT StrConvertRus2PdfType([in] BSTR sRusType, [out, retval] VARIANT* result);
		[id(16), helpstring("method StrConvertMakeOrBuy2Rus")] HRESULT StrConvertMakeOrBuy2Rus([in] BSTR sSource, [out, retval] VARIANT* result);
		[id(17), helpstring("method StrConvertRus2MakeOrBuy")] HRESULT StrConvertRus2MakeOrBuy([in] BSTR sRusSource, [out, retval] VARIANT* result);
		[id(18), helpstring("method LoadProductDictionary")] HRESULT LoadProductDictionary([out, retval] VARIANT* result);
	};

	[
		object,
		uuid(BE1159CF-6012-445e-8269-CD79539C71FB),
		dual,
		helpstring("IAplAPI_Classifier Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Classifier : IDispatch
	{
		[id(1), helpstring("method SelectItem")] HRESULT SelectItem([in] VARIANT BaseClassifierSystems, [in, defaultvalue(4)] long mode, [in, defaultvalue ("")] BSTR sTitle, [out, retval] VARIANT* result);
		[id(2), helpstring("method CreateClassifierSystem")] HRESULT CreateClassifierSystem([in, defaultvalue(0)] long ParentElement, [in, defaultvalue("")] BSTR sId, [in, defaultvalue("")] BSTR sName, [in, defaultvalue("")] BSTR sDescription, [in, defaultvalue(TRUE)] BOOL bTestUnique, [out, retval] VARIANT* result);
		[id(3), helpstring("method CreateClassifierLevel")] HRESULT CreateClassifierLevel([in] long ClassifierSystem, [in, defaultvalue(0)] long ParentElement, [in, defaultvalue("")] BSTR sId, [in, defaultvalue("")] BSTR sName, [in, defaultvalue("")] BSTR sDescription, [in, defaultvalue(TRUE)] BOOL bTestUnique, [out, retval] VARIANT* result);
		[id(4), helpstring("method DeleteClassifierItem")] HRESULT DeleteClassifierItem([in] long item, [out, retval] VARIANT* result);
		[id(5), helpstring("method ShowClassifierProperties")] HRESULT ShowClassifierProperties([in] long item, [out, retval] VARIANT* result);
		[id(6), helpstring("method MoveClassifierSystem")] HRESULT MoveClassifierSystem([in] long MovedSystem, [in, defaultvalue(0)] long NewParent, [out, retval] VARIANT* result);
		[id(7), helpstring("method MoveClassifierLevel")] HRESULT MoveClassifierLevel([in] long MovedLevel, [in, defaultvalue(0)] long NewParent, [out, retval] VARIANT* result);
		[id(8), helpstring("method GetClassifierSystemBN")] HRESULT GetClassifierSystemBN([in] BSTR id, [out, retval] VARIANT* result);
		[id(9), helpstring("method GetClassifierSystemById")] HRESULT GetClassifierSystemById([in] BSTR name, [out, retval] VARIANT* result);
		[id(10), helpstring("method GetClassifierLevelByName")] HRESULT GetClassifierLevelByName([in] BSTR name, [in] long ClassifierSystem, [out, retval] VARIANT* result);
		[id(11), helpstring("method GetClassifierLevelById")] HRESULT GetClassifierLevelById([in] BSTR id, [in] long ClassifierSystem, [out, retval] VARIANT* result);
		[id(12), helpstring("method GetClassifierCharacteristic")] HRESULT GetClassifierCharacteristic([in] long item, [out] VARIANT* characteristics, [in, defaultvalue (FALSE)] BOOL bAllLevels,  [in, defaultvalue (TRUE)] BOOL bCheckUnique, [out, retval] VARIANT* result);
		[id(13), helpstring("method GetSubItems")] HRESULT GetSubItems([in] VARIANT ClassifierLevels, [out] VARIANT* items, [out] VARIANT* rels, [out, retval] VARIANT* result);
		[id(14), helpstring("method LoadSubClassifierSystems")] HRESULT LoadSubClassifierSystems([in] long ClassifierSystem, [out] VARIANT* SubElements, [in, defaultvalue(FALSE)] BOOL bAllLevels, [out, retval] VARIANT* result);
		[id(15), helpstring("method LoadSubClassifierLevels")] HRESULT LoadSubClassifierLevels([in] long ClassifierItem, [out] VARIANT* SubElements, [in, defaultvalue(FALSE)] BOOL bAllLevels, [out, retval] VARIANT* result);
		[id(16), helpstring("method CreateClassifierAssociation")] HRESULT CreateClassifierAssociation([in] long item, [in] long ClassifierLevel, [in, defaultvalue(TRUE)] BOOL bTestUnique, [out, retval] VARIANT* result);
		[id(17), helpstring("method FindClassifiersContained")] HRESULT FindClassifiersContained([in] long item, [out] VARIANT* classifiers, [out, retval] VARIANT* result);
		[id(18), helpstring("method DeleteClassifierAssociation")] HRESULT DeleteClassifierAssociation([in] long item, [in] long ClassifierLevel, [out, retval] VARIANT* result);
		[id(19), helpstring("method LoadClassifierInfo")] HRESULT LoadClassifierInfo([in] long Classifier, [out, retval] VARIANT* result);
		[id(20), helpstring("method LoadDictionary")] HRESULT LoadDictionary([out, retval] VARIANT* result);
	};

	[
		object,
		uuid(0121F40B-F316-4ea4-B7CB-FF525DCDAE0C),
		dual,
		helpstring("IAplAPI_Workflow Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Workflow : IDispatch
	{
		[id(1), helpstring("method CreateWfProcess")] HRESULT CreateWfProcess([in] BSTR sProcessId, [in] BSTR sProcessName, [in] BSTR sProcessDscr, [in] long ProcessTmpl, [in] long ProcessOwner, [in] DATE StartDate, [in] DATE FinishDate, [in] DATE CheckDate, [in] VARIANT TaskProt, [in] VARIANT WorkObj, [out, retval] VARIANT* result);
		[id(2), helpstring("method DeleteWfProcess")] HRESULT DeleteWfProcess([in] long Process, [in, defaultvalue(TRUE)] BOOL SaveChanges, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [out, retval] VARIANT* result );
		[id(3), helpstring("method RunWfProcess")] HRESULT RunWfProcess([in] long Process, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [in, defaultvalue(0)] long FirstActivity, [out, retval] VARIANT* result);
		[id(4), helpstring("method RestartWfProcess")] HRESULT RestartWfProcess([in] long Process, [out, retval] VARIANT* result);
		[id(5), helpstring("method SuspendWfProcess")] HRESULT SuspendWfProcess([in] long Process, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [out, retval] VARIANT* result);
		[id(6), helpstring("method TerminateWfProcess")] HRESULT TerminateWfProcess([in] long Process, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [out, retval] VARIANT* result);
		[id(7), helpstring("method EndWfProcess")] HRESULT EndWfProcess([in] long Process, [out, retval] VARIANT* result);
		[id(8), helpstring("method GetUserTaskList")] HRESULT GetUserTaskList([in] long Person, [out] VARIANT* OutArray, [out, retval] VARIANT* result);
		[id(9), helpstring("method GetUserProcessTempList")] HRESULT GetUserProcessTempList([in] long Person, [out] VARIANT* OutArray, [out, retval] VARIANT* result);
		[id(10), helpstring("method GetUserProcessList")] HRESULT GetUserProcessList([in] long Person, [out] VARIANT* OutArray, [out, retval] VARIANT* result);
		[id(11), helpstring("method GetProcessTasks")] HRESULT GetProcessTasks([in] long Process, [out] VARIANT* OutArray, [out, retval] VARIANT* result);
		[id(12), helpstring("method LoadProcessInfo")] HRESULT LoadProcessInfo([in] long Process, [out, retval] VARIANT* result);
		[id(13), helpstring("method ShowProcessProperties")] HRESULT ShowProcessProperties([in] long Process, [out, retval] VARIANT* result);
		[id(14), helpstring("method RestartTask")] HRESULT RestartTask([in] long Task, [in, defaultvalue(0)] long NewManager, [in, defaultvalue(0)] long NewPerformer, [out, retval] VARIANT* result);
		[id(15), helpstring("method RunTask")] HRESULT RunTask([in] long Task, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [out, retval] VARIANT* result);
		[id(16), helpstring("method CreateTask")] HRESULT CreateTask([in] long Process, [in] long Activity, [in] VARIANT SubProcesses, [in] BSTR sTaskId, [in] BSTR sTaskName, [in] BSTR sTaskDscr, [in] DATE StartDate, [in] DATE FinishDate, [in] DATE CheckDate, [in, defaultvalue(0)] long Manager, [in, defaultvalue(0)] long Performer, [in, defaultvalue(0)] long PreviousTask, [out, retval] VARIANT* result);
		[id(17), helpstring("method SuspendTask")] HRESULT SuspendTask([in] long Task, [in, defaultvalue(TRUE)] BOOL VerifyAccess, [out, retval] VARIANT* result);
		[id(18), helpstring("method EndTask")] HRESULT EndTask([in] long Task, [out, retval] VARIANT* result);
		[id(19), helpstring("method LoadTaskInfo")] HRESULT LoadTaskInfo([in] long Task, [out, retval] VARIANT* result);
		[id(20), helpstring("method ShowTaskProperties")] HRESULT ShowTaskProperties([in] long Task, [out, retval] VARIANT* result);
		[id(21), helpstring("method GetProcessComponents")] HRESULT GetProcessComponents([in] long ProcessOrTmpl, [out] VARIANT* OutArray, [out, retval] VARIANT* result);
		[id(22), helpstring("method GetProcessTmplById")] HRESULT GetProcessTmplById([in] BSTR sTmplId, [out, retval] VARIANT* result);
		[id(23), helpstring("method LoadTemplates")] HRESULT LoadTemplates([out, retval] VARIANT* result);
		[id(24), helpstring("method GetConnectors")] HRESULT GetConnectors([in] long TaskOrActivity, [out] VARIANT* IncomConnectors, [out] VARIANT* OutcomConnectors, [out, retval] VARIANT* result);
		[id(25), helpstring("method EndTask2")] HRESULT EndTask2([in] long Task, [in, defaultvalue(0)] long Connector, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(09638150-AA58-453E-9CA2-B0AF3A3F783A),
		dual,
		helpstring("IAplAPI_Option Interface"),
		pointer_default(unique)
	]
	interface IAplAPI_Option : IDispatch
	{
		[id(1), helpstring("method LoadOptionDictionary")] HRESULT LoadOptionDictionary([out, retval] VARIANT* result);
		[id(2), helpstring("method CreateStringOption")] HRESULT CreateStringOption([in] BSTR Name, [in] BSTR Value, [out, retval] VARIANT* result);
		[id(3), helpstring("method CreateNumericOption")] HRESULT CreateNumericOption([in] BSTR Name, [in] long Value, [out, retval] VARIANT* result);
		[id(4), helpstring("method CreateInstanceOption")] HRESULT CreateInstanceOption([in] BSTR Name, [in] long Value, [out, retval] VARIANT* result);
		[id(5), helpstring("method DeleteOption")] HRESULT DeleteOption([in] long Option, [out, retval] VARIANT* result);
		[id(6), helpstring("method FindOption")] HRESULT FindOption([in] BSTR Option, [out, retval] VARIANT* result);
		[id(7), helpstring("method CreateOption")] HRESULT CreateOption([in] BSTR Name, [out, retval] VARIANT* result);
		[id(8), helpstring("method GetStringOption")] HRESULT GetStringOption([in] BSTR Name, [in] BSTR DefaultValue, [out, retval] VARIANT* result);
		[id(9), helpstring("method GetNumbericOption")] HRESULT GetNumbericOption([in] BSTR Name, [in] long DefaultValue, [out, retval] VARIANT* result);
		[id(10), helpstring("method GetInstanceOption")] HRESULT GetInstanceOption([in] BSTR Name, [in] long DefaultValue, [out, retval] VARIANT* result);
		[id(11), helpstring("method LoadOptionsInfo")] HRESULT LoadOptionsInfo([in] long Option, [out, retval] VARIANT* result);
	};

	[
		object,
		uuid(299806DE-EB94-431F-8C9C-D9780E720DD4),
		dual,
		helpstring("IAplMapElement Interface"),
		pointer_default(unique)
	]

	interface IAplLongMap : IDispatch
	{
		[id(1), helpstring("method Add")] HRESULT Add([in] long key, [in] long value, [out, retval] long* result);
		[id(2), helpstring("method Remove")] HRESULT Remove([in] long index, [out, retval] BOOL* result);
		[id(3), helpstring("method Clear")] HRESULT Clear();
		[id(4), helpstring("method GetByIndex")] HRESULT GetByIndex([in] long index, [out] long* key, [out] long* value, [out, retval] BOOL* result);
		[id(5), helpstring("method FindIndexByKey")] HRESULT FindIndexByKey([in] long key, [out, retval] long* result);
		[id(6), helpstring("method GetByKey")] HRESULT GetByKey([in] long key, [out, retval] long* result);
		[id(7), helpstring("method GetByKeyP")] HRESULT GetByKeyP([in] long key, [out, retval] long* result);
		[id(8), helpstring("method Sort")] HRESULT Sort();
		[propget, id(9), helpstring("property AutoSort")] HRESULT AutoSort([out, retval] BOOL *pVal);
		[propput, id(9), helpstring("property AutoSort")] HRESULT AutoSort([in] BOOL newVal);
		[propget, id(10), helpstring("property Size")] HRESULT Size([out, retval] long *pVal);
	};

	[
		object,
		uuid(16B33E03-9C28-48C8-B296-B1727CB0208E),
		dual,
		helpstring("IAplStringMap Interface"),
		pointer_default(unique)
	]
	interface IAplStringMap : IDispatch
	{
		[id(1), helpstring("method Add")] HRESULT Add([in] BSTR key, [in] long value, [out, retval] long* result);
		[id(2), helpstring("method Remove")] HRESULT Remove([in] long index, [out, retval] BOOL* result);
		[id(3), helpstring("method Clear")] HRESULT Clear();
		[id(4), helpstring("method GetByIndex")] HRESULT GetByIndex([in] long index, [out] BSTR* key, [out] long* value, [out, retval] BOOL* result);
		[id(5), helpstring("method SetByIndex")] HRESULT SetByIndex([in] long index, [in] long value, [out, retval] BOOL* result);
		[id(6), helpstring("method FindIndexByKey")] HRESULT FindIndexByKey([in] BSTR key, [out, retval] long* result);
		[id(7), helpstring("method GetByKey")] HRESULT GetByKey([in] BSTR key, [out, retval] long* result);
		[id(8), helpstring("method GetByKeyP")] HRESULT GetByKeyP([in] BSTR key, [out, retval] long* result);
		[id(9), helpstring("method Sort")] HRESULT Sort();
		[propget, id(10), helpstring("property Size")] HRESULT Size([out, retval] long *pVal);
	};


	[
		object,
		uuid(B521DEFC-E1F7-49C8-956B-694CA1E69C99),
		dual,
		helpstring("IAplLoadData Interface"),
		pointer_default(unique)
	]
	interface IAplLoadData : IDispatch
	{
		[id(1), helpstring("method InitAPI")] HRESULT InitAPI([in] long apiClass, [out, retval] VARIANT* result);
		[id(2), helpstring("method AddAQuery")] HRESULT AddAQuery([in] long Index, [in] long Instance, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(3), helpstring("method AddBQuery")] HRESULT AddBQuery([in] long Instance, [in] long Entity, [in] long Attr, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(4), helpstring("method AddBQueryBN")] HRESULT AddBQueryBN([in] long Instance, [in] BSTR EntityName, [in] BSTR AttrName, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(5), helpstring("method AddRQuery")] HRESULT AddRQuery([in] long Index, [in] long Entity, [in] long Attr, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(6), helpstring("method AddRQueryBN")] HRESULT AddRQueryBN([in] long Index, [in] BSTR EntityName, [in] BSTR AttrName, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(7), helpstring("method AddDQuery")] HRESULT AddDQuery([in] long Index, [in] long Attr, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(8), helpstring("method AddDQueryBN")] HRESULT AddDQueryBN([in] long Index, [in] BSTR EntityName, [in] BSTR AttrName, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(9), helpstring("method AddEQuery")] HRESULT AddEQuery([in] long Entity, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(10), helpstring("method AddEQueryBN")] HRESULT AddEQueryBN([in] BSTR EntityName, [in, defaultvalue(FALSE)] BOOL LoadAllAttrs, [out, retval] long* result);
		[id(11), helpstring("method LoadQuery")] HRESULT LoadQuery([out, retval] VARIANT* result);
		[id(12), helpstring("method ClearQuery")] HRESULT ClearQuery([out, retval] VARIANT* result);
		[propget, id(13), helpstring("property ReturnResult")] HRESULT ReturnResult([out, retval] BOOL *pVal);
		[propput, id(13), helpstring("property ReturnResult")] HRESULT ReturnResult([in] BOOL newVal);
		[propget, id(14), helpstring("property AutoClearQueries")] HRESULT AutoClearQueries([out, retval] BOOL *pVal);
		[propput, id(14), helpstring("property AutoClearQueries")] HRESULT AutoClearQueries([in] BOOL newVal);
		[propget, id(15), helpstring("property WaitText")] HRESULT WaitText([out, retval] BSTR *pVal);
		[propput, id(15), helpstring("property WaitText")] HRESULT WaitText([in] BSTR newVal);
		[propget, id(16), helpstring("property LastErrorCode")] HRESULT LastErrorCode([out, retval] long *pVal);
		[id(17), helpstring("method AddUQuery")] HRESULT AddUQuery([in] long FirstIndex, [in] long PrevIndex, [out, retval] long* result);
	};

[
	uuid(4FECFA89-548C-4CC2-8F38-FE9AE225DB71),
	version(1.0),
	helpstring("Apl PSS API Type Library")
]
library APL_PSS_API_Lib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(1729ABEE-D34D-464A-AD8E-39D6D605FAE4),
		helpstring("_IAplAPIEvents Interface")
	]
	dispinterface _IAplAPIEvents
	{
		properties:
		methods:
		[id(1), helpstring("method SendMes")] HRESULT SendMes([in] long mes);
	};


	[
		uuid(96930D00-1B0E-4CBE-BE61-6F2A3F684779),
		helpstring("AplPssAPI Class")
	]
	coclass AplPssAPI
	{
		[default] interface IAplAPI;
		interface IAplAPI_Data;
		interface IAplAPI_Autorization;
		interface IAplAPI_BProcess;
		interface IAplAPI_Category;
		interface IAplAPI_Characteristic;
		interface IAplAPI_Classifier;
		interface IAplAPI_Document;
		interface IAplAPI_Folder;
		interface IAplAPI_Product;
		interface IAplAPI_Workflow;
		interface IAplAPI_Option;
		[default, source] dispinterface _IAplAPIEvents;
	};
	[
		uuid(8D0760E6-4709-48C7-9E35-2BD60799E96E),
		helpstring("AplLongMap Class")
	]
	coclass AplLongMap
	{
		[default] interface IAplLongMap;
	};
	[
		uuid(00EB70F8-AFA5-46AD-ABEB-D6040AC50336),
		helpstring("AplStringMap Class")
	]
	coclass AplStringMap
	{
		[default] interface IAplStringMap;
	};
	[
		uuid(0563A520-0D58-4E2D-B881-8565DE06DD45),
		helpstring("AplLoadData Class")
	]
	coclass AplLoadData
	{
		[default] interface IAplLoadData;
	};
};
