Versions des environnements
*** StartMail
*** Starts the mail client
#DEFINE HKEY_CLASSES_ROOT -2147483648 && (( HKEY ) 0x80000000 )
#DEFINE HKEY_CURRENT_USER -2147483647 && (( HKEY ) 0x80000001 )
#DEFINE HKEY_LOCAL_MACHINE -2147483646 && (( HKEY ) 0x80000002 )
#DEFINE HKEY_USERS -2147483645 && (( HKEY ) 0x80000003 )
FUNCTION StartMail
LOCAL lcOpenCommand
oControlRegistry1 = CREATEOBJECT("ControlRegistry")
*** Looks for the default email client
lcMailClient = ;
oControlRegistry1.ReadRegistryString(HKEY_LOCAL_MACHINE,;
"Software\Clients\Mail",;
"")
IF EMPTY(lcMailClient)
MSGBOX("No email client installed")
RETURN
ENDIF
DO CASE
CASE lcMailClient = "Exchange"
CASE lcMailClient = "Internet Mail and News"
CASE lcMailClient = "Outlook Express"
CASE lcMailClient = "Microsoft Outlook"
OTHERWISE
Aviso("Unsuported email client")
ENDCASE
*** Gets the command to start the email client
lcString = "Software\Clients\Mail\"+ALLTRIM(lcMailClient)+"\shell\open\command"
lcOpenCommand = ;
oControlRegistry1.ReadRegistryString(HKEY_LOCAL_MACHINE,;
lcString,;
"")
IF EMPTY(lcOpenCommand)
RETURN .F.
ENDIF
ON ERROR DO Nothing
IF !EMPTY(lcOpenCommand)
RUN /N1 &lcOpenCommand
ENDIF
DO ..\Progs\ErrHand.prg
RETURN .T.
ENDFUNC
FUNCTION Nothing
&& Pues eso, nada
ENDFUNC
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement