LInet::GetItem

#include "ltwrappr.h"

LInet * LInet::GetItem(uIndex)

LInet * LInet::GetItem(phComputer)

L_COMP * phComputer;

/* address of a remote computer handle */

L_UINT uIndex;

/* index of a remote computer */

LInet::GetItem(uIndex) retrieves a pointer to an instance of the remote computer at the specified index in the internal connection list.

LInet::GetItem(phComputer) retrieves a pointer to an instance of the remote computer specified by the given computer handle.

Parameter

Description

phComputer

Pointer to the remote computer handle.

uIndex

Index of a remote computer.

Returns

A pointer to the LInet object that referances the specified remote computer.

Comments

The index is zero-based.

Do not delete the returned class instance pointer.

Required DLLs and Libraries

LTNET

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LInet::ExistsItem, LInet::GetFirstItem, LInet::GetLastItem, LInet::GetNextItem, LInet::GetPrevItem, LInet::GetItemsCount, Class Members

Example

//This is the example for LInet::GetItem(uIndex):
L_INT LInet__GetItemExample_1()
{
   L_INT    nRet;
   LInet    Inet;
   LInet*   plRemote = NULL;
   // other operations
   plRemote = Inet.GetItem(2);
   nRet = Inet.Close(plRemote);
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}
//This is the example for LInet::GetItem(phComputer):
L_INT LInet__GetItemExample_2()
{
   L_INT    nRet;
   LInet    Inet;
   L_COMP*  phComp = NULL;
   LInet*   plRemote = NULL;
   // other operations
   plRemote = Inet.GetItem(phComp);
   nRet = Inet.Close(plRemote);
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}