Using Win32 functions in Visual FoxPro Image Gallery
Function Groups:
All Functions 1306
Atom 1
Authentication 14
Authorization 6
Bitmap 9
Brush 2
Clipboard 20
Color 1
Common Dialog Box 12
Console 12
Coordinate Space and Transformation 9
Cryptography Reference 28
Cursor 5
Data Decompression Library 3
Debugging 2
Desktop Window Manager (DWM) 1
Device Context 13
Device Input and Output 1
Dialog Box 6
DNS Functions 1
Dynamic-Link Library 6
Error Handling 10
Event Logging 10
Extensible Storage Engine (ESE, Jet Blue) 23
File Management 49
File Mapping 4
File System 19
Filled Shape 2
Font and Text 13
GDI+ 6
GDI+ Bitmap 10
GDI+ Brush 4
GDI+ Font 9
GDI+ Graphics 28
GDI+ Image 20
GDI+ ImageAttributes 3
GDI+ Matrix 10
GDI+ PathGradient Brush 3
GDI+ Pen 2
GDI+ StringFormat 2
GDI+ Text 2
Handle and Object 4
Hook 2
HTTP Functions (WinHTTP) 12
Icon 7
Internet Functions (WinInet) 49
IP Helper 24
Kernel Transaction Manager 3
Keyboard Input 22
Mailslot 3
Memory Management 26
Menu 18
Message and Message Queue 12
Metafile 6
Monitor Configuration (Vista) 8
Mouse Input 8
MSHTML Reference 1
Multilingual User Interface 4
Multiple Display Monitors 2
National Language Support 20
Network Management 34
Painting and Drawing 17
Path 3
Performance Monitoring 12
Pipe 5
PnP Configuration Manager 6
Power Management 6
Printing and Print Spooler 35
Process and Thread 31
Raw Input 4
Region 7
Registry 21
Remote Access Service (RAS) 5
Remote Application Programming (RAPI) 49
Remote Procedure Call (RPC) 7
Resource 10
Security 22
Service 11
Setup API functions 7
Shell Functions 39
Shell Lightweight Utility APIs -- misc. functions 2
Shell Lightweight Utility APIs -- Path Functions 20
Shell Lightweight Utility APIs -- string functions 4
Simple MAPI 9
String 10
Synchronization 13
System Information 23
System Shutdown 5
Terminal Services 10
Time 16
Unicode and Character Set 2
URL Monikers 7
Version Information 2
Virtual Hard Disk (Win7) 4
Window 37
Window Class 8
Window Procedure 3
Window Property 3
Window Station and Desktop 7
Windows Controls 8
Windows Multimedia 76
Windows Networking 18
Windows Sockets 2 (Winsock) 38
Process and Thread            ..msdn    Add comment
AssignProcessToJobObject Assigns a process to an existing job object.
CommandLineToArgvW Parses a Unicode command-line string, and returns a pointer to a set of Unicode argument strings and a count of arguments, similar to the standard C run-time argv and argc values
CreateJobObject Creates or opens a job object.
CreateProcess The CreateProcess function creates a new process and its primary thread. The new process runs the specified executable file.

The CreateProcess function is used to run a new program. The WinExec and LoadModule functions are still available, but they are implemented as calls to CreateProcess
CreateProcessAsUser The CreateProcessAsUser function creates a new process and its primary thread. The new process then runs the specified executable file. The CreateProcessAsUser function is similar to the CreateProcess function, except that the new process runs in the security context of the user represented by the hToken parameter.
CreateProcessWithLogonW The CreateProcessWithLogonW function creates a new process and its primary thread. The new process then runs the specified executable file in the security context of the specified credentials (user, domain, and password). It can optionally load the user profile for the specified user.
ExitProcess The ExitProcess function ends a process and all its threads.
FreeEnvironmentStrings The FreeEnvironmentStrings function frees a block of environment strings.
GetCommandLine Returns a pointer to the command-line string for the current process.
GetCurrentProcess The GetCurrentProcess function retrieves a pseudo handle for the current process.
GetCurrentProcessId The GetCurrentProcessId function retrieves the process identifier of the calling process.
GetCurrentThread The GetCurrentThread function retrieves a pseudo handle for the current thread.
GetCurrentThreadId The GetCurrentThreadId function retrieves the thread identifier of the calling thread.
GetEnvironmentStrings Retrieves the environment block for the current process.
GetEnvironmentVariable Retrieves the value of the specified variable from the environment block of the calling process. The value is in the form of a null-terminated string of characters.
GetPriorityClass Retrieves the priority class for the specified process. This value, together with the priority value of each thread of the process, determines each thread"s base priority level.
GetProcessIoCounters Retrieves accounting information for all I/O operations performed by the specified process.
GetProcessTimes Retrieves timing information for the specified process.
GetProcessVersion Retrieves the major and minor version numbers of the system on which the specified process expects to run.
GetStartupInfo Retrieves the contents of the STARTUPINFO structure that was specified when the calling process was created.
GetThreadPriority Retrieves the priority value for the specified thread. This value, together with the priority class of the thread"s process, determines the thread"s base-priority level.
IsWow64Process Determines whether the specified process is running under WOW64.
OpenProcess The OpenProcess function opens an existing process object.
RegisterServiceProcess The RegisterServiceProcess function registers or unregisters a service process. A service process continues to run after the user logs off.
SetEnvironmentVariable The SetEnvironmentVariable function sets the value of an environment variable for the current process.
SetPriorityClass Sets the priority class for the specified process. This value together with the priority value of each thread of the process determines each thread"s base priority level.
SetThreadPriority Sets the priority value for the specified thread. This value, together with the priority class of the thread"s process, determines the thread"s base priority level.
Sleep The Sleep function suspends the execution of the current thread for the specified interval
TerminateJobObject Terminates all processes currently associated with the job.
TerminateProcess The TerminateProcess function terminates the specified process and all of its threads.
WinExec The WinExec function runs the specified application.

Note This function is provided only for compatibility with 16-bit Windows. Win32-based applications should use the CreateProcess function
Code examples:
Reading and setting the priority class values for the current process and thread
Obtaining names and positions for shortcuts located on the Windows Desktop
How to find when the application started
How to make application automatically close all documents it opened
How to prevent users from accessing the Windows Desktop and from switching to other applications
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Terminating all running applications from a VFP program
How to check whether the system is 32-bit or 64-bit
How to Start a Process as Another User (NT/XP/2K)
Converting command-line string to a set of Unicode argument strings
Start an executable from VFP application by using the CreateProcess
Obtaining I/O counts for the current process
Storing the environment strings in cursor
Moving shortcut to a specified position on the Windows Desktop
Retrieving the priority class for the current process
Enumerating Processes -- WinNT
GetProcessVersion points at target OS
Reading and setting system access privileges for the current process
How to enable the SE_SHUTDOWN_NAME privilege for the application
How to load a user profile
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Reading and setting Environment variables
How to hide your program from the Close Program dialog (Win9* only)
Memory usage info for current VFP session (WinNT only)
Obtaining a handle to the desktop associated with the calling thread
GDI+ fun: roach-infested desktop
How to make the caption of a VFP application flashing in the Windows task bar
Setting properties of the window: caption and user-defined value
Starting external program from VFP and waiting for its termination
How to activate Windows Calculator
Using Beep and Sleep functions to make the old tin buzz sing (WinNT only?)
Confining Windows calculator inside the VFP main window
Starting an external application in VFP using WinExec
Using File Mapping for enumerating files opened by Visual FoxPro
Accessing Windows Control Panel from VFP Application
Retrieving the command line for the VFP session
How to play MIDI notes
Retrieveing information about the active window (even if it is not owned by the calling process)
Reading STARTUPINFO structure for the current VFP session
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
21 sec.Function: 'SearchPath'
40 sec.Function: 'SQLAllocHandle'
59 sec.Function: 'ShowHTMLDialog'
1.32 min.Function: 'FreeConsole'
1.6 min.Function: 'GdipGetImageGraphicsContext'
1.9 min.Function: 'GetFileInformationByHandle'
2.22 min.Function: 'GetDlgCtrlID'
2.52 min.Function: 'CLSIDFromString'
2.8 min.Function: 'GetFileSecurity'
3.12 min.Function: 'GetErrorMode'
Advertise here!