flat assembler
Message board for the users of flat assembler.
Index
> Windows > wrong hInstance, bad parameters passing,still working? |
Author |
|
Garthower 14 Sep 2006, 07:45
Your question to answer precisely developers of these two OS can only . Most likely it's connected by that kernels of OS of a NT-basis and a 9x-basis very strongly from each other differ, both realization, and internal logic.
|
|||
14 Sep 2006, 07:45 |
|
cod3b453 14 Sep 2006, 11:58
Using invoke GetCommandLine,0 alone cannot raise an error because it's no different from preserving values before you call a function e.g.
Code: mov eax,0 push eax invoke GetCommandLine ;... I'm not entirely sure about how each one handles the stack...but I would have thought excess entries on the stack aren't a problem, but should be avoided. As for XP running with "wrong" hInstance, maybe GetCommandLine returned a valid hInstance value OR XP detects invalid hInstance and uses the calling hInstance |
|||
14 Sep 2006, 11:58 |
|
vid 14 Sep 2006, 12:15
Quote: analyzing the source i found the problem problem is that iczlion teach people not to check for errors returned by API AND, winXP is tolerant against fuckedup'd stack sometimes. And sometimes you procedure entry/exit code looks like this: Code: ;entry push ebp mov ebp, esp sub esp,size_of_locals ;destroy stack push eax ;return code mov esp, ebp pop ebp ret so leaving something on stack is not a problem. That's also why you don't see "add esp, size_of_locals" at end of procedure-you don't need to |
|||
14 Sep 2006, 12:15 |
|
RedGhost 14 Sep 2006, 19:09
the hInstance of your programme is not the command line, it is the handle of your module, which is taught in the iczelion tutorials
Code: xor edx, edx push edx call [GetModuleHandleA] mov [wc.hInstance], eax _________________ redghost.ca |
|||
14 Sep 2006, 19:09 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.