[CPP]View PlainCopy
- #include "stdafx.h"
- #include <windows.h>
- Startupinfow StartInfo = {0};
- process_information pi = {0};
- TCHAR Szcommandline[max_path] = TEXT ("C:\\windows\\notepad. EXE d:\\parallel_studio_xe_2013_update4_for_windows.txt ");
- int _tmain (int argc, _tchar* argv[])
- {
- StartInfo. cb = sizeof (startinfo);
- __asm
- {
- Sub RSP, 80
- Lea Rax, Pi
- mov Qword ptr [rsp+72], Rax
- Lea Rax, StartInfo
- mov Qword ptr [rsp+64], Rax
- mov Qword ptr [rsp+56], 0
- mov Qword ptr [rsp+48], 0
- mov Qword ptr [rsp+40], 0
- mov Qword ptr [rsp+32], 0
- Xor R9, R9
- XOR R8, R8
- Lea Rax, Szcommandline
- mov RDX, Rax
- XOR RCX, RCX
- mov rsi, Qword ptr CREATEPROCESSW
- Call RSI
- Add RSP, 80
- }
- //createprocess (0, szcommandline, NULL, NULL, FALSE, 0, NULL, NULL, &startinfo, &PI);
- return 0;
http://blog.csdn.net/zwfgdlc/article/details/17467453
x64 Inline assembly Call API (requires Intel compiler, VC does not support x64 inline assembly)