flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
bitRAKE 03 Jan 2014, 06:36
In parent.asm, put brackets around the handle pointers in the WriteFile/ReadFile to use the handles instead of the memory addresses. {Made the same mistake several times myself.} Correct usage in child.asm.
Nice example of pipe usage. |
|||
![]() |
|
tthsqe 03 Jan 2014, 12:33
oops - wish I didn't make that silly mistake. Also, for a 64bit version it seems that
Code: struct SECURITY_ATTRIBUTES
nLength dd ?,?
lpSecurityDescriptor dq ?
bInheritHandle dd ?
ends is the correct structure. Note that nLength takes up 8 bytes. |
|||
![]() |
|
typedef 03 Jan 2014, 12:49
You can still use 32bit api structures on 64bit windows. Your app will run under Wow64
![]() |
|||
![]() |
|
Feryno 03 Jan 2014, 12:51
tthsqe wrote: oops - wish I didn't make that silly mistake. Also, for a 64bit version it seems that I think nLenght takes only 4 bytes also at x64. The redundant dword is for aligning the following pointer (the pointer lpSecurityDescriptor is qword and should be aligned at qword boundary) |
|||
![]() |
|
tthsqe 05 Jan 2014, 01:36
If lpSecutriyDescriptor - nLength = 4, on 64 bit windows 7, the call to CreatePipe fails. If you want to check out CreatePipe, the address of the securtiy attributes get moved to rsi and the second syscall fails.
|
|||
![]() |
|
typedef 05 Jan 2014, 02:55
tthsqe wrote: If lpSecutriyDescriptor - nLength = 4, on 64 bit windows 7, the call to CreatePipe fails. If you want to check out CreatePipe, the address of the securtiy attributes get moved to rsi and the second syscall fails. Also in case you didn't know some APIs that take structures will fail if their memory is not DWORD aligned. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.