This is the second video in this new series on using the Windows 32 API in VBA. In this video I discuss String arguments for the Windows API functions. We start simple with the MessageBox function, passing #strings from #VBA to the #Win32API. Then we move to the GetDefaultPrinter to look at getting string data from the Win32API to VBA. #GetDefaultPrinter uses the same pattern and mechanisms as many important API functions such as #GetUserName or #GetComputerName. Understanding this pattern is crucial to understand string handling for the Windows API.
Video Chapters
00:00 Introduction
01:20 Passing Strings to the WinAPI (MessageBox function)
07:35 Getting String Data from the WinAPI - Why this example (GetDefaultPrinter function)
08:59 Getting String Data from the WinAPI - Documentation
11:05 Getting String Data from the WinAPI - Declaration
12:45 Getting String Data from the WinAPI - Implementation
18:45 Getting String Data from the WinAPI - Fixing Declaration Bug
21:15 Getting String Data from the WinAPI - Determine Buffer Size
25:54 Explaining reason for the buffer pattern
Links:
Windows API Reference: docs.microsoft.com/en-us/wind...
MessageBox function: docs.microsoft.com/en-us/wind...
GetDefaultPrinter function: docs.microsoft.com/en-us/wind...
Cheat Sheet of the most important data types: codekabinett.com/download/win...
Download of a lot of VBA API Declarations: www.microsoft.com/en-us/downl...
Негізгі бет Ғылым және технология Windows API in VBA - Strings (Part 1)
Пікірлер: 15