http://msdn.microsoft.com/en-us/library/windows/desktop/ms63...
where the window system makes a callback including a pointer lpCreateParams whose type depends on what you did earlier while creating a window. Deputy can't possibly know whether you're using that pointer in a typesafe way, it just has to believe every TRUSTED cast you make, any of which could be wrong (and some surely will).
If you want to say that's bad API design, I wouldn't argue, but I found that kind of thing to be normal in C, and the massive reinvestment in getting rid of all code like that might as well include switching to a language that doesn't create these problems.