Добавить
Уведомления

AL: Updating API calls in VBA to work with 64 Bit, How To + API Viewer using Access - Peter Cole

Power-packed session with Peter Cole. He shows how to manually change API calls to work in 64-bit. Microsoft has a file with definitions you can download. https://microsoft.com/en-us/download/details.aspx?id=9970 Peter explains what you need to know to understand the different parts of an API declaration. He describes the uses of the PtrSafe keyword and the new LongPtr (Long Pointer) data type. What's the difference between Long and LongLong? What's the Any data type? While it's nice to have a way to lookup the API syntax, and manually make changes yourself, the file you can get from Microsoft has some inconsistencies. It also takes time to find what you're looking for. Peter created a free Access database application to give you an easy way to search the definitions for Declares, Constants, and Types. Updated version is here: https://www.thememydatabase.co.uk/access32to64.html it's free -- click the Download button and then click Add to Cart in the screen that pops up. There won't be a charge. If you have a declaration that needs to be updated, you can search for the correct Declare statement, see what it needs to say, and it will be ready on the clipboard for easy insertion into your VBA code. If you want to do a web search for more information about a particular definition, the application constructs a search string you can paste into a web browser to get good details. He shows with step-by-step examples how to update not only the Declarations and Types but also the code where Declared functions are used. The examples range from the simplest to extremely complex. Peter clarifies the often misunderstood use of the compiler directive #If Win64.. It is only required for 13 of the 1550 declarations in the text file. He explains the #If VBA7 directive is only required if code has to be run in pre 2010 Office installation. Peter finishes by demonstrating a utility that he has developed that updates an existing database, containing all the examples, with a single click. Having shown the update process he shows how the utility has created test forms to check that the updated code is working in 64 -bit. 00:00 Introduction Objective 01:41 Recap Api usage ... more times to be added later Example Declare PtrSafe text file download Access32to64 Samples Code Find User Samples Clipboard Clipboard Code API Viewer LongPtr Test Clipboard Text Size fit. Details from web Compiler Directives VBA7 Update (The Slow way) The Quick way... Auto Updated Test Forms Updating API calls in VBA to work with 64 Bit, free Access tool by Peter Cole ( ThemeMyDatabase.co.uk ) Tuesday 30 November 2021 AccessUserGroups.org Lunchtime chapter host is Maria Barnes Last Tuesday @ noon Central time CT -- join us! https://accessusergroups.org/lunch/ SUBSCRIBE for MORE videos! ► https://bit.ly/AUGYoutube ✓ Join our online Access User Groups with free membership. ► Facebook ◄ https://www.facebook.com/AccessUserGroups/ ► Twitter ◄ https://twitter.com/AccessUserGroup

Иконка канала Кодерские идеи
63 подписчика
12+
17 просмотров
2 года назад
12+
17 просмотров
2 года назад

Power-packed session with Peter Cole. He shows how to manually change API calls to work in 64-bit. Microsoft has a file with definitions you can download. https://microsoft.com/en-us/download/details.aspx?id=9970 Peter explains what you need to know to understand the different parts of an API declaration. He describes the uses of the PtrSafe keyword and the new LongPtr (Long Pointer) data type. What's the difference between Long and LongLong? What's the Any data type? While it's nice to have a way to lookup the API syntax, and manually make changes yourself, the file you can get from Microsoft has some inconsistencies. It also takes time to find what you're looking for. Peter created a free Access database application to give you an easy way to search the definitions for Declares, Constants, and Types. Updated version is here: https://www.thememydatabase.co.uk/access32to64.html it's free -- click the Download button and then click Add to Cart in the screen that pops up. There won't be a charge. If you have a declaration that needs to be updated, you can search for the correct Declare statement, see what it needs to say, and it will be ready on the clipboard for easy insertion into your VBA code. If you want to do a web search for more information about a particular definition, the application constructs a search string you can paste into a web browser to get good details. He shows with step-by-step examples how to update not only the Declarations and Types but also the code where Declared functions are used. The examples range from the simplest to extremely complex. Peter clarifies the often misunderstood use of the compiler directive #If Win64.. It is only required for 13 of the 1550 declarations in the text file. He explains the #If VBA7 directive is only required if code has to be run in pre 2010 Office installation. Peter finishes by demonstrating a utility that he has developed that updates an existing database, containing all the examples, with a single click. Having shown the update process he shows how the utility has created test forms to check that the updated code is working in 64 -bit. 00:00 Introduction Objective 01:41 Recap Api usage ... more times to be added later Example Declare PtrSafe text file download Access32to64 Samples Code Find User Samples Clipboard Clipboard Code API Viewer LongPtr Test Clipboard Text Size fit. Details from web Compiler Directives VBA7 Update (The Slow way) The Quick way... Auto Updated Test Forms Updating API calls in VBA to work with 64 Bit, free Access tool by Peter Cole ( ThemeMyDatabase.co.uk ) Tuesday 30 November 2021 AccessUserGroups.org Lunchtime chapter host is Maria Barnes Last Tuesday @ noon Central time CT -- join us! https://accessusergroups.org/lunch/ SUBSCRIBE for MORE videos! ► https://bit.ly/AUGYoutube ✓ Join our online Access User Groups with free membership. ► Facebook ◄ https://www.facebook.com/AccessUserGroups/ ► Twitter ◄ https://twitter.com/AccessUserGroup

, чтобы оставлять комментарии