Hi All,
Thought you might appreciate this clipboard management class. It should work in VB6 assuming I have the declares setup correctly.
The source code can be found here:
stdClipboard.cls
Unfortunately my sub `protSetFilesText(ByVal sFiles As String)` works fine in 32-bit VBA, but for whatever reason it's crashing in 64-bit VBA on this line:
I checked, initially thought it was some page read error causing a crash in the runtime so I increased the clipboard memory block size i.e.Code:Call CopyMemory(lpClipMemory + Len(tDropFiles), StrPtr(sFiles), LenB(sFiles))
Looks like this doesn't fix the issue so I'm at a bit of a loss... I'm thinking perhaps it's best in general to construct the CD_HDROP as an array of bytes and inject it into the clipboard that way, but I figured I'd ask here in case there were any other ideas as to what could be causing the issue?Code:hClipMemory = GlobalAlloc(GAlloc.GHND, Len(tDropFiles) + LenB(sFiles)+10) 'arbitrary 10 bytes added to check if it's a size issue
At the moment I have decided to disable this functionality specifically in Win64, however this isn't really a good work around of course. Hopefully we can work out a fix this...




Reply With Quote
