.
Some times you need information about a workstation, for example if you want to know if
a workstation is not running WindowsNT and you try some NT-specific job without any
chance. I think this pseudo-routine can be helpful.
#include <what_you_need.h>
/*Usually:
#include <lmcons.h>
#include <lmwksta.h>
#include <lmserver.h>
#include <lmerr.h>*/// Network API job – obtain network info about selected machine.
BOOL
_GetWkstaInformation100()
{
LPBYTE lpBuf;
LPCSTR lpcstrWkstaName = (LPCSTR)m_strWkstaName;int iwLength = 2 * (MAX_COMPUTERNAME_LENGTH + 1);
WCHAR lpwWkstaName[2 * (MAX_COMPUTERNAME_LENGTH + 1)];lpwWkstaName[0] = ‘