x64 Inline assembly Call API (requires Intel compiler, VC does not support x64 inline assembly)

Source: Internet
Author: User

[CPP]View PlainCopy 
  1. #include "stdafx.h"
  2. #include <windows.h>
  3. Startupinfow StartInfo = {0};
  4. process_information pi = {0};
  5. TCHAR Szcommandline[max_path] = TEXT ("C:\\windows\\notepad.  EXE d:\\parallel_studio_xe_2013_update4_for_windows.txt ");
  6. int _tmain (int argc, _tchar* argv[])
  7. {
  8. StartInfo. cb = sizeof (startinfo);
  9. __asm
  10. {
  11. Sub RSP, 80
  12. Lea Rax, Pi
  13. mov Qword ptr [rsp+72], Rax
  14. Lea Rax, StartInfo
  15. mov Qword ptr [rsp+64], Rax
  16. mov Qword ptr [rsp+56], 0
  17. mov Qword ptr [rsp+48], 0
  18. mov Qword ptr [rsp+40], 0
  19. mov Qword ptr [rsp+32], 0
  20. Xor R9, R9
  21. XOR R8, R8
  22. Lea Rax, Szcommandline
  23. mov RDX, Rax
  24. XOR RCX, RCX
  25. mov rsi, Qword ptr CREATEPROCESSW
  26. Call RSI
  27. Add RSP, 80
  28. }
  29. //createprocess (0, szcommandline, NULL, NULL, FALSE, 0, NULL, NULL, &startinfo, &PI);
  30. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.