This is because register eax accepts only long int types:
void OnBnClickedButton1()
{
char buff[256];
char format[] = "%s %s\n";
char hello[] = "Hello";
char world[] = "world";
unsigned int f = (unsigned int)format,
h = (unsigned int)hello,
w = (unsigned int)world,
b = (unsigned int)buff;
__asm
{
mov eax, w
push eax
mov eax, h
push eax
mov eax, f
push eax
mov eax, b
push eax
call sprintf
pop ebx
pop ebx
pop ebx
pop ebx
}
}
Regards.