I recently uprgraded to Visual C++ .NET from 6.0. Things went smoothely for the most part, but the compiler is triggering a warning on something that AFAIK, shouldn't be a problem. Here is the code I tried:
In 6.0 this worked perfectly, but now I'm getting:Code:MYSTRUCT * dvp = (MYSTRUCT *) GetWindowLong(hWnd, GWL_USERDATA);
warning C4312: 'type cast' : conversion from 'LONG' to 'MYSTRUCT *' of greater size
Well, just to make sure I tried a sizeof on LONG, long, MYSTRUCT *, and void *, but they all equalled 4 bytes just as they should. Normally I'd assume this warning could be safely ignored, but I've been experiencing similar warning and weird bugs in builds of one of my programs that I can't attribute to anything else. Can anyone tell me what's causing this problem?



LinkBack URL
About LinkBacks



. Well anyway, I switched which functions I was using but the warnings didn't go away.