Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unsigned _stdcall.... implicitly an int?

A function with this signature:

unsigned _stdcall somefunction (LPVOID lParam);

does it mean that it implicitly returns an integer? As unsigned really isn't a value by itself? And _stdcall is a calling convention....

like image 927
Tony The Lion Avatar asked Aug 10 '26 16:08

Tony The Lion


2 Answers

unsigned is a shortcut for unsigned int, so this function returns an unsigned integer.

like image 97
Jack Shainsky Avatar answered Aug 13 '26 06:08

Jack Shainsky


unsigned is a type all by itself and it's the same as unsigned int. Why anyone would ever bother to write unsigned int (especially in type casts where the extra space impairs the human capacity to quickly visually parse an expression with lots of parentheses) is beyond me.

like image 41
R.. GitHub STOP HELPING ICE Avatar answered Aug 13 '26 07:08

R.. GitHub STOP HELPING ICE