I am BATMAN wrote:
Forgive me, this is basically the beginning of my windows C++ programming, up until now it's all been command line linux code. Is there a special way to cast with the win API or something?
Then you need to study beginners material of the language since you need to understand types, structures and unions as well as many, many other things. Trying to explain them to you in a forum is not appropriate.
typedef struct in_addr {
union {
struct { UCHAR s_b1,s_b2,s_b3,s_b4; } S_un_b;
struct { USHORT s_w1,s_w2; } S_un_w;
ULONG S_addr;
} S_un;
The S_addr member of the union is the same type as IPAddr.
//
// IP type definitions.
//
typedef ULONG IPAddr; // An IP address.