How to Call lstrcpy to Receive LPSTR Returned from Other APIs (78304)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q78304 SUMMARY
Because Microsoft Visual Basic does not support a pointer data type,
you cannot directly receive a pointer (such as a LPSTR) as the return
value from a Windows API or DLL function.
You can work around this by receiving the return value as a long integer
data type. Then use the lstrcpy Windows API function to copy the returned
string into a Visual Basic string.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | KB78304 |
---|
|