assembly 未定义符号:crt__开始_s

1tu0hz3e  于 2023-02-04  发布在  其他
关注(0)|答案(1)|浏览(110)

我得到一段代码:

push    0Ah             ; Radix
            push    2               ; fSizeInWords
            lea     eax, [ebp+DstBuf]
            and     dword ptr [ebp+DstBuf], 0
            push    eax             ; DstBuf
            push    7
            pop     ecx
            xor     edx, edx
            mov     eax, ebx
            div     ecx
            push    edx             ; Val
            call    _itow_s

将_itow_s更改为crt__itow_s后,报告了错误:未定义符号:在msvcrt.lib中有_itow_s吗?如何在masm32中传递_itow_s函数。

i2byvkas

i2byvkas1#

我更改为LoadLibrary方法

LibName       db "ntdll.dll",0
ProcName      db "_itow_s",0

                ...
                push    0Ah             ; Radix
                push    2               ; fSizeInWords
                lea     eax, [ebp+DstBuf]
                and     dword ptr [ebp+DstBuf], 0
                push    eax             ; DstBuf
                push    7
                pop     ecx
                xor     edx, edx
                mov     eax, ebx
                div     ecx
                push    edx             ; Val
                ;call    _itow_s
                invoke LoadLibrary,ADDR LibName
                invoke GetProcAddress,eax,ADDR ProcName
                call    eax

相关问题