libkysysinfo3
获取操作系统基础信息
Usage
#include <libkysysinfo.h> extern char* kdk_system_get_architecture(); extern char* kdk_system_get_systemName(); extern char* kdk_system_get_version(bool verbose); extern int kdk_system_get_activationStatus(int *status_error_num, int *date_error_num); extern char* kdk_system_get_serialNumber(); extern char* kdk_system_get_kernelVersion(); extern char* kdk_system_get_eUser(); extern char* kdk_system_get_eUser_login_time(); extern char* kdk_system_get_projectName(); extern char* kdk_system_get_projectSubName(); extern unsigned int kdk_system_get_productFeatures(); extern char* kdk_system_get_hostVirtType(); extern char* kdk_system_get_hostCloudPlatform(); extern bool kdk_system_is_zyj(void); extern version_t kdk_system_get_version_detaile(); extern char** kdk_system_get_resolving_power(); extern char* kdk_system_get_systemCategory(); extern char** kdk_system_get_startup_time(); extern char** kdk_system_get_shutdown_time(); extern char *kdk_get_host_vendor(); extern char *kdk_get_host_product(); extern char *kdk_get_host_serial(); extern char *kdk_system_get_hostName(); extern int kdk_system_get_word(); extern char *kdk_system_get_buildTime(); extern inline void kdk_resolving_freeall(char **ptr); extern struct KPci *kdk_hw_get_pci_info(); extern void kdk_hw_free_pci_info(struct KPci *info); extern char *kdk_system_get_appScene(); Link with -lkysysinfo.
Detailed Description
This library contains instantaneous information about the current system.
Data structures
Structure version_t contains information related to a system version number and patch version number information:
typedef struct {
char *os_version; //系统版本
char *update_version; //补丁版本
} version_t;
There are other members not documented here, which are only meant for libkysysinfo internal use.
Structure KPci contains information related to a pci bus information:
struct KPci {
char slot_path[16];
char class_name[128];
char product_name[128];
unsigned char rev;
char ss_name[256];
char driver_use[1024];
char **modules;
int module_count;
struct KPci *next;
};
There are other members not documented here, which are only meant for libkysysinfo internal use.
Return value
The return value is generally specific to the individual function called.