Posted March 24, 200817 yr I am wondering how to use wsprintf in asm... when I doinvoke wsprintf,bufOutput,concat,string1,string2masm spits out some weird code...bufOutput is a 400h byte buffer, concat is "%s%s" , and string1 and string2...
March 24, 200817 yr You need to use addresses. i.e.: invoke wsprintf, addr bufOutput, addr concat, addr string1, addr string2 Or you could use : invoke lstrcat, addr string1, addr string2 invoke lstrcpy, addr bufOutput, addr string 1 Hope that helps mate
March 24, 200817 yr also pay attention to the fact that its a c style api, NOT stdcall like 99.9% of the other windows api's, so YOU have to balance the stack after calling it... (add esp, (4* amount_of_parameters_passed)...
March 24, 200817 yr Actually by using the INVOKE directive, MASM should correctly handle the stack balancing (the wsprintf prototype in MASM32 uses the C calling convention).But if you push the parameters manually and use CALL , then what evlncrn8 said applies.
March 25, 200817 yr Author After your last few questions I'm intrigued as to what you are coding you'll see soon
Create an account or sign in to comment