Re: Struck with CopyMemory API

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



> The API i used was
> Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
> (Destination As Any, Source As Any, ByVal Length As Long) as it was given in
> the article http://support.microsoft.com/default.aspx?scid=kb;en-us;282474.
> And the call where i got struck is
> 'VB Code
> Dim pDevMode as DEVMODE
> Dim aDevMode() as Byte
> Call CopyMemory(pDevMode, aDevMode(1), Len(pDevMode))
> '---------------
> When i open the ErrorReport .. it says error Mod Name: oleaut32.dll
> ModVer: 3.50.5018.1 Offset: 0002862b

Presumably you've also got a "ReDim aDevMode(1 to Len(pDevMode)) As Byte" in there, preferably just before the
CopyMemory() line?

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/


.