[AccessD] Access and COM objects

Arthur Fuller fuller.artful at gmail.com
Wed Dec 21 02:47:29 CST 2022


Stuart,

I guess I'd best dig out those docs and have another read-through. I
remember painfully trying to work my way through some document and feeling
that I have no idea what I'm doing. This is what threw me:

Declare statements that include PtrSafe work correctly in the VBA7
development environment on both 32-bit and 64-bit platforms *only after all
data types in the **Declare statement (parameters and return values) that
need to store 64-bit quantities are updated to use LongLong
<https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/longlong-data-type>
for
64-bit integrals or LongPtr
<https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/longptr-data-type>
for
pointers and handles.*

I could never clearly determine to my own satisfaction which parameters and
return values needed to store 64-bit quantities, and which didn't. I think
the problem was located between the keyboard and the back of the chair.
Story of my life. Life is tough, but it's even tougher when you're old and
stupid.

On Tue, Dec 20, 2022 at 9:21 PM Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:

> COM and WIn32 API are two very different things.
>
> And of course I remember WIn32. I use it just about every day.
>
> Every time you put something like
> Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias
> "GetUserNameA" _
>   (ByVal lpBuffer As String, nSize As Long) As LONG
> in a VBA module, you are using WIn32.
>
> Every time you embed an ActiveX control on an Access form, you are using a
> COM object.
> Or go to Tools-References in the VBE. Every one of those entries is a COM
> object.
> If you use one, you are using COM.
>
> On 20 Dec 2022 at 17:51, Arthur Fuller wrote:
>
> > I confess that I know pretty much nothing about this, but I looked it
> > up this morning to get familiar with it. From what I can tell, it
> > seems to be a thing of the past; all the references and citations
> > suggest that it has to do with Win32 (remember that?), but I thought
> > I'd best check with you all first, before jumping to conclusions.
>
> >
> > Is this still a Thing? If so, can you describe your use of it, and
> > maybe point me at an example or two?
> >
> > --
> > Arthur
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
Arthur


More information about the AccessD mailing list