We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1086 - SDL crashes when creating a window on Windows XP
Summary: SDL crashes when creating a window on Windows XP
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Windows (XP)
: P2 critical
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
: 1084 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-31 14:34 UTC by John Wilson
Modified: 2011-02-16 04:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Wilson 2010-12-31 14:34:05 UTC
SDL tries to grab some functions from user32.dll

data->userDLL = LoadLibrary(TEXT("USER32.DLL"));
if (data->userDLL) {
	data->CloseTouchInputHandle = (BOOL (WINAPI *)( HTOUCHINPUT )) GetProcAddress(data->userDLL, "CloseTouchInputHandle");
	data->GetTouchInputInfo = (BOOL (WINAPI *)( HTOUCHINPUT, UINT, PTOUCHINPUT, int )) GetProcAddress(data->userDLL, "GetTouchInputInfo");
	data->RegisterTouchWindow = (BOOL (WINAPI *)( HWND, ULONG )) GetProcAddress(data->userDLL, "RegisterTouchWindow");
}

On Windows XP, these functions do not exist in user32.dll, so when SDL tries to call one of them, it calls a null pointer and crashes.

/* Enable multi-touch */
videodata->RegisterTouchWindow(hwnd, (TWF_FINETOUCH|TWF_WANTPALM));
Comment 1 Sam Lantinga 2011-01-04 00:35:29 UTC
This is fixed, thanks!
http://hg.libsdl.org/SDL/rev/6546eaa20271
Comment 2 Sam Lantinga 2011-02-16 04:06:16 UTC
*** Bug 1084 has been marked as a duplicate of this bug. ***