ITcPlcLibraryManager::AddLibrary
Adds a library or placeholder reference to the current project (transaction) and then forces a project reload.
Signature
HRESULT AddLibrary([in] BSTR bstrLibName, [in, defaultvalue(L"")] BSTR bstrVersion, [in, defaultvalue(L"")] BSTR bstrCompany);
Parameter
|
Name |
Type |
Description |
|---|---|---|
|
bstrLibName |
BSTR |
[in] Name of the library. |
|
bstrVersion |
BSTR |
[in, defaultvalue("")] Version (empty = latest/managed). |
|
bstrCompany |
BSTR |
[in, defaultvalue("")] Distributor/company. |
Return value
|
Name |
Type |
Description |
|---|---|---|
|
(HRESULT) |
HRESULT |
|
Error codes
-
DanglingAdapterException: Adapter not connected. -
SysManAutomationException(…, TSM_E_ITEMNOTFOUND): Managed/default library not found. -
ArgumentException: Library or placeholder is already included.