Click here to Skip to main content
15,891,529 members
Articles / Desktop Programming / Win32

Win32 Programming: Dealing with Variable Size Structs When Making API Calls

Rate me:
Please Sign up or sign in to vote.
4.91/5 (7 votes)
24 Nov 2022MIT6 min read 6.2K   8  
When calling into the win32 API, there are many times when you must deal with structures that have a variable size. This article shows how to do that in a convenient way.
When calling into the win32 API, there are many times when you must deal with structures that have a variable size. This can require a lot of manual programming and memory management. Using C++ and template programming, it is possible to make this process much less painless and safer.

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Software Developer
Belgium Belgium
I am a former professional software developer (now a system admin) with an interest in everything that is about making hardware work. In the course of my work, I have programmed device drivers and services on Windows and linux.

I have written firmware for embedded devices in C and assembly language, and have designed and implemented real-time applications for testing of satellite payload equipment.

Generally, finding out how to interface hardware with software is my hobby and job.

Comments and Discussions