zoukankan      html  css  js  c++  java
  • x64内联汇编调用API(需intel编译器,vc不支持x64内联汇编)

    [cpp] view plain copy
     
     在CODE上查看代码片派生到我的代码片
    1. #include "stdafx.h"  
    2. #include <windows.h>  
    3.   
    4. STARTUPINFOW StartInfo  = {0};  
    5. PROCESS_INFORMATION pi = {0};  
    6. TCHAR szCommandLine[MAX_PATH] = TEXT("C:\Windows\NOTEPAD.EXE D:\parallel_studio_xe_2013_update4_for_windows.txt");  
    7.   
    8. int _tmain(int argc, _TCHAR* argv[])  
    9. {  
    10.     StartInfo .cb = sizeof(StartInfo);  
    11.   
    12.     __asm  
    13.     {  
    14.         sub rsp, 80  
    15.         lea rax, pi  
    16.         mov qword ptr [rsp+72], rax  
    17.         lea rax, StartInfo  
    18.         mov qword ptr [rsp+64], rax  
    19.         mov qword ptr [rsp+56], 0  
    20.         mov qword ptr [rsp+48], 0  
    21.         mov qword ptr [rsp+40], 0  
    22.         mov qword ptr [rsp+32], 0  
    23.         xor r9, r9  
    24.         xor r8, r8  
    25.         lea rax, szCommandLine  
    26.         mov rdx, rax  
    27.         xor rcx, rcx  
    28.         mov  rsi, qword ptr CreateProcessW  
    29.         call rsi  
    30.         add rsp, 80  
    31.     }  
    32.     //CreateProcess(0, szCommandLine, NULL, NULL, FALSE, 0, NULL, NULL, &StartInfo, &pi);  
    33.     return 0;  

    http://blog.csdn.net/zwfgdlc/article/details/17467453

  • 相关阅读:
    通过代码获取log4net的文件路径
    关键字后面不加空格
    ASP.NET MVC 4 Content Map
    ASP.NET Overview
    ASP.NET 4 and Visual Studio 2010
    Newtonsoft.Json
    ASP.NET MVC
    log4net
    AutoMapper introduction
    ajax jsonp跨域
  • 原文地址:https://www.cnblogs.com/findumars/p/6345023.html
Copyright © 2011-2022 走看看