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 n-1 number of characters from source string to the target string using lstrcpyn API
' Copy the specified n-1 number of characters from 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(7)
retval = lstrcpyn(target, source, 7)
target = Left(target, Len(target) - 1) ' remove the terminating null character
MsgBox "Source string = " & source
MsgBox "Target string = " & target
End
End Sub
No comments have been posted about Copy n-1 number of characters from source string to the target string using lstrcpyn API. Why not be the first to post a comment about Copy n-1 number of characters from source string to the target string using lstrcpyn API.