The following table shows the valid return types:
| Type | Meaning | Equivalent C or Windows type |
|---|---|---|
|
|
Signed byte |
char |
|
|
Unsigned byte |
unsigned char, BYTE |
|
|
Signed integer |
int, short, BOOL |
|
|
Unsigned integer |
unsigned, HANDLE, HGLOBAL, HWND, UINT, WORD |
|
|
Signed long integer |
long, LONG |
|
|
Unsigned long integer |
unsigned long, DWORD |
|
|
Floating point |
float |
|
|
Double-precision floating point |
double |
|
|
Far pointer |
far, LPRECT, LPPOINT |
|
|
Handle to zero-terminated string |
HANDLE containing a zero-terminated string |
|
|
No return value |
void, VOID |
The values that the function returns are converted to one of the function's types. The possible value types are converted as shown in the following table:
| Function return type | Result |
|---|---|
|
|
Sign extended to long integer |
|
|
Promoted to long integer without sign extension |
|
|
Unchanged |
|
|
Promoted to double-precision floating point value |
|
|
Unchanged |
|
|
Cast to long integer |
|
|
String |