IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C Discussion :

Comment récupérer des informations sur l'ordinateur ?


Sujet :

C

  1. #1
    Membre à l'essai
    Inscrit en
    Février 2003
    Messages
    47
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 47
    Points : 24
    Points
    24
    Par défaut Comment récupérer des informations sur l'ordinateur ?
    Bonjour à tous,

    Je suis à la recherche de fonctions qui donnent des informations sur l'ordinateur sur lequel s'exécute le programme. Par exemple : système d'exploitation, nom du processeur, fréquence, disque dur, quantité de mémoire vive, etc.

    Merci

  2. #2
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2003
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2003
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    en voici quelques - unes, pour Windows s'entend :
    Machine + OS
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    GetComputerName Retrieves the NetBIOS name of the local computer. 
    GetComputerNameEx Retrieves the NetBIOS or DNS name of the local computer. 
    GetComputerObjectName Retrieves the local computer's name in a specified format.  
    GetCurrentHwProfile Retrieves the current hardware profile for the local computer. 
    GetKeyboardType Retrieves information about the current keyboard. 
    GetNativeSystemInfo  Retrieves information about the current system for an application running under WOW64.  
    GetSysColor Retrieves the current color of a display element. 
    GetSystemDirectory Retrieves the path of the system directory. 
    GetSystemInfo Retrieves information about the current system.  
    GetSystemMetrics Retrieves system metrics and configuration settings. 
    GetSystemWindowsDirectory Retrieves the path of the shared Windows directory on a multi-user system. 
    GetSystemWow64Directory Retrieves the path of the system directory used by WOW64. 
    GetUserName Retrieves the user name of the current thread. 
    GetUserNameEx Retrieves the name of the user or other security principal associated with the calling thread. You can specify the format of the returned name. 
    GetVersion Retrieves the version number of the operating system. 
    GetVersionEx Retrieves the version of the current operating system. 
    GetWindowsDirectory Retrieves the path of the Windows directory. 
    IsProcessorFeaturePresent Determines whether a processor feature is supported by the current computer.
    Disques durs :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    GetDiskFreeSpace Retrieves information about the specified disk, including the amount of free space on the disk. 
    GetDiskFreeSpaceEx Retrieves information about the specified disk, including the amount of free space on the disk. 
    GetDriveType Determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive.
    Mémoire :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    GlobalMemoryStatus Obtains information about the system's current usage of both physical and virtual memory. 
    GlobalMemoryStatusEx Obtains information about the system's current usage of both physical and virtual memory.

  3. #3
    Membre extrêmement actif
    Profil pro
    Inscrit en
    Juillet 2002
    Messages
    135
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2002
    Messages : 135
    Points : 146
    Points
    146
    Par défaut
    sous Linux, il y a notamment le fichier /proc/cpuinfo qui donne des informations sur ton CPU

  4. #4
    Membre à l'essai
    Inscrit en
    Février 2003
    Messages
    47
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 47
    Points : 24
    Points
    24
    Par défaut
    Merci pour vos indications.
    jfgq> Ou as tu eu ces informations ? En général, comment emploie-t-on ces fonctions ? Par exemple :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    char nom[50] ;
    nom = GetComputerName() ;
    printf("%s", nom) ;
    Est-ce que c'est valide ?

    merci.

  5. #5
    Membre éprouvé
    Profil pro
    Eleveur de cornichons
    Inscrit en
    Juin 2002
    Messages
    1 074
    Détails du profil
    Informations personnelles :
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Eleveur de cornichons
    Secteur : Finance

    Informations forums :
    Inscription : Juin 2002
    Messages : 1 074
    Points : 1 166
    Points
    1 166
    Par défaut
    voici un lien avec bcp de fonction Get* qui répondent à ta demande (je pense) avec des explications type MSDN : http://leb.net/wine/WinDoc/funcIndex-local.html

    Nas'

  6. #6
    Futur Membre du Club
    Profil pro
    Inscrit en
    Septembre 2003
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2003
    Messages : 5
    Points : 6
    Points
    6
    Par défaut
    On peut aussi taper GetComputerName sur Google et on tombe sur le MSDN en ligne. C'est très pratique.

  7. #7
    Membre à l'essai
    Inscrit en
    Février 2003
    Messages
    47
    Détails du profil
    Informations forums :
    Inscription : Février 2003
    Messages : 47
    Points : 24
    Points
    24
    Par défaut
    Merci à tous pour vos réponses.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 0
    Dernier message: 28/09/2014, 14h53
  2. Réponses: 3
    Dernier message: 28/01/2007, 19h25
  3. Récupérer des informations sur les connexions réseau
    Par Leobaillard dans le forum Delphi
    Réponses: 8
    Dernier message: 31/08/2006, 01h20
  4. Récupérer des Informations sur un PC via un Réseau ?
    Par MaTHieU_ dans le forum Administration
    Réponses: 6
    Dernier message: 22/11/2005, 12h39
  5. Comment avoir des information sur une BD?…
    Par kikimnet dans le forum Bases de données
    Réponses: 1
    Dernier message: 12/02/2005, 09h20

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo