The folowing C/C++ types are supported
- short, int, long, longlong and their signed/unsigned versions
- char, wchar_t - character types
- double, float
- void - return type for procedures
For structs/unions the packing attribute can be specified. See the reference.
- struct - a record of fields of any type
- union - a struct whose fields share the same memory.
- pointer to type (*)
- reference to type (&)
For functions and function pointers a few attributes are supported. See the reference.
- external function prototype
- pointer to function (callback).
A developer can declare any custom C type using one or more C typedef operators separated by ";" and
passed as a string to n_pi_core.of_declare(), as follows:
typedef void *LPCITEMIDLIST, *LPITEMIDLIST; &
typedef int (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData); &
The most widely used WinAPI types are predeclared in PBInvoke.
TCHAR, TSTR, LPTSTR, LPCTSTR, WCHAR, WSTR, LPWSTR, LPCWSTR, CHAR, STR, LPSTR, LPCSTR, BYTE,BOOL, HWND, HINSTANCE,
LPBOOL, INT, UINT, UINT_PTR, DWORD, LPDWORD, HANDLE, LRESULT, LONG, ULONG, WPARAM, LPARAM, HMODULE, HHOOK,
WORD, LPWORD, SHORT, USHORT, VOID, PVOID, LPVOID, LPCVOID, FLOAT, LPSECURITY_ATTRIBUTES
Double, float as a return type for callbacks. However pointers to such types are supported as a return type.
Any struct of size of more than 4 bytes as a return type for any function.
However pointers to such structures are supported as a return type.
Structures inherited from other structures.
Handling strings (char*, wchar_t*)
Handling TCHAR and TSTR. Unicode/ANSI function name suffixes
WinAPI constants and types
Working with C/C++ structures/unions
Working with callbacks
Unsupported and unimplemented PBInvoke features