I'm trying win2000 and I have few problems with it, mainly I can't launch my progs, even if I recompil them. The compilation is Ok, link too. I just have a access memory violation error message when the prog is launch. If someone could help me about win2000 - win9x compability ... Thanks Papaow
Posted on 2000-11-10 13:35:00 by Papaow
Win 2000 is NT, several api are different, you could check them if you source is not too long. If it hangs at load time, first check the concerned api calls in your app before user does anything. If you find nothing at all, try to compile a very simple simple app >>> if it still hang some of your tools is wrong. There are several difference between the 2 families of Win versions (95..... /// NT....) at PE structure point of vue (the first family is more flexible). Do some test and repost a question is unsolved. betov.
Posted on 2000-11-10 15:49:00 by Betov
I know it's not directly relevant, since you're getting an access violation, but you may be interested to know (if you don't already) that Win2000 traps "privileged" instructions, such as sti, cli, in. If you try to run code containing these instructions, you'll get a "privileged instruction error", which is very irritating. Most high-level asm programmers won't use these instructions, but they are popular with traditional asm programmers. Seems that Microsoft is further restricting our ability to control our machines.
Posted on 2000-11-10 19:30:00 by AlanMason
Also in win2k you should not use GlobalAlloc with the GMEM_FIXED flag. You must use GMEM_MOVEABLE and lock the memory if you need to access it. You can't access GMEM_FIXED directly because it doesn't like the security aspects. Also with file handling you need to set up a security descriptor structure I believe. I forget but look up th eAPI you use (ex: CreateFileEx) and it'll tell you notes about Win9x and NT, treat it like NT. See ya, Ben P.S. betov is right, try compiling the simplest app, like the template that comes with masm, then test that.
Posted on 2000-11-28 23:08:00 by cyberben
you must preserver esi,edi,ebx ... but "pushad/popad" sounds good too. you can not use 'cli,sti... etc'. Use API !!! and problems will dissapears.
Posted on 2001-02-16 19:39:00 by Unknow
I had practically the same problem. Don't forget to include 'uses ebx ecx edi esi' in declaration of each window or dialog processing procedure. Also do not use non-dword aligned stack access.
Posted on 2001-02-21 12:47:00 by IGosha
Hi cyberben, On win2k adv. server I have no problem with the FIXED flag .? Also I do not need to use a security desc. on CreateFile.? I'm logged in as an admin. Do you test it ? What kind of error do you get ? so long Test
Posted on 2001-03-05 14:33:00 by Test Department
Hi, One of my apps did not work on win2k. I finaly fpund the reason. I had set the direction flag for string search (STD). Reseting it like this solved the problem. STD REP SCASB CLD
Posted on 2001-03-06 04:15:00 by KetilO
cyberben,
Also in win2k you should not use GlobalAlloc with the GMEM_FIXED flag. You must use GMEM_MOVEABLE and lock the memory if you need to access it. You can't access GMEM_FIXED directly because it doesn't like the security aspects.
Why use GlobalAlloc at all? It's a 16 bit leftover which calls HeapAlloc. James This message was edited by jcfuller, on 3/6/2001 8:22:10 AM
Posted on 2001-03-06 08:21:00 by jcfuller