I would make sure that all of the window handles are different - by the sounds of it you are only retrieving the active window's handle, which is not what you want.
Unfortunately I can't help you with code, as I know nothing of VB .NET (I gave you a general explanation), but I can give you these tips:
- Debug and put breakpoints at the point where you get the handles. This way you can check and make sure that they are all unique
- Make sure that the method you are using is the right one
- Check your code!
I hope this helps you in some way... sorry I can't post code, if I could, I would!
gdt_set_gate(5, (unsigned long) &global_tss, sizeof( TSS_t ) + 0xFFFF, 0x89, 0x0F );
http://www.sourceforge.net/projects/mattise - My hobby operating system (Intel, 32-bit only).