VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Copy a string to another variable using lstrcpy API

by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 17th January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Copy a string to another variable using lstrcpy API

Rate Copy a string to another variable using lstrcpy API



' Copy the source string to the target string 
Dim source As String, target As String  ' the two strings 
Dim retval As Long  ' return value 
source = "Mission Impossible"  ' the source string to copy 
target = Space(Len(source)) 
retval = lstrcpy(target, source)  ' set target to equal source 
MsgBox "Source string = " & source 
MsgBox "Target string = " & target 
End 
End Sub

Download this snippet    Add to My Saved Code

Copy a string to another variable using lstrcpy API Comments

No comments have been posted about Copy a string to another variable using lstrcpy API. Why not be the first to post a comment about Copy a string to another variable using lstrcpy API.

Post your comment

Subject:
Message:
0/1000 characters