C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 20th, 2005, 03:40 PM
os008 os008 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 6 os008 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 54 sec
Reputation Power: 0
Linking Problem!

Hi,
I have this code which i want to compile http://www.ahmedosama.com/files/eMu...ar_v2.6-Src.ace, i solved all the problems i faced, except the remaining 3 errors during Linking, i tried commenting the lines which contain these 3 functions, it worked, but introduced a bug in the program of course, thanks for your help in advance.

NOTE: just open the solution in the root and choose Debug from the profiles, and build it.

Reply With Quote
  #2  
Old July 20th, 2005, 04:49 PM
BloodlustShaman BloodlustShaman is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: in earth
Posts: 176 BloodlustShaman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 12 h 9 m 3 sec
Reputation Power: 4
Send a message via Yahoo to 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

Reply With Quote
  #3  
Old July 21st, 2005, 02:16 AM
os008 os008 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 6 os008 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Linking Problem!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT