Seems like this is the known issue switching from VB6 to VB7 (Imported Win API functions should use long pointers). Please refer the solution S-061791 and https://forum.solidworks.com/message/336465#336465
Please visit the site containing the SWW 2013 proceedings at:
and download the presentation:
Visual Basic(R) for Applications 7: Getting SolidWorks Macros Ready for 64-Bit
It will go into detail on the difference in pointer size between 32-bit and 64-bit.
The code samples coming with the presentation illustrate how to use CopyMemory and pointers on each platform.
Attached a VBA macro illustrating how your ArrayIsInitialized() function must be modified to make it work in a platform independent way.
Partner Technical Manager, SolidWorks API
ArrayInitialization-v2.swp.zip 16.7 KB
Thanks for the info. Interesting presentation.
So fortunately all I had to do was reference a 64-bit version of the .dll and put PtrSafe in the declaration like
Private Declare PtrSafe Function blah Lib blah blah...
(For a diffenet problem involving oleacc.dll, since all the "Form on Top" functionality in my macro which used kernel32 could be removed. )