#1
|
|||
|
|||
Correct syntax for PtrSafe Function AccessibleObjectFromWindow
Hi
I use a number of Windows API Functions in a vba project that I have converted to 64 bit Excel. I remain unsure about 1 of these because of my lack of understanding of MicroSoft published syntax. This function does appear in a number of different www sources but these have inconsistent Types and none of them is authoritative. Is anyone able to confirm if this is correct? I have highlighted the 2 types I am uncertain of: Private Declare PtrSafe Function AccessibleObjectFromWindow Lib "oleacc" _ (ByVal HWnd As LongPtr, _ ByVal dwId As Long, _ ByRef riid As GUID, _ ByRef ppvObject As Object) As LongPtr thanks |
#2
|
||||
|
||||
dwId is correct as Long (it's just a DWORD) but the return value should also be a Long, not LongPtr. It's just a value indicating success or failure of some sort, not a pointer to anything.
|
#3
|
|||
|
|||
Wonderful
thankyou Debaser Much appreciated |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Assistance with Today() function returning correct value | DaveWSinger | Excel | 4 | 03-08-2018 05:34 AM |
VLookup Syntax | ketbdnetbp | Excel | 2 | 04-12-2014 03:18 PM |
Is it correct (PasteSpecial function) | gsrikanth | Excel Programming | 7 | 01-17-2012 11:23 PM |
Can't seem to get the correct syntax for Wine list mailmerge | daym | Mail Merge | 3 | 05-02-2011 03:26 AM |
Syntax help needed | blazzercat | Excel | 3 | 07-09-2009 02:15 PM |