  | 
				
				Cheat Engine The Official Site of Cheat Engine   
				
 
				 | 
			 
		 
		 
	
		| View previous topic :: View next topic   | 
	 
	
	
		| Author | 
		Message | 
	 
	
		oib111 I post too much
  Reputation: 0
  Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
  | 
		
			
				 Posted: Tue Jan 20, 2009 8:23 pm    Post subject: Linking Error | 
				       | 
			 
			
				
  | 
			 
			
				I'm trying to make a file transfer system and I'm relying on TransmitFile until I can code my own file transfer function, but I ran into a snag. I got this error:
 
 
 	  | Quote: | 	 		  
 
------ Build started: Project: IBIM Transfer, Configuration: Debug Win32 ------
 
Compiling...
 
main.cpp
 
c:\documents and settings\oib\my documents\visual studio 2008\projects\ibim transfer\ibim transfer\main.cpp(91) : warning C4715: 'WindowProcedure' : not all control paths return a value
 
Linking...
 
main.obj : error LNK2019: unresolved external symbol _TransmitFile@28 referenced in function "long __stdcall WindowProcedure(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProcedure@@YGJPAUHWND__@@IIJ@Z)
 
C:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\IBIM Transfer\Debug\IBIM Transfer.exe : fatal error LNK1120: 1 unresolved externals
 
Build log was saved at "file://c:\Documents and Settings\OIB\My Documents\Visual Studio 2008\Projects\IBIM Transfer\IBIM Transfer\Debug\BuildLog.htm"
 
IBIM Transfer - 2 error(s), 1 warning(s)
 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
 | 	  
 
 
EDIT:
 
 
I fixed it by adding this line:
 
 
 	  | Code: | 	 		  
 
#pragma comment (lib, "Mswsock.lib")
 
 | 	  
 
 
But now it's not drawing my window (it draws all the controls, but not the window itself) and you can't do anything, you just get stuck with that I-cursor thingy, and you can only move it, you can't click anything   
 _________________
  
 
 
 	  | 8D wrote: | 	 		  
 
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing | 	 
  | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		nwongfeiying Grandmaster Cheater
  Reputation: 2
  Joined: 25 Jun 2007 Posts: 695
 
  | 
		
			
				 Posted: Tue Jan 20, 2009 8:43 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				| Win32 GUI coding makes my head hurt too.
 | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		BanMe Master Cheater
  Reputation: 0
  Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
  | 
		
			
				 Posted: Tue Jan 20, 2009 9:51 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				what kinda answer is gui coding makes my head hurt.. code gui's in ASM to make ur head hurt.. wtf.. useless..
 
 
oib111 we would need to see the code to the GUI to actually help you..
 
 
(if you havent realized we need code to help... by now..) xD
 
 
jk jk    
 
 
regards BanMe
 | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		oib111 I post too much
  Reputation: 0
  Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
  | 
		
			
				 Posted: Tue Jan 20, 2009 9:52 pm    Post subject:  | 
				       | 
			 
			
				
  | 
			 
			
				Do you want the EP (WinMain) or just WM_CREATE?
 
 
EDIT: 
 
 
Here's WM_CREATE:
 
 
 	  | Code: | 	 		  
 
case WM_CREATE:
 
         hWnd = hwnd;
 
         HWND hOpen, hSend, hFile;
 
         HDC dc;
 
         LONG lfHeight;
 
         HFONT hfFont;
 
 
         dc = GetDC(NULL);
 
         lfHeight = -MulDiv(10, GetDeviceCaps(dc, LOGPIXELSY), 72);
 
         hfFont = CreateFont(lfHeight, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "Arial");
 
 
         hFile = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD | WS_VISIBLE | ES_READONLY | ES_AUTOHSCROLL, 10, 10, 200, 20, hwnd, (HMENU)IDC_FILE_EDIT, GetModuleHandle(NULL), NULL);
 
         hOpen = CreateWindowEx(NULL, "BUTTON", "Select File", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 217, 10, 70, 20, hwnd, (HMENU)IDC_OPEN_BUTTON, GetModuleHandle(NULL), NULL);
 
         hSend = CreateWindowEx(NULL, "BUTTON", "Send File", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, 10, 37, 277, 30, hwnd, (HMENU)IDC_SEND_BUTTON, GetModuleHandle(NULL), NULL);
 
         SendMessage(hFile, WM_SETFONT, (WPARAM)hfFont, NULL);
 
         SendMessage(hOpen, WM_SETFONT, (WPARAM)hfFont, NULL);
 
         SendMessage(hSend, WM_SETFONT, (WPARAM)hfFont, NULL);
 
         break;
 
 | 	  
 _________________
  
 
 
 	  | 8D wrote: | 	 		  
 
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing | 	 
  | 
			 
		  | 
	 
	
		| Back to top | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
	 
	    
	   | 
	
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
  | 
   
 
		 |