|
|
|
Поиск компов в сети ...
|
|||
|---|---|---|---|
|
#18+
Извините что уже задавал этот вопрос, но всё же ответ, хотелось бы на него услышать ... Каким способом можно найти компьютеры в сети, а точнее их имена сервера ? И вывести их имена в список например ? Прошу вас господа ответить как можно подробнее PLEASE. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.12.2005, 00:55 |
|
||
|
Поиск компов в сети ...
|
|||
|---|---|---|---|
|
#18+
А точнее , вам компутеры , или тока сервера ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 25.12.2005, 16:03 |
|
||
|
Поиск компов в сети ...
|
|||
|---|---|---|---|
|
#18+
JibSkeart --------- Найти нужно все машины подключенные к сети, например: 31_3 или MISHA. Прошу вас, пожалуйста ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 26.12.2005, 00:58 |
|
||
|
Поиск компов в сети ...
|
|||
|---|---|---|---|
|
#18+
Это я нашёл здесь на форуме: Lelikk BOOL WINAPI EnumerateFunc(HWND hwnd, HDC hdc, LPNETRESOURCE lpnr) { DWORD dwResult, dwResultEnum; HANDLE hEnum; DWORD cbBuffer = 16384; // 16K is a good size DWORD cEntries = -1; // enumerate all possible entries LPNETRESOURCE lpnrLocal; // pointer to enumerated structures DWORD i; // // Call the WNetOpenEnum function to begin the enumeration. // dwResult = WNetOpenEnum(RESOURCE_GLOBALNET, // all network resources RESOURCETYPE_ANY, // all resources 0, // enumerate all resources lpnr, // NULL first time the function is called &hEnum); // handle to the resource if (dwResult != NO_ERROR) { // // Process errors with an application-defined error handler. // NetErrorHandler(hwnd, dwResult, (LPSTR)"WNetOpenEnum"); return FALSE; } // // Call the GlobalAlloc function to allocate resources. // lpnrLocal = (LPNETRESOURCE) GlobalAlloc(GPTR, cbBuffer); if (lpnrLocal == NULL) return FALSE; do { // // Initialize the buffer. // ZeroMemory(lpnrLocal, cbBuffer); // // Call the WNetEnumResource function to continue // the enumeration. // dwResultEnum = WNetEnumResource(hEnum, // resource handle &cEntries, // defined locally as -1 lpnrLocal, // LPNETRESOURCE &cbBuffer); // buffer size // // If the call succeeds, loop through the structures. // if (dwResultEnum == NO_ERROR) { for(i = 0; i < cEntries; i++) { // Call an application-defined function to // display the contents of the NETRESOURCE structures. // DisplayStruct(hdc, &lpnrLocal ); // If the NETRESOURCE structure represents a container resource, // call the EnumerateFunc function recursively. if(RESOURCEUSAGE_CONTAINER == (lpnrLocal.dwUsage & RESOURCEUSAGE_CONTAINER)) if(!EnumerateFunc(hwnd, hdc, &lpnrLocal)) TextOut(hdc, 10, 10, "EnumerateFunc returned FALSE.", 29); } } // Process errors. // else if (dwResultEnum != ERROR_NO_MORE_ITEMS) { NetErrorHandler(hwnd, dwResultEnum, (LPSTR)"WNetEnumResource"); break; } } // // End do. // while(dwResultEnum != ERROR_NO_MORE_ITEMS); // // Call the GlobalFree function to free the memory. // GlobalFree((HGLOBAL)lpnrLocal); // // Call WNetCloseEnum to end the enumeration. // dwResult = WNetCloseEnum(hEnum); if(dwResult != NO_ERROR) { // // Process errors. // NetErrorHandler(hwnd, dwResult, (LPSTR)"WNetCloseEnum"); return FALSE; } return TRUE; } Но к сожалению так и не разобрался. Какой header нужен для NetErrorHandler ? Help people ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.12.2005, 00:14 |
|
||
|
Поиск компов в сети ...
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 27.12.2005, 07:30 |
|
||
|
|

start [/forum/topic.php?fid=57&msg=33458522&tid=2032198]: |
0ms |
get settings: |
10ms |
get forum list: |
16ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
46ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
53ms |
get tp. blocked users: |
2ms |
| others: | 298ms |
| total: | 444ms |

| 0 / 0 |
