RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomFileRun.HInst Property

Indicates the Windows error code that is returned when TCustomFileRun launches the external application.

Pascal
property HInst: HInst;
C++
__property HInst HInst;

TCustomFileRun sets HInst to the Windows return value when it launches the external application. If this value is less than 32, it represents an error code that indicates why the application failed to launch. This value is only available after the action has executed. 

The following table lists the possible error values (defined in shellapi.pas) that can be the value of HInst when it is less than 32.

Value 
Meaning 
0  
The operating system is out of memory or resources.  
ERROR_FILE_NOT_FOUND  
The specified file was not found.  
ERROR_PATH_NOT_FOUND  
The specified path was not found.  
ERROR_BAD_FORMAT  
The .exe file is invalid (does not have the correct internal format).  
SE_ERR_ACCESSDENIED  
The operating system denied access to the specified file.  
SE_ERR_ASSOCINCOMPLETE  
The file name association is incomplete or invalid.  
SE_ERR_DDEBUSY  
A DDE transaction could not be completed because other DDE transactions were being processed.  
SE_ERR_DDEFAIL  
A DDE transaction failed.  
SE_ERR_DDETIMEOUT  
A DDE transaction could not be completed because the request timed out.  
SE_ERR_DLLNOTFOUND  
A specified dynamic-link library was not found.  
SE_ERR_FNF  
The specified file was not found.  
SE_ERR_NOASSOC  
There is no application associated with the given file name extension or TCustomFileRun attempted to print an unprintable file.  
SE_ERR_OOM  
There was not enough memory to complete the operation.  
SE_ERR_PNF  
The specified path was not found.  
SE_ERR_SHARE  
A sharing violation occurred.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!