Using Win32 functions in Visual FoxPro Image Gallery
Process and Thread
..msdn
AssignProcessToJobObject
CommandLineToArgvW
CreateJobObject
CreateProcess
CreateProcessAsUser
CreateProcessWithLogonW
ExitProcess
FreeEnvironmentStrings
GetCommandLine
GetCurrentProcess
GetCurrentProcessId
GetCurrentThread
GetCurrentThreadId
GetEnvironmentStrings
GetEnvironmentVariable
GetPriorityClass
GetProcessIoCounters
GetProcessTimes
GetProcessVersion
GetStartupInfo
GetThreadPriority
IsWow64Process
OpenProcess
RegisterServiceProcess
SetEnvironmentVariable
SetPriorityClass
SetThreadPriority
Sleep
TerminateJobObject
TerminateProcess
WinExec
Code examples:
How to check whether the system is 32-bit or 64-bit
How to enable the SE_SHUTDOWN_NAME privilege for the application
Memory usage info for current VFP session (WinNT only)
Obtaining names and positions for shortcuts located on the Windows Desktop
Reading and setting system access privileges for the current process
Retrieving the priority class for the current process
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Using File Mapping for enumerating files opened by Visual FoxPro
Retrieving the priority class for the current process

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
 
DECLARE INTEGER GetCurrentProcess IN kernel32
 
DECLARE INTEGER GetPriorityClass IN kernel32;
    INTEGER hProcess
 
#DEFINE NORMAL_PRIORITY_CLASS     32
#DEFINE IDLE_PRIORITY_CLASS       64
#DEFINE HIGH_PRIORITY_CLASS      128
#DEFINE REALTIME_PRIORITY_CLASS  256
 
    lnPriority = GetPriorityClass(GetCurrentProcess())
 
    ? "Priority class: "
    DO CASE
    CASE lnPriority = NORMAL_PRIORITY_CLASS
        ?? "Normal"
    CASE lnPriority = IDLE_PRIORITY_CLASS
        ?? "Idle"
    CASE lnPriority = HIGH_PRIORITY_CLASS
        ?? "High"
    CASE lnPriority = REALTIME_PRIORITY_CLASS
        ?? "Real Time"
    OTHER
        ?? "Unknown"
    ENDCASE
 
 

User rating: 10/10 (1 votes)
Rate this code sample:
  • ~
618 bytes  
Created: 2001-10-25 21:06:59  
Modified: 2010-08-13 20:13:55  
Visits in 7 days: 57  
Listed functions:
GetCurrentProcess
GetPriorityClass
Printer friendly API declarations
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (184.73.7.143)
3 sec.Example: 'Creating irregularly shaped FoxPro form using transparency color key'
1.06 hrs.Example: 'Connecting a local device to a network resource'
4.61 hrs.Function: 'TextOut'
 Example: 'Peer-to-peer LAN messenger built with Mailslot API functions'
5.44 hrs.Example: 'How to block the PrintScreen key'
 Function: 'WaitForSingleObject'
Function group: 'Synchronization'
 Example: 'How to display advanced Task Dialog (Vista)'
8.05 hrs.Example: 'How to put a horizontal text scrolling on the form (a news line)'
 Function: 'GetEnhMetaFileHeader'
8.16 hrs.Example: 'Printf-style formatted text output in VFP'
Google
Advertise here!