C language > Beginner questions

Where to look up info for using C with win32 API?

(1/2) > >>

MadMage999:
Hello, I am trying to work with the win32 API in C using Pelles C 8.0.

The problem I seem to be having is most of the documentation I come across is meant for C++ or C#.

Where is a good place to look up how to use the win32 API with C?

I apologize if this has been answered, but maybe you could point me to the answer?

Many thanks.

frankie:
Windows has evolved (or involuted?  ;D) and the old good base API set, while still there, has been wrapped in classes.
But the heart of the OS is always plain C (and will never be anything else).
Now it is designed as Universal Windows Platform API's, or UWP.
You'll find complete list of available API's here, but to start windows programming is better to refer to the tutorials that you can find on this site or googling around.

MadMage999:
Thanks for the reply! I'm not sure what you mean about the UWP, but looking around the Pelles C site, I did indeed find some resources to try.

Besides some tutorials, I also found AutoC, which I may use to generate some C code and examine what it does.

Vortex:
Hi Frankie,

For today, the core of the OS is coded with C. In the future, it will be not a surprise to see another language underneath partnering with C :

https://en.wikipedia.org/wiki/Singularity_%28operating_system%29

frankie:
Hello Vortex,
What MS was trying to do was to use managed code for its OS.
There is a race out there for code safety, and each protection leads to the discovery of a new way to attack systems.
The project you mention should be roughly 10 years old, and the vulnerabilities it would have protect have been broke by new ones exploited form the tool intented to solve the problem the Hypervisor. Have a look to this blackhat report. In any case the very inner base of the project is a C and assembler glue that runs the whole code: executive, drivers and user code. A kind of an hidden OS, written in C, that runs the whole.
Yes the old buffer overflow, the real Achille's heel of C, has almost disappeared in its traditional form (see the return attack), but new problems come everyday to the horizon.
The UEFI to enlist one would solve all malicious code backdoor problems, but opened a wide doorway to other attacks, as the hypervisor attacks or hosted code (hackers and governments really appreciated it), but in any case the very real core of UEFI and all user API's are in pure C.

Navigation

[0] Message Index

[#] Next page

Go to full version