Esto es una prueba de CSS
Todo este contenido pertenece a https://caiorss.github.io/C-Cpp-Notes/WindowsAPI-cpp.html#org137a523
Entonces, el problema ahora es como le corto el blog para ir comentando en apartados
dfadfs
1.7 WinAPI C Data Types
1.7.1 Hungarian Notation
Windows API uses the Hungarian notation which was intruduced by Charles Simonyi at Microsoft and Xerox PARC. This notation uses a prefix to denote the variable type.
Notes and remarks:
- Many sources advises against this notation and nowadays many IDEs can provide a variable type by just hovering the mouse over it.
- Understanding the notation can help to reason about the Windows API.
- The HN notation is not standardized.
Form:
TYPE-PREFIX + NAME + QUALIFIER
| Prefix | Type | Description | Variable Name Example |
|---|---|---|---|
| b | BYTE or BOOL | boolean | BOOL bFlag; BOOL bIsOnFocus |
| c | char | Character - 1 byte | char cLetter |
| w | WORD | word | |
| dw | DWORD | double word | |
| i | int | integer | int iNumberOfNodes |
| u32 | unsigned [int] | unsigned integer | unsigned u32Nodes |
| f or fp | float | float point - single precision | fInterestRate |
| d | double | float point - double precision | dRateOfReturn |
| n | short int | ||
| sz | char* or const char* | Pointer to null terminated char array. | char* szButtonLabel |
| H | HANDLE | Handle | HANDLE hModule; HMODULE hInstance; |
| p | - | Pointer | double* pdwMyPointer; |
| lp | - | Long Pointer | int* lpiPointer; |
| fn | - | Function pointer | |
| lpsz | Long Pointer | ||
| LP | Long Pointer | ||
| I | - | Interface (C++ interface class) | class IDrawable … |
| S | - | Struct declaration | struct SContext { … } |
| C | - | Class declaration | class CUserData{ … } |
| m_ | - | Private member variable name of some class | m_pszFileName |
| s_ | - | Static member of a class | static int s_iObjectCount |
Examples in Windows API - Function Create Process:
BOOL <span class="org-type" style="color:rgb(18,255,237);">WINAPI</span> <span class="org-function-name" style="color:rgb(91,161,207);">CreateProcess</span><span class="org-rainbow-delimiters-depth-1" style="color:rgb(112,113,131);">(</span>
_In_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPCTSTR</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpApplicationName</span>, <span class="org-comment-delimiter" style="color:rgb(141,141,132);">// </span><span class="org-comment" style="color:#90EE90;font-style:italic;font-weight:bolder;">const char*</span>
_Inout_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPTSTR</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpCommandLine</span>, <span class="org-comment-delimiter" style="color:rgb(141,141,132);">// </span><span class="org-comment" style="color:#90EE90;font-style:italic;font-weight:bolder;">char*</span>
_In_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPSECURITY_ATTRIBUTES</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpProcessAttributes</span>,
_In_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPSECURITY_ATTRIBUTES</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpThreadAttributes</span>, <span class="org-comment-delimiter" style="color:rgb(141,141,132);">// </span>
_In_ <span class="org-type" style="color:rgb(18,255,237);">BOOL</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">bInheritHandles</span>,
_In_ <span class="org-type" style="color:rgb(18,255,237);">DWORD</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">dwCreationFlags</span>,
_In_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPVOID</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpEnvironment</span>,
_In_opt_ <span class="org-type" style="color:rgb(18,255,237);">LPCTSTR</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpCurrentDirectory</span>,
_In_ <span class="org-type" style="color:rgb(18,255,237);">LPSTARTUPINFO</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpStartupInfo</span>,
_Out_ <span class="org-type" style="color:rgb(18,255,237);">LPPROCESS_INFORMATION</span> <span class="org-variable-name" style="color:#00BFFF;font-weight:bolder;">lpProcessInformation</span>
<span class="org-rainbow-delimiters-depth-1" style="color:rgb(112,113,131);">)</span>;
- dwCreationFlags => (dw) prefix Indicates that the variable is a DWORD (int)
- lpEnvironment => (lp - Long Pointer) Indicates that variable is a void pointer => (LPVOID = void* )
- lpApplicationName => Indicates that the variable is a pointer to char or (LPCSTR = const char*)
Esta parte de la documentación presenta problemas de formato y no sé por qué se pone el bloque
Furthere Reading:
- Coding Conventions: The Hungarian Notation
- Why I prefer to use the Hungarian Notation
- Hungarian Notation
- Just Say mNo to Hungarian Notation - Jake Wharton
- Hungarian Notation
- Hungarian Notation
Esto es un parrafado pegado
Creo que parece que se corta, pero estoy dentro del bloque todavía
Los formatos son amplios en este tipo de blog, pero a pesar de eso también parece que hay limitaciones para el formateo, y no parece tampoco que haya una forma de revertirlo
1.7.2 General Terminology
- Handle - Is a unsigned integer number assigned to processes, windows, buttons, resources and etc. Actually, it is an opaque pointer to some system data structure (Kernel Object), similar to Unix's file descriptor pointer. The purpose of using handles or opaque pointer is to hide the implementation of those data structures allowing implementators to change their inner working without disrupting application developers. This approach gives a pseudo object-oriented interface to the Windows API. See also:
- Note: A handle can be an obfuscated pointer exposed as an integer, void pointer void* (also opaque pointer) or ordinary opaque pointer (pointer to a C-struct or class which implementation is not exposed).

- Types of Kernel Objects (Handle is a numeric value related to the pointer to kernel object C-struct). The name "object" comes from the idea that it is possible to access the kernel data structure pointer by the handle using the Win32 API functions. It works in a similar way to classical object oriented programming where the data structure and internal representation can only be accessed by the class methodos.
- Symbolic Link
- Process
- A running program, executable. A process has its own address space, data, stack and heap.
- Job
- Group of processes managed as group.
- File
- Open file or I/O device.
- Token
- Security token used by many Win32 functions.
- Event
- Synchronization object used for notification.
- Threads
- Smallest unit of execution within a process.
- Semaphore
- Mutex
- Timer
- Object which provides notification after a certain period is elapsed.
References:
- Opaque pointer - Wikipedia - Note: Opaque pointer is also called "handle classes", "pimpl idiom", "Compiler-firewall", "d-pointer" in C++.
- Handle (computing) - Wikipedia
- c++ - win32 application aren't so object oriented and why there are so many pointers? - Stack Overflow
- Object-oriented techniques in C Dmitry Frank
- Object-oriented design patterns in the kernel, part 1
1.7.3 Common Data Types
| Data Type | Definition | Description |
|---|---|---|
| BOOL | typedef int BOOL | Boolean variable true (non zero) or false (zero or 0) |
| BYTE | typedef unsigned char BYTE | A byte, 8 bits. |
| CCHAR | typedef char CHAR | An 8-bit Windows (ANSI) character. |
| DWORD | typedef unsigned long DWORD | A 32-bit unsigned integer. The range is 0 through 4294967295 decimal. |
| DWORDLONG | typedef unsigned __int64 DWORDLONG | 64 bits usigned int. |
| DWORD32 | typedef unsigned int DWORD32 | A 32-bit unsigned integer. |
| DWORD64 | typedef unsigned __int64 DWORD64 | A 64-bit unsigned integer. |
| FLOAT | typedef float FLOAT | A floating-point variable. |
| INT8 | typedef signed char INT8 | An 8-bit signed integer. |
| INT16 | typedef signed short INT16 | A 16-bit signed integer. |
| INT32 | typedef signed int INT32 | A 32-bit signed integer. The range is -2147483648 through 2147483647 decimal. |
| INT64 | typedef signed __int64 INT64 | A 64-bit signed integer. |
| LPBOOL | typedef BOOL far *LPBOOL; | A pointer to a BOOL. |
| LPBYTE | typedef BYTE far *LPBYTE | A pointer to a BYTE. |
| LPCSTR, PCSTR | typedef __nullterminated CONST CHAR *LPCSTR | pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters. |
| LPCVOID | typedef CONST void *LPCVOID; | A pointer to a constant of any type. |
| LPCWSTR, PCWSTR | typedef CONST WCHAR *LPCWSTR; | A pointer to a constant null-terminated string of 16-bit Unicode characters. |
| LPDWORD | typedef DWORD *LPDWORD | A pointer to a DWORD. |
| LPSTR | typedef CHAR *LPSTR; | A pointer to a null-terminated string of 8-bit Windows (ANSI) characters. |
| LPTSTR | An LPWSTR if UNICODE is defined, an LPSTR otherwise. | |
| LPWSTR | typedef WCHAR *LPWSTR; | A pointer to a null-terminated string of 16-bit Unicode characters. |
| PCHAR | typedef CHAR *PCHAR; | A pointer to a CHAR. |
| CHAR | ANSI Char or char | |
| WCHAR | Wide character 16 bits UTF16 | |
| TCHAR | - | A WCHAR if UNICODE is defined, a CHAR otherwise. |
| UCHAR | typedef unsigned char UCHAR; | An unsigned CHAR. |
| WPARAM | typedef UINT_PTR WPARAM; | A message parameter. |
1.7.4 Other data types
| HANDLE | 32 bits integer used as a handle |
| HDC | Handle to device context |
| HWND | 32-bit unsigned integer used as handle to a window |
| LONG | |
| LPARAM | |
| LPSTR | |
| LPVOID | Generic pointer similar to void* |
| LRESULT | |
| UINT | Unsigned integer |
| WCHAR | 16-bit Unicode character or Wide-Character |
| WPARAM | |
| HINSTANCE |
1.7.5 References
General:
Windows Programming:
Acabo de descubrir el botón del html, solo para darme cuenta de que no está dividido automáticamente
Pero bueno, está bien
Yo intentaré reactualizar esto, prefier hacer publicaciones de chaptesr, pero no hay otro remedio y prefiero que no haya tantos usuarios dentro si es que hay usuarios activos, porque estos blogs son muy sucios
Comments
Displaying 0 of 0 comments ( View all | Add Comment )