Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Linking Error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
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?

PostPosted: Tue Jan 20, 2009 8:23 pm    Post subject: Linking Error Reply with quote

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 Confused

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
nwongfeiying
Grandmaster Cheater
Reputation: 2

Joined: 25 Jun 2007
Posts: 695

PostPosted: Tue Jan 20, 2009 8:43 pm    Post subject: Reply with quote

Win32 GUI coding makes my head hurt too.
Back to top
View user's profile Send private message
BanMe
Master Cheater
Reputation: 0

Joined: 29 Nov 2005
Posts: 375
Location: Farmington NH, USA

PostPosted: Tue Jan 20, 2009 9:51 pm    Post subject: Reply with quote

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 Wink

regards BanMe
Back to top
View user's profile Send private message MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Tue Jan 20, 2009 9:52 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites