Win32 API Data Type Naming Conventions Guide

I'm new to programming with the Win32 API, and I'm still used to the prefix / suffix type naming conventions. Although Google and a little common sense usually explain what the prefix refers to, it would be nice if there was one (relatively) short guide to explain them. Does anyone know about this resource?

And on the corresponding note, what does the prefix '_' (underscore) mean with a variable? Does this underscore have a name other than "underscore"?

+3
source share
3 answers

The naming convention is called Hungarian notation, as mentioned by others. Since you are not familiar with this and are likely going to use it, it is worth mentioning that there are two main options for Hungarian:

  • variable prefix with type code
  • variable prefix with usage code

The difference is visible when, for example, int is used to describe the number of bytes in certain lines. The first will use nLen, that is, the variable is int. In the future, cbLen will be used, that is, the variable counts bytes (unlike cchLen, which counts characters). Give this article should give you a better explanation.

- , . , . - , , .

+3

Win32 API

+1

He called the Hungarian Wikipedia notation contains some information about this, and there is something on MSDN.

+1
source

Source: https://habr.com/ru/post/1718746/


All Articles