Using Lstrcpy() API Function to Get Far Address of a VariableLast reviewed: June 21, 1995Article ID: Q94700 |
The information in this article applies to:
- Standard and Professional Editions of Microsoft Visual Basic for Windows, versions 2.0 and 3.0
SUMMARYYou can use the Windows API function Lstrcpy() to get the far address of a variable as a Long integer. The Lstrcpy() function returns the same value as its first argument, which is the address of a variable. Usually you would use the Lstrcpy() function to copy strings that are terminated by a zero byte. However, if you pass the same variable as both the source and the destination, Lstrcpy() copies the variable to itself, which has no effect.
MORE INFORMATIONBasic cannot deal with pointers directly. All Basic can do with a pointer is pass it as a parameter to a DLL function. Basic variables may move in memory. You should take the address of a variable immediately before you use it. The following steps demonstrate how to get the address of an integer and a variable-length string.
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |