Using Win32 functions in Visual FoxPro Image Gallery
Authorization
AdjustTokenPrivileges
GetTokenInformation
LookupPrivilegeDisplayName
LookupPrivilegeName
LookupPrivilegeValue
OpenProcessToken
Code examples:
Reading and setting system access privileges for the current process
LookupPrivilegeDisplayName
..msdn    Add comment     W32 Constants      Translate this page
Retrieves the display name that represents a specified privilege.
Code examples:
Reading and setting system access privileges for the current process
Declaration:
BOOL WINAPI LookupPrivilegeDisplayName(
  __in_opt   LPCTSTR lpSystemName,
  __in       LPCTSTR lpName,
  __out_opt  LPTSTR lpDisplayName,
  __inout    LPDWORD cchDisplayName,
  __out      LPDWORD lpLanguageId
);
FoxPro declaration:
DECLARE INTEGER LookupPrivilegeDisplayName IN advapi32;
    INTEGER lpSystemName,;
    STRING lpName,;
    STRING @lpDisplayName,;
    LONG @cchDisplayName,;
    LONG @lpLanguageId
Parameters:
lpSystemName [in, optional]
A pointer to a null-terminated string that specifies the name of the system on which the privilege name is retrieved.

lpName [in]
A pointer to a null-terminated string that specifies the name of the privilege, as defined in Winnt.h.

lpDisplayName [out, optional]
A pointer to a buffer that receives a null-terminated string that specifies the privilege display name.

cchDisplayName [in, out]
A pointer to a variable that specifies the size, in TCHARs, of the lpDisplayName buffer.

lpLanguageId [out]
A pointer to a variable that receives the language identifier for the returned display name.
Return value:
If the function succeeds, the return value is nonzero.
Usage:
nNameSize=250
cDName=REPLICATE(CHR(0), nNameSize)
nLangId=0

= LookupPrivilegeDisplayName(0, "SeTimeZonePrivilege",;
    @cDName, @nNameSize, @nLangId)

cDName = SUBSTR(cDName, 1, nNameSize)
My comment:
Default privileges for VFP9 process on Vista:



See also: LookupPrivilegeName, LookupPrivilegeValue
Word Index links for the LookupPrivilegeDisplayName :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2009-02-03 14:06:20
Modified: 2009-02-03 14:11:13
Visited in last 7 days: 13
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.203.76)
2 sec.Function: 'URLDownloadToFile'
5 sec.
Function group: 'HTTP Functions (WinHTTP)'
7 sec.Function: 'CeCreateFile'
10 sec.Function: 'GetWorldTransform'
14 sec.Function: 'GdipCreateFont'
17 sec.Function: 'SHQueryRecycleBin'
20 sec.Function: 'URLDownloadToCacheFile'
23 sec.Function: 'UrlMkSetSessionOption'
26 sec.Function: 'MapVirtualKey'
29 sec.Function: 'GetDiskFreeSpace'
Google
Advertise here!