Win32 API
Win32 API
#winapi
Table of Contents
About
1
Chapter 1: Getting started with Win32 API
2
Remarks
2
Versions
2
Examples
2
Hello World
2
Chapter 2: Ansi- and Wide-character functions
5
Examples
5
Introduction
5
Chapter 3: Dealing with windows
7
Examples
7
Creating a window
7
What is a handle?
10
Constants
10
Windows Types
10
Chapter 4: Error reporting and handling
12
Remarks
12
Examples
12
Introduction
12
Error reported by return value only
12
Error reported with additional information on failure
12
Notes on calling GetLastError() in other programming languages
13
.net languages (C#, VB, etc.)
13
Go
13
Error reported with additional information on failure and success
14
Error reported as HRESULT value
14
Converting an error code into a message string
15
Chapter 5: File Management
17
Examples
17
Create a file and write to it
17
API Reference:
17
Chapter 6: Process and Thread Management
18
Examples
18
Create a process and check its exit code
18
Create a new thread
18
Chapter 7: Utilizing MSDN Documentation
20
Introduction
20
Remarks
20
Examples
20
Types of Documentation Available
20
Finding Documentation for a Feature
20
Using Function Documentation
21
Overview
21
Syntax
21
Parameters
21
Return Value
21
Remarks
21
Examples
21
Requirements
21
Chapter 8: Window messages
23
Syntax
23
Examples
23
WM_CREATE
23
WM_DESTROY
23
WM_CLOSE
24
WM_SIZE
24
WM_COMMAND
25
Chapter 9: Windows Services
27
Examples
27
Check if a service is installed
27
API Reference:
28
Chapter 10: Windows Subclassing
29
Introduction
29
Syntax
29
Parameters
29
Remarks
29
Examples
30
Subclassing windows button control within C++ class
30
Handling common controls notification messages within C++ class
31
Credits
33
About
You can share this PDF with anyone you feel could benefit from it, downloaded the latest version from: win32-api
It is an unofficial and free Win32 API ebook created for educational purposes. All the content is extracted from Stack Overflow Documentation, which is written by many hardworking individuals at Stack Overflow. It is neither affiliated with Stack Overflow nor official Win32 API.
The content is released under Creative Commons BY-SA, and the list of contributors to each chapter are provided in the credits section at the end of this book. Images may be copyright of their respective owners unless otherwise specified. All trademarks and registered trademarks are the property of their respective company owners.
Use the content presented in this book at your own risk; it is not guaranteed to be correct nor accurate, please send your feedback and corrections to info@
1
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.