# include“ltwrappr.h”
L_INTLAutomation: SetActiveContainer (pLContainer)
集活动自动化容器。
指针指向的LContainer对象引用容器被激活。
| 价值 | 意义 |
|---|---|
| 成功 | 函数是成功的。 |
| < 1 | 一个错误发生。指返回代码。 |
容器被设置必须存在于自动化容器列表。一个容器添加到自动化容器列表,电话LAutomation: AddContainer。
必需的dll和库
这个例子显示了如何设置自动化活跃的容器。
L_INT LAutomation_SetActiveContainerExample (LContainer &lcon, LAutomation &lauto){L_INT nRet;nRet = lauto。IsValid ();如果(成功= = nRet) / *检查的有效性自动化处理* /{nRet = lcon。IsValid ();如果(成功= = nRet) / *检查的有效性容器处理* /{LContainer * pActiveContainer;* / / *获取当前活跃的容器pActiveContainer = lauto.GetActiveContainer ();如果(&lcon ! = pActiveContainer) / *如果的新集装箱不是当前活动* /{/ *设置新活跃的容器* /nRet = lauto。SetActiveContainer (&lcon);如果(nRet ! =成功)返回nRet;}}其他的{返回nRet;}}其他的{返回nRet;}返回成功;}