
July 21st, 2005, 02:16 AM
|
|
Registered User
|
|
Join Date: Feb 2005
Posts: 6
Time spent in forums: 19 m 54 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by BloodlustShaman post the code not the link cause poeple like dont know what that site is may have a virus or something so post the code | ehm, the code is 35MB long man, and this isn't an exe file, so u can download it safely and then scan it, and decompress it then scan it again.
EDIT: anyway, here's the code and the error ...
Code:
void CNetworkEnumThread::EnumNetworkDrives(NETRESOURCE *source)
{
NETRESOURCE *networkfolders;
HANDLE hEnum;
DWORD count = -1;
DWORD size = sizeof(NETRESOURCE[20]);
if (WNetOpenEnum(RESOURCE_GLOBALNET, RESOURCETYPE_DISK, 0, source, &hEnum) != NO_ERROR)
return;
networkfolders = new NETRESOURCE[20];
while (::IsWindow(m_hTarget)){
ZeroMemory(networkfolders, sizeof(NETRESOURCE[20]));
if (WNetEnumResource(hEnum, &count, networkfolders, &size) != NO_ERROR)
break;
for (DWORD i = 0; i < count; i++){
if (!::IsWindow(m_hTarget)) // Some people have no patience
break;
if ((networkfolders[i].dwUsage & RESOURCEUSAGE_CONTAINER)==RESOURCEUSAGE_CONTAINER)
EnumNetworkDrives(&networkfolders[i]);
else
::PostMessage(m_hTarget, TM_FOUNDNETWORKDRIVE, 0, (LPARAM)new CString(networkfolders[i].lpRemoteName)); // I realise this is ugly, and am open for suggestions
}
}
WNetCloseEnum(hEnum);
delete[] networkfolders;
}
Code:
emule error LNK2019: unresolved external symbol _WNetCloseEnum@4 referenced in function "private: void __thiscall CNetworkEnumThread::EnumNetworkDrives(struct _NETRESOURCEW *)" (?EnumNetworkDrives@CNetworkEnumThread@@AAEXPAU_NE TRESOURCEW@@@Z)
emule error LNK2019: unresolved external symbol _WNetEnumResourceW@16 referenced in function "private: void __thiscall CNetworkEnumThread::EnumNetworkDrives(struct _NETRESOURCEW *)" (?EnumNetworkDrives@CNetworkEnumThread@@AAEXPAU_NE TRESOURCEW@@@Z)
emule error LNK2019: unresolved external symbol _WNetOpenEnumW@20 referenced in function "private: void __thiscall CNetworkEnumThread::EnumNetworkDrives(struct _NETRESOURCEW *)" (?EnumNetworkDrives@CNetworkEnumThread@@AAEXPAU_NE TRESOURCEW@@@Z)
emule fatal error LNK1120: 3 unresolved externals
|