C/C++ Datatype Conversion
Posted In:
Win32 API
.
By popo
If you want to use the Win32 API within PowerBuilder, you have to know the prototype modul. The following list is not an exhaustive list of all C and C++ to PowerBuilder Datatype but most of the common Datatype that I've used over the years of interfacing PowerBuilder and C/C++ programs. There are two lists, the first is PowerBuilder to C++ Datatype, useful for the C Proxy Generator. Then there is a list of C/C++ to PowerBuilder Datatype useful for people writing DLL's and the like:
| PowerBuilder Datatype | C/C++ Datatype |
| Blob | PBBlob |
| Boolean | int |
| Character | char |
| Date | PBDate |
| DateTime | PBDateTime |
| Decimal | PBDecimal |
| Double | double |
| Integer | int |
| Real | float |
| String | PBString |
| Time | PBTime |
| UnSignedInteger | unsigned int |
| C/C++ Datatype | PowerBuilder Datatype |
| BOOL | Boolean |
| WORD | UnSignedInteger |
| DWORD | UnSignedLong |
| HANDLE | UnSignedLong |
| HWND | UnSignedLong |
| LPSTR | String Ref |
| LPBYTE | String Ref |
| LPINT | Long Ref |
| char | Blob {1} |
| int | Integer |
| unsigned int | UnsignedInt |
| long | Long |
| ULONG/unsigned long | UnsignedLong |
| double | Double |
| char * | String Ref |