Converts from OI numbers into Win32 binary types
The equivalent Win32 datatype represented by the OI value.
|Value||The OI value|
|Type||The Win32 type|
Some APIs require developers to pass INTs, FLOATs, and other WIn32 datatypes, which means we can't simply pass an OI number. This method makes it easy to take any OI variable containing a numerical string and convert it into its Win32 equivalent. All you have to do is specify the Win32 datatype you are after. The following types are available for us in the Type parameter:
|16-Bit Signed Integer||"WORD", "SHORT", or "INT16"|
|16-Bit Unsigned Integer||"UWORD", "USHORT", or "UINT16"|
|32-Bit Signed Integer||"LONG", "INT", or "INT32"|
|32-Bit Unsigned Integer||"ULONG", "UINT", "DWORD", or "UINT32"|
|64-Bit Signed Integer||"LONGLONG", or "INT64"|
|64-Bit Unsigned Integer||"ULONGLONG", or "UINT64"|
The best example is when sending data on a socket, which often pass these kinds of data types. In this example, the length of an string is sent first as a 32-bit integer, so we have to convert into a Win32 value before passing it into SRP_TcpClient.