• 注册
  • 关于作者
    企业认证:趣记站长
    关注 6 粉丝 4 喜欢 9 内容 992
    江西省·南昌市
    聊天 送礼
    • 查看作者
    • 用MASM32编程获取并显示WinRAR的路径 

       ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      ; 文件名: rar_path.asm

      ; 功 能: 获取并显示WinRAR的路径

      ; 作 者: Purple Endurer

      ; 环 境: win 2K pro + masm32 V8

      ; log

      ;------------------------------------------------------------------------------------------

      ; 2006.03.24 创建

      ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

      .386

      .model flat, stdcall

      option casemap:none

      include \masm32\include\windows.inc

      include \masm32\include\Advapi32.inc

      include \masm32\include\kernel32.inc

      include \masm32\include\user32.inc

      includelib \masm32\lib\Advapi32.lib

      includelib \masm32\lib\kernel32.lib

      includelib \masm32\lib\user32.lib

      GetRarPath PROTO :LPSTR

      m_m2m MACRO d1, d2

          push d2

          pop d1

      ENDM

      .data

      g_szTitle       db "WinRAR路径", 0

      g_szRegPath db  "SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WinRAR.exe", 0

      g_szFailRegOpenKeyEx  db "RegOpenKeyEx失败!", 0

      g_szFailRegQueryValueEx db "RegQueryValueEx失败!", 0

      g_szValueName db "Path", 0

      .data?

      g_szRarPath  db 256 dup(?)

      g_hRegKey4IE   HKEY    ?

      .code

      start:

              invoke GetRarPath, ADDR g_szRarPath

              .if eax==1

                  mov eax, OFFSET g_szFailRegOpenKeyEx

              .elseif eax==2

                  mov eax, OFFSET g_szFailRegQueryValueEx

              .else

                  mov eax, OFFSET g_szRarPath

              .endif

              invoke MessageBox, NULL, eax, OFFSET g_szTitle, MB_OK

              invoke ExitProcess,NULL

      GetRarPath PROC lpszRarPath: LPSTR

          LOCAL dwcbData: dword

      ;         LONG RegOpenKey(

      ;             HKEY hKey,    // handle of open key

      ;             LPCTSTR lpSubKey,    // address of name of subkey to open

      ;             PHKEY phkResult     // address of handle of open key

      ;         );

          invoke  RegOpenKey, HKEY_LOCAL_MACHINE, ADDR g_szRegPath, ADDR g_hRegKey4IE

          .if eax!=ERROR_SUCCESS

              m_m2m eax, 1

              ret

          .endif

      ;     LONG RegQueryValueEx(

      ;         HKEY hKey,          // 1.handle of key to query

      ;         LPTSTR lpValueName, // 2.address of name of value to query

      ;         LPDWORD lpReserved, // 3.reserved

      ;         LPDWORD lpType,     // 4.address of buffer for value type

      ;         LPBYTE lpData,      // 5.address of data buffer

      ;         LPDWORD lpcbData    // 6.address of data buffer size

      ;     );

          m_m2m dwcbData, SIZEOF g_szRarPath

          invoke RegQueryValueEx, g_hRegKey4IE, ADDR g_szValueName, NULL, NULL, ADDR g_szRarPath, ADDR dwcbData

          .if eax!=ERROR_SUCCESS

              m_m2m eax, 2

          .else

              xor eax, eax

          .endif

      ; LONG RegCloseKey(

      ;     HKEY hKey     // handle of key to close  

      ; );

          invoke RegCloseKey, g_hRegKey4IE

          ret

      GetRarPath ENDP

      end start  

      JSP开发工具的选择
      基于JSP实现数据库中图片的存储与显示,利用DWR开发基于Ajax的文件上载portlet,解决JSP开发Web程序中文显示三种方法,JSP结合XML+XSLT将输出转换HTML,JSP连接SQL Server 2000系统配置,Java和JSP编程应该注意的六个常见问题,JSP上传图片并生成缩略图,JSP上传图片并生成缩略图,用JSP从数据库中读取图片并显示在网页上,JSP中SQL数据库编程技术,jsp读取大对象CLOB并生成xml文件示例,JSP中读文件和写文件的例子,OpenCms文件导入过程初探,巧用文件保存对象来提高JSP的性能,JSP中日期的用法,JSP数据库连接方式总结,JSP的9种基本内置组件,编写线程安全的JSP程序,其他常见JSP开发环境,关于Java Servlet的Filter 技术
      JSP

    • 0
    • 0
    • 0
    • 96
    • 单栏布局 侧栏位置: