I usually refere to API as Dll's since in VBA excel you need to declare
the dll library to use them. The problem with copy memory when using
Excel VBA is to copy a string declared in VBA. Since you can't get the
pointer to the string you have to first move the string into an array so
you have a pointer. the same thing applies with a number array. The
Dim arrays in VBA are not compatible with the CopyMemory so you first
have to move the data to a C-Language compatible array before you can
use copyMemory. I 'm usually using some other API and to be able to get
the data from Excel VBA in the format that the API is looking for I end
up using CopyMemory which adds an additional step. If I was using C
language I wouldn't need to go through a bunch of extra steps.
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=166356
Microsoft Office Help