im writing a win32 dll and i need a procedure in this format (C++):

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause)

so how can i do this?

why won't this work (fasm):

section '.data' data readable
        msg db "Text",0
section '.code' code readable executable
proc procname mWnd,aWnd,data,parms,show,nopause
    mov [data],msg
    mov eax,3
    ret
endp

; exports declarations...

the equivilient i need to do in C++ is

int __stdcall procname(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause) {
    strcpy(data, "Text");
    return 3;
}

solved, i just imported lstrcpy from kernel32.dll

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.