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

  • 相关阅读:
    windows8 Metro icon
    JPG高度压缩的图像格式
    windows RT Xamltoolkit
    爸爸和无我编程(Egoless Programming)十条诫律 (转)
    内存优化文章链接
    在 windows 8 下打开字符映射表
    在 windows 8 下安装 windows phone 7.1 SDK 和 zune
    异步线程返回 UI 线程
    工厂模式
    jquery预览本地图片
  • 原文地址:https://www.cnblogs.com/findumars/p/6345023.html
Copyright © 2011-2022 走看看