Namespace: Consultingwerk.Windows.API
Class 
Win32 Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object

File:Win32
Purpose:A wrapper to Win32 API access
Author(s):Mike Fechner / Consultingwerk Ltd.
Created:Wed Jan 06 00:07:05 CET 2010
Notes:Some of the methods here are are based on original proceudres
found at: http://www.oehive.org/win32api



Top Method Summary
Options Name Purpose
+ DisableProcessWindowsGhosting () DisableProcessWindowsGhosting, disables the window ghosting feature for the calling GUI process. Window ghosting is a Windows Manager feature that lets the user minimize, move, or close the main window of an application that is not responding. After calling DisableProcessWindowsGhosting, the ghosting feature is disabled for the duration of the process.
+ DisableWindowClose (handle) Disables the close button of a Progress Window Widget
+ DisableWindowClose (integer) Disables the close button of a Progress Window Widget
+ DisableWindowClose (Form) Disables the close button of a .NET Form
+ EnableVisualCues (integer) Enables visual cues in the window
+ EnableVisualCues (Control) Enables visual cues in the window
+ CHARACTER GetApplicationCommandLine (character) Returns the path to a known application from the Windows Registry
+ INTEGER GetDesktopWindow () Retrieves a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.
+ CHARACTER GetUserName (ExtendedNameFormatEnum) Retrieves the name of the user or other security principal associated with the calling thread. You can specify the format of the returned name.
+ INTEGER GetWindowThreadProcessId (integer) Retrieves the identifier of the process that created the specified window DWORD WINAPI GetWindowThreadProcessId(_In_ HWND hWnd, _Out_opt_ LPDWORD lpdwProcessId);
+ LockWindowUpdate (integer) The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time. BOOL WINAPI PostMessage(__in_opt HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam);
+ LockWindowUpdate (integer, integer) The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time. BOOL WINAPI PostMessage(__in_opt HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam);
+ LockWindowUpdate (Control) The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time. BOOL WINAPI PostMessage(__in_opt HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam);
+ LockWindowUpdate (Control, integer) The LockWindowUpdate function disables or enables drawing in the specified window. Only one window can be locked at a time. BOOL WINAPI PostMessage(__in_opt HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam);
+ PeekMessage () Retrieves a message from the Windows Message Queue without removing it. Useful to show that a process is still alive without handling incoming events
+ INTEGER PostMessage (integer, integer, integer, integer) Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message.
+ INTEGER SendMessage (integer, integer, integer, integer) Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message.
+ INTEGER SetParent (integer, integer) Changes the parent window of the specified child window.
+ SetRedraw (integer, logical) Wrapper to sending the WM_SETREDRAW message to a Window (Control/Widget)
+ ShellExecute (character, character) Performs an operation on a specified file.
+ ShellExecute (character, character, character) Performs an operation on a specified file.
+ ShellExecute (character, character, character, character) Performs an operation on a specified file.
+ ShellExecute (character, character, character, character, integer) Performs an operation on a specified file.
+ ShellExecute (character, character, character, character, integer, integer) Performs an operation on a specified file.
+ ShellExecute (integer, character, character) Performs an operation on a specified file.
+ ShellExecute (integer, character, character, character) Performs an operation on a specified file.
+ ShellExecute (integer, character, character, character, character) Performs an operation on a specified file.
+ ShellExecute (integer, character, character, character, character, integer) Performs an operation on a specified file.
+ ShellExecute (integer, character, character, character, character, integer, integer) Performs an operation on a specified file.


Method Detail
Top

PUBLIC DisableProcessWindowsGhosting ()

Purpose: DisableProcessWindowsGhosting, disables the window ghosting feature
for the calling GUI process. Window ghosting is a Windows Manager
feature that lets the user minimize, move, or close the main window
of an application that is not responding.
After calling DisableProcessWindowsGhosting, the ghosting feature is
disabled for the duration of the process.
Notes: http://knowledgebase.progress.com/articles/Article/000035144
http://msdn.microsoft.com/en-us/library/ms648415(v=vs.85).aspx

Top

PUBLIC DisableWindowClose (handle)

Purpose: Disables the close button of a Progress Window Widget
Notes:

Parameters:
phWindow HANDLE
The Window to disable the close button for
Top

PUBLIC DisableWindowClose (integer)

Purpose: Disables the close button of a Progress Window Widget
Notes:

Parameters:
piHwnd INTEGER
The HWND of the Window (ABL or .NET) to disable the close button for
Top

PUBLIC DisableWindowClose (Form)

Purpose: Disables the close button of a .NET Form
Notes:

Parameters:
poForm System.Windows.Forms.Form
The Form to disable the close button for
Top

PUBLIC EnableVisualCues (integer)

Purpose: Enables visual cues in the window
Notes: Visual cues are by default only enabled when a Window has been
launched using a keyboard action. This method can be used to enable
visual cues for windows launched by a mouse action

Parameters:
piHwnd INTEGER
The HWND of the Window
Top

PUBLIC EnableVisualCues (Control)

Purpose: Enables visual cues in the window
Notes: Visual cues are by default only enabled when a Window has been
launched using a keyboard action. This method can be used to enable
visual cues for windows launched by a mouse action

Parameters:
poControl System.Windows.Forms.Control
The reference to the Control (e.g. Form)
Top

PUBLIC CHARACTER GetApplicationCommandLine (character)

Purpose: Returns the path to a known application from the Windows Registry
Notes: Reads registry keys from
HKEY_LOCAL_MACHINE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe
Throws an exception when the application is not found

Parameters:
pcAppName CHARACTER
The name of the application to retrieve, e.g. AcroRd32.exe, excel.exe
Returns CHARACTER
The full path name of the application executable
Top

PUBLIC INTEGER GetDesktopWindow ()

Purpose: Retrieves a handle to the desktop window. The desktop window covers
the entire screen. The desktop window is the area on top of which
other windows are painted.
Notes: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633504%28v=vs.85%29.aspx

Returns INTEGER
The hwnd of the desktop window
Top

PUBLIC CHARACTER GetUserName (ExtendedNameFormatEnum)

Purpose: Retrieves the name of the user or other security principal associated
with the calling thread. You can specify the format of the returned name.
Notes:

Parameters:
poNameFormat Consultingwerk.Windows.API.ExtendedNameFormatEnum
The ExtendedNameFormatEnum value representing the user identity to return
Returns CHARACTER
The user identity/name requested
Top

PUBLIC INTEGER GetWindowThreadProcessId (integer)

Purpose: Retrieves the identifier of the process that created the specified window
DWORD WINAPI GetWindowThreadProcessId(_In_ HWND hWnd,
_Out_opt_ LPDWORD lpdwProcessId);
Notes: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633522(v=vs.85).aspx

Parameters:
piHwnd INTEGER
A handle to the window
Returns INTEGER
The process Id that created the Window
Top

PUBLIC LockWindowUpdate (integer)

Purpose: The LockWindowUpdate function disables or enables drawing in the
specified window. Only one window can be locked at a time.
BOOL WINAPI PostMessage(__in_opt HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
Notes: http://msdn.microsoft.com/en-us/library/dd145034(v=vs.85).aspx

Parameters:
piHwnd INTEGER
The HWND of the Window to lock
Top

PUBLIC LockWindowUpdate (integer, integer)

Purpose: The LockWindowUpdate function disables or enables drawing in the
specified window. Only one window can be locked at a time.
BOOL WINAPI PostMessage(__in_opt HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
Notes: http://msdn.microsoft.com/en-us/library/dd145034(v=vs.85).aspx

Parameters:
piHwnd INTEGER
The HWND of the Window to lock
piLocked INTEGER
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero, indicating that an error occurred or another window was already locked.
Top

PUBLIC LockWindowUpdate (Control)

Purpose: The LockWindowUpdate function disables or enables drawing in the
specified window. Only one window can be locked at a time.
BOOL WINAPI PostMessage(__in_opt HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
Notes: http://msdn.microsoft.com/en-us/library/dd145034(v=vs.85).aspx

Parameters:
poControl System.Windows.Forms.Control
The reference to the Control who's window should be locked
Top

PUBLIC LockWindowUpdate (Control, integer)

Purpose: The LockWindowUpdate function disables or enables drawing in the
specified window. Only one window can be locked at a time.
BOOL WINAPI PostMessage(__in_opt HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
Notes: http://msdn.microsoft.com/en-us/library/dd145034(v=vs.85).aspx

Parameters:
poControl System.Windows.Forms.Control
The reference to the Control who's window should be locked
piLocked INTEGER
If the function succeeds, the return value is nonzero. If the function fails, the return value is zero, indicating that an error occurred or another window was already locked.
Top

PUBLIC PeekMessage ()

Purpose: Retrieves a message from the Windows Message Queue without removing
it. Useful to show that a process is still alive without handling
incoming events
Notes: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644943(v=vs.85).aspx
http://blog.excastle.com/2005/08/15/telling-windows-were-not-really-not-responding/
https://community.progress.com/technicalusers/f/19/p/9232/35351.aspx?Redirected=true#35351 //community.progress.com/technicalusers/f/19/p/9232/35351.aspx?Redirected=true#35351

Top

PUBLIC INTEGER PostMessage (integer, integer, integer, integer)

Purpose: Places (posts) a message in the message queue associated with the
thread that created the specified window and returns without waiting
for the thread to process the message.
Notes: BOOL WINAPI PostMessage(__in_opt HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the window whose window procedure is to receive the message
piUmsg INTEGER
The message to be posted.
piwParam INTEGER
Additional message-specific information.
pilParam INTEGER
Additional message-specific information.
Returns INTEGER
If the function succeeds, the return value is nonzero.
Top

PUBLIC INTEGER SendMessage (integer, integer, integer, integer)

Purpose: Sends the specified message to a window or windows. The SendMessage
function calls the window procedure for the specified window and does
not return until the window procedure has processed the message.
Notes: To send a message and return immediately, use the SendMessageCallback
or SendNotifyMessage function. To post a message to a thread's message
queue and return immediately, use the PostMessage or PostThreadMessage function.
LRESULT WINAPI SendMessage(__in HWND hWnd,
__in UINT Msg,
__in WPARAM wParam,
__in LPARAM lParam);
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950(v=vs.85).aspx

Parameters:
piHwnd INTEGER
A handle to the window whose window procedure is to receive the message
piUmsg INTEGER
The message to be posted.
piwParam INTEGER
Additional message-specific information.
pilParam INTEGER
Additional message-specific information.
Returns INTEGER
If the function succeeds, the return value is nonzero.
Top

PUBLIC INTEGER SetParent (integer, integer)

Purpose: Changes the parent window of the specified child window.
Notes:

Parameters:
piHwndChild INTEGER
A handle to the child window.
piHwndNewParent INTEGER
A handle to the new parent window. If this parameter is NULL, the desktop window becomes the new parent window. If this parameter is HWND_MESSAGE, the child window becomes a message-only window.
Returns INTEGER
If the function succeeds, the return value is a handle to the previous parent window. If the function fails, the return value is NULL.
Top

PUBLIC SetRedraw (integer, logical)

Purpose: Wrapper to sending the WM_SETREDRAW message to a Window (Control/Widget)
Notes: An application sends the WM_SETREDRAW message to a window to allow changes
in that window to be redrawn or to prevent changes in that window from being
redrawn.
http://msdn.microsoft.com/en-us/library/dd145219(v=vs.85).aspx

Parameters:
piHwnd INTEGER
The HWND of the Window to enable/disable screen repaint for
plAllowRedraw LOGICAL
True to allow update of window, False to disallow update of window
Top

PUBLIC ShellExecute (character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
Top

PUBLIC ShellExecute (character, character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
Top

PUBLIC ShellExecute (character, character, character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
Top

PUBLIC ShellExecute (character, character, character, character, integer)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
nShowCmd INTEGER
The flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. These values are defined in Winuser.h
Top

PUBLIC ShellExecute (character, character, character, character, integer, integer)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
nShowCmd INTEGER
The flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. These values are defined in Winuser.h
piInstance INTEGER
OUTPUT If the function succeeds, it returns a value greater than 32. If the function fails, it returns an error value that indicates the cause of the failure. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however.
Top

PUBLIC ShellExecute (integer, character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the parent window used for displaying a UI or error messages. This value can be NULL if the operation is not associated with a window
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
Top

PUBLIC ShellExecute (integer, character, character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the parent window used for displaying a UI or error messages. This value can be NULL if the operation is not associated with a window
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
Top

PUBLIC ShellExecute (integer, character, character, character, character)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the parent window used for displaying a UI or error messages. This value can be NULL if the operation is not associated with a window
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
Top

PUBLIC ShellExecute (integer, character, character, character, character, integer)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the parent window used for displaying a UI or error messages. This value can be NULL if the operation is not associated with a window
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
nShowCmd INTEGER
The flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. These values are defined in Winuser.h
Top

PUBLIC ShellExecute (integer, character, character, character, character, integer, integer)

Purpose: Performs an operation on a specified file.
Notes: HINSTANCE ShellExecute(_In_opt_ HWND hwnd,
_In_opt_ LPCTSTR lpOperation,
_In_ LPCTSTR lpFile,
_In_opt_ LPCTSTR lpParameters,
_In_opt_ LPCTSTR lpDirectory,
_In_ INT nShowCmd);
http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx

Parameters:
piHwnd INTEGER
A handle to the parent window used for displaying a UI or error messages. This value can be NULL if the operation is not associated with a window
pcOperation CHARACTER
The action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs.
pcFile CHARACTER
The file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
pcParameter CHARACTER
If lpFile specifies an executable file, the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
pcDirectory CHARACTER
The default (working) directory for the action. If this value is NULL, the current working directory is used. If a relative path is provided at lpFile, do not use a relative path for lpDirectory.
nShowCmd INTEGER
The flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. These values are defined in Winuser.h
piInstance INTEGER
OUTPUT If the function succeeds, it returns a value greater than 32. If the function fails, it returns an error value that indicates the cause of the failure. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however.


©2006-2020 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       04.02.2020 23:41:20