VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Get Windows directory using an API call.

by Anonymous (267 Submissions)
Category: Windows System Services
Compatability: Visual Basic 4.0 (32-bit)
Difficulty: Unknown Difficulty
Originally Published: Mon 14th December 1998
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Get Windows directory using an API call.

API Declarations


Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long


Rate Get Windows directory using an API call.



Dim lngReturn As Long
Dim strWindowsDirectory As String

strBuffer = Space$(MAX_PATH)
lngReturn = GetWindowsDirectory(strBuffer, MAX_PATH)
strWindowsDirectory = Left$(strBuffer, Len(strBuffer) - 1)

Download this snippet    Add to My Saved Code

Get Windows directory using an API call. Comments

No comments have been posted about Get Windows directory using an API call.. Why not be the first to post a comment about Get Windows directory using an API call..

Post your comment

Subject:
Message:
0/1000 characters