Some notes in support of this post
https://www.eileenslounge.com/viewto...297326#p297326 https://www.eileenslounge.com/viewto...297329#p297329
This is post 11 here and post 17876 in the forum Thread 2824
Page 2 https://www.excelfox.com/forum/showt...PI-stuff/page2
Post 11 https://www.excelfox.com/forum/showt...ll=1#post17876
Post 11 https://www.excelfox.com/forum/showt...age2#post17876
VBA Win32 API Functioning with String arguments.
VB Strings
Originally this page 2 was set aside for some research reporting associated with getting an answer for this main forum question.
https://eileenslounge.com/viewtopic.php?f=30&t=41659 It still is for some, (now wider), research reporting associated with getting an answer, because ..
…. A direction to an old VB Strings article/ Book Chapter and a hint of the answer .. , the issue is that with a vb string ByRef passes a pointer to a pointer in to the function, but the API, which knows nothing of BSTRs, assumes it is a pointer to an LPSTR (or LPWSTR). …… has lead / is leading me to think the answer is in a careful examination of the history/ story of the VB / VBA String handling, and in a related deeper sense, the handling of the characters in a computer’s innards.
I am trying to , and intend finally to, consider the whole chapter, and very very very approximately I am making notes here, adding too them, going off in expanding tangents, and perhaps occasionally ignoring the odd bit. I won’t manage to go through in detail the whole chapter the first time around, and possibly never completely . So for the time being, the last few posts will be like a buffer containing in some cases just a straight copy. The purpose of this, the empty "Buffer" posts, is to not have an undefined/open reserved variable which might do my head in via a bursting leaking of my memory leading to a head explosion.
Edit Update
I have been through the whole of chapter 6, and have probably understood as much as I will for a long time. Some of what I was missing was in the earlier chapters so I finally read all up to and including chapter 6. There were a few mistakes that are always painful when trying to learn as it is easy to be sent off course badly. Never the less I could understand about a third of it eventually, which is a massive improvement over a bigger "Bible" recommended to me by many a few years ago
So this is the book I would recommend: Win32 API Programming with Visual Basic, by Steven Roman.
I will mention the other one, as everybody does, but I still don't personally recommend it, and certainly I would recommend that Steven Roman book first.
This is the book I would not personally recommend - Dan Applemans's Visual Basic Programmer's Guide to the Win32 Api.
Possibly that book is the perfect reference bible once you already know it all. For a beginner or someone like me desperately trying to understand and learn, it does more harm than good, IMHO.
Forums
With the exception of the odd one or two I luckily stumbled over in more recent years, most prominent "helpers" at places like forums have some phobia, psychological condition or similar that makes thier abilities or desire to share real knowledge zero, or recommend anything useful for learning, despite their claims often that they are there to help and not to provide a quick service which in end effect they mostly seem obsessed with doing, - getting as many quick short answers out as possible, and that just aids the learning algorithms of artificial intelligence to speed up it getting rid of all of us, them included. Real knowledge is then lost. Just short answers that might be right if you are lucky. In the end if they are wrong it won’t matter either, everyone will follow like zombies anyway.
Finally I expect , I have or will, have here the better alternative, one way or another…
Edit Update February 2025
I have done quite an extensive background up to about page 4
Book Ref
https://flylib.com/books/en/4.460.1.9/1/ https://eileenslounge.com/viewtopic.php?f=30&t=41659
https://web.archive.org/web/20121217...n/4.460.1.3/1/
https://resources.oreilly.com/exampl...piCD/Code_DLLs
https://flylib.com/books/en/4.460.1.9/1/
https://web.archive.org/web/20121217...n/4.460.1.9/1/
C:\Windows\System32




Reply With Quote
Bookmarks