Quantcast
Viewing all articles
Browse latest Browse all 100

Binding C APIs with variable-length structs and UTF-16

Okay, I lied.

I’m deciding - right this instant - that using wmic is cheating too. Oh, it was fair game when we were learning about Windows, but we’re past that now.

We know there’s IPv4 routing tables, and we know network interfaces have indices (yes, they do change when you disable/enable one, so ill-timed configuration changes may make our program blow up).

We also know how to call Win32 APIs directly, and we know that WMI really is more geared toward system administrators than it is toward developers.

There’s no way a query language is the canonical way to retrieve that kind of information. Also, we’ve gone slightly over our crate budget.

Let’s fix that right now.

Viewing all articles
Browse latest Browse all 100

Trending Articles