PathStripPathW has no return value (LWSTDAPI_(void)); it's currently declared as a Function returning a Long but should be a Sub.
Notes from x64:
-Seek/close/delete should have ByVal pv As Long(Ptr) like the others; it's fine in x86 because a pointer and a Long are the same size, but in x64 it risks trying to copy 8 bytes into 4.
-Some of the hacks you used drove me a little nuts... the ByRef IStream thing; I altered it a little so the callback signatures didn't differ from the documentation.
-In your DispCallFuncVtbl, you have #If (VBA7 <> 0) Or (TWINBASIC <> 0) Then... since tB is fully compatible with VBA7 syntax (LongPtr/PtrSafe/LongLong), you only need to check one for that... in tB, VBA7 is also true.
So here it is, an x64 compatible version. Just the twinproj here but the code should be fine in VB6 as well since I just added a conditional compilation block for PtrSafe APIs.
Last edited by fafalone; Nov 23rd, 2024 at 12:35 PM.