|
-
October 8th, 1999, 01:43 PM
#1
ExpandEnvironmentStrings
The call is simple enough but everthing that I have done, and what other people have showed me doesn't seem to work. Everytime I get an empty string from this. What is wrong?
private Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias "ExpandEnvironmentStringsA" (byval lpSrc as string, byval lpDst as string, byval nSize as Long) as Long
private Sub Command1_Click()
Dim sString as string
sString = Space(255)
Call ExpandEnvironmentStrings("Path = %PATH%", byval sString, 255)
sString = Left(sString, InStr(sString, Chr(0)) - 1)
Text1 = sString
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|