That's the problem. Despite what the docs say, the completion routine isn't optional. If you set it to NULL, Windows will try and call it which will go bang. My comment about this has been at the bottom of the functions' MSDN page for about two years now. Guess they don't want to, or are unwilling to fix either the docs or the code.All I'm doing in my file io code is calling ReadFileEx with the overlapped struct set, and no completion routine.
- Viewing Profile: Reputation: adeyblue
Community Stats
- Group Members
- Active Posts 150
- Profile Views 2,820
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
#4840834 Overlapped File IO Interfering with Winsock
Posted by adeyblue
on 26 July 2011 - 04:11 PM
#4835061 Trackbar control in Visual C++
Posted by adeyblue
on 13 July 2011 - 06:30 PM
You want to be switching on LOWORD(wParam) instead.http://msdn.microsoft.com/en-us/library/bb760149.aspx#tkb_notifications
The low-order word of the wParam parameter of WM_HSCROLL or WM_VSCROLL contains the notification code. For the TB_THUMBPOSITION and TB_THUMBTRACK notification codes, the high-order word of the wParam parameter specifies the position of the slider.
#4828529 Strange SIGSEGV fault
Posted by adeyblue
on 27 June 2011 - 09:51 PM
LPD3DXEFFECT CreateEffectFromFile(LPDIRECT3DDEVICE9 d3ddev,
LPCTSTR shaderFile, <<---- This here
LPD3DXEFFECT effect,
LPD3DXBUFFER errorLog,
D3DXHANDLE* technique)
Don't put types that can and do change based upon compiler flags in dll interfaces. It's entirely likely that the dll of the non-working version is compiled with UNICODE defined which would make that parameter a "LPCWSTR shaderFile" while the app (which doesn't have UNICODE defined) sees it as "LPCSTR shaderFile". If this is the case then the string being passed to D3DXCreateEffectFromFile is borked and your lack of error checking lets the function blow up dereferencing a NULL/garbage tempEffect variable.
This is probably what ApochPiq was getting at but it's something you need to be aware of even if this isn't your immediate problem.
#4816913 COM, 64 and 32 bit dll at the same time?
Posted by adeyblue
on 28 May 2011 - 03:04 PM
Should be perfectly fine. There are two versions of HKEY_CLASSES_ROOT on 64 bit Windows, the registrations wouldn't overwrite each other. The 32-bit version is accessible under the HKCR\Wow6432Node\ key in regedit.If I built a 64 bit version of the dll, would it be possible to have it registered while the 32 bit version is also registered, and automatically have the correct one loaded, depending on whether the calling process is 64 or 32 bit?
Then the calling app does CoCreateInstance or the .Net equivalent and the loading will hopefully be transparent.
#4785076 Win32 Common Controls !
Posted by adeyblue
on 12 March 2011 - 08:36 PM
- Home
- » Viewing Profile: Reputation: adeyblue

Find content