Thank You Paul,
I tried with below code found on net. I am not sure if I am doing it wrong
or if my device do not support as you mentiond in your reply.
void FindNetworkResource(HWND hWnd)
{
INT nBuffSize = 1024;
TCHAR szRemoteName[256];
DWORD dwScope = RESOURCE_CONTEXT;
NETRESOURCE *NetResource = NULL;
HANDLE hEnum;
WNetOpenEnum( dwScope, NULL, NULL, NULL, &hEnum );
if ( hEnum )
{
DWORD Count = 0xFFFFFFFF;
DWORD BufferSize = 2048;
LPVOID Buffer = new char[2048];
WNetEnumResource( hEnum, &Count, Buffer, &BufferSize );
NetResource = (NETRESOURCE*)Buffer;
char szHostName[200];
for ( unsigned int i = 0; i < BufferSize/sizeof(NETRESOURCE); i++,
NetResource++ )
{
if ( NetResource->dwUsage == RESOURCEUSAGE_CONTAINER &&
NetResource->dwType == RESOURCETYPE_ANY )
{
if ( NetResource->lpRemoteName )
{
lstrcpy (szRemoteName, NetResource->lpRemoteName);
MessageBox (hWnd, szRemoteName, szAppName, MB_OK);
}
}
}
delete Buffer;
WNetCloseEnum( hEnum );
}
}
Pls suggest.
Thank you for your support.
Paul G. Tobey said:
I don't think that there's anything built into the Compact Framework for
that (you should check the help for .NET CF 3.5 -- or whatever version of
the framework your CE5 device has; it could be any one of the three).
WNetEnumResource(), the C API, can be used, if suitable components have
been
included in the Windows CE operating system you're running.
Paul T.