>>>>>OK, I give up. I've been trying (without success) to locate one of the documented functions in the Win32 SDK. The function (CopyMemory) copies a block of memory from one particular address to another. Unfortunately, I can't find what DLL it's in. Defining it as being "IN Win32API" results in a "Cannot find..." error.
>>>>>
>>>>>After doing some research, it, apparently, is in one of the Visual C runtime DLLs. But I can't find it. So this prompts two possible questions. Further, declaring it in any of the four Mscvrt dlls results in the same error.
>>>>>
>>>>>First, can this function be used from VFP?
>>>>
>>>>George, I believe that this is a part of a static library bound to the executable directly. To expose it, you'd have to write a .DLL that exposed the call.
>>>>
>>>>BTW, a quick look at Winbase.H shows it to be a macro referencing RtlCopyMemory, which is in fact defined in WINNT.H as a macro referencing memcpy(). IOW, I don't think we can get there from here...
>>>>
>>>>>
>>>>>Second, if so, where is it?
>>>>>
>>>>>MTIA,
>>>
>>>Hi Ed,
>>>
>>>Yeah, that's what I think too. Saw the references in the winbase and winnt header files. Guess I just didn't want to believe it. The SDK makes no reference to the macro business, so I was hoping against hope that I just couldn't find it. Sigh, back to lstrcpy.:-(
>>
>>Seeing this thread made me do some hunting in the MSDN library where I found Knowledge Base article #Q129947. It's written for Visual Basic but I think you will find it right on point. There's no reason you can't alias the function(s) in VFP as is suggested for VB.
>>Good Luck.
>
>Hi Dore,
>
>Thanks a heap (pun intended :-)). I meant to look in my MSDN library here at the office for information. Interestingly, I think I tried to declare the function as RtlCopyMemory, but it generated the same error. Must've misspelled it or something.
I just checked - the following declaration works, but then returns an error when invoked:
DECLARE CopyMemory IN KERNEL32 AS MemCopy ;
STRING cDestination, ;
STRING cSource, ;
INTEGER nLengthOfCopy
I passed the target by reference as the first parameter, an integer value of the pointer sourrce as the second value, and the integer copy length as the third parameter. Invoking
MemCopy(@cDest,nVoidPtrVal,nLength) resulted in:
Cannot find entry point CopyMemory in the .DLLThe same with RtlCopyMemory. Back to the drawing board...
>
>Thanks again,