382__________________.___________________________ 6

 Wnd    ,   -
   .      -
  Handle.

 Operation        , -
   .      open
()  print ().  Windows 95  NT   
: explore ()     Windows -
.   Operation  NULL,    
 open.

 FileName        , -
        .

 Parameters        , -
     ,  FileName 
 .  FileName   ,  -
   ,      NULL.

 Directory        , -
    .

 ShowCmd     .  -
     ,     14
  14.14.3.2. ,     WinExec,  
SW_RESTORE,       
  .         ,
          -
 .    Windows,   PIF  .. -
    .

    ShellExecute.   
     file.doc, ..  WinWord ( -
     .doc),     .   
:

ShellExecute(Handle,NULL,"file.doc",NULL,NULL,SW_RESTORE);

    ,   ,  -
 ,     Operation:

SheilExecute(Handle,"print","file.doc",NULL,NULL,SW_RESTORE) ;

      . 
WinWord,    .doc,     file.doc,  
Winword      ,    file.doc
  Winword.

     Windows -
 :

ShellExecute(Handle,"open","Calc",NULL,NULL,SW_RESTORE) ;

    c:\Program Files\Borland:

ShellExecute(Handle,"open",

"c:\\Program Files\\Borland",NULL,NULL,SW_RESTORE) ;

 

ShellExecute(Handle,"explore",

"c:\\Program Files\\Borland".NULL,NULL,SW_RESTORE) ;

      c:\Program FiIes\Borland.

 ShellExecute    .   
  ,    ,   GetLastError:

DWORD GetLastError(VOID)