bstrleft.asm
来自「这是一个数字图像处理的matlab仿真程序」· 汇编 代码 · 共 47 行
ASM
47 行
;-------------------------------------------------------------------------------
;
; bstrLeft procedure
;
; Copyright (c) 2/28/01 Ernest Murphy
;
; For educational use only. Any commercial re-use only by written license
;
; useage prototype:
;
; invoke bstrLeft, bstrSource, dwCCount, ADDR bstrReturn
;
; Description: extracts the first dwCCount characters from bstrSource,
; and returns it in *bstrName
;
;-------------------------------------------------------------------------------
.NOLIST
.386
.model flat, stdcall
option casemap:none ; case sensitive
;-------------------------------------------------------------------------------
include bstrLib.inc
include \masm32\include\oleaut32.inc
;-------------------------------------------------------------------------------
.LISTALL
.code
;-------------------------------------------------------------------------------
bstrLeft PROC PUBLIC bstrSource:DWORD, dwCCount:DWORD, pbstrReturn:DWORD
LOCAL len:DWORD
; get length of target
invoke SysStringLen, bstrSource
mov len, eax
; check start param
.IF dwCCount > eax
; adjust the count
mov dwCCount, eax
.ENDIF
invoke SysReAllocStringLen, pbstrReturn, bstrSource, dwCCount
; return retval from SysReAllocStringLen
ret
bstrLeft ENDP
;-------------------------------------------------------------------------------
END
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?