⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 secdb.h

📁 MiniWinOuterSM MiniWinOuterSM
💻 H
字号:
#ifndef __SECTION_DB_H__
#define __SECTION_DB_H__
#include"Prsync.h"
typedef struct SectionData{
	unsigned char*Data;
	struct SectionData*next;
	struct SectionData*prev;
}SECTIONDATA;

typedef int(*SectionCompareProc)(unsigned char*sec1,unsigned char*sec2);

typedef struct{
	int Count;
	unsigned int version;//如果该值和Data中的Version 不同,则数据已经处于更新状态
	SECTIONDATA*sections;
	SectionCompareProc CmpFun;//比较函数 
	int PrivateLock;//0  lock is privated 1 shared lock
	PRMutex lock;
}SECTIONDB;

SECTIONDB*CreateSectionDB(SectionCompareProc fun,PRMutex lock);
void FreeDBSections(SECTIONDB*secDB);
void DestroySectionDB(SECTIONDB*secDB);

SECTIONDATA*FindSection(SECTIONDB*secDB,unsigned char*section);
SECTIONDATA*AddSection(SECTIONDB*secDB,unsigned char*section);
void DumpSectionDB(SECTIONDB*secDB);
//添加或者替换Section数据。
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -