示例#1
0
void LoadBof(void)
{
	HANDLE hFindFile;
	WIN32_FIND_DATA search_data;
	int files_found;
	int files_loaded;
	char file_load_path[MAX_PATH+FILENAME_MAX];
	char file_copy_path[MAX_PATH+FILENAME_MAX];
	
	files_found = 0;
	files_loaded = 0;
	
	sprintf(file_load_path,"%s%s",ConfigStr(PATH_BOF),BOF_SPEC);
	hFindFile = FindFirstFile(file_load_path,&search_data);
	if (hFindFile != INVALID_HANDLE_VALUE)
	{
		do
		{
			files_found++; 
			sprintf(file_load_path,"%s%s",ConfigStr(PATH_BOF),search_data.cFileName);
			sprintf(file_copy_path,"%s%s",ConfigStr(PATH_MEMMAP),search_data.cFileName);
			if (BlakMoveFile(file_load_path,file_copy_path))
				files_loaded++;
		} while (FindNextFile(hFindFile,&search_data));
		FindClose(hFindFile);
	}
	
	/*
	if (files_found > 0)
	dprintf("LoadBof moved in %i of %i found new .bof files\n",files_loaded,files_found);
	*/

	//dprintf("starting to load bof files\n");
	files_found = 0;
	files_loaded = 0;
	
	sprintf(file_load_path,"%s%s",ConfigStr(PATH_MEMMAP),BOF_SPEC);
	hFindFile = FindFirstFile(file_load_path,&search_data);
	if (hFindFile != INVALID_HANDLE_VALUE)
	{
		do
		{
			files_found++; 
			sprintf(file_load_path,"%s%s",ConfigStr(PATH_MEMMAP),search_data.cFileName);
			
			if (LoadBofName(file_load_path))
				files_loaded++;
			else
				eprintf("LoadAllBofs can't load %s\n",search_data.cFileName);
		} while (FindNextFile(hFindFile,&search_data));
		FindClose(hFindFile);
	}
	
	SetClassesSuperPtr();
	SetClassVariables();
	SetMessagesPropagate();

	//dprintf("LoadBof loaded %i of %i found .bof files\n",files_loaded,files_found);
}
示例#2
0
void LoadBof(void)
{
	char file_load_path[MAX_PATH+FILENAME_MAX];
	char file_copy_path[MAX_PATH+FILENAME_MAX];
	
	int files_loaded = 0;
	
	sprintf(file_load_path,"%s%s",ConfigStr(PATH_BOF),BOF_SPEC);
   StringVector files;
   if (FindMatchingFiles(file_load_path, &files))
   {
      for (StringVector::iterator it = files.begin(); it != files.end(); ++it)
      {
			sprintf(file_load_path,"%s%s",ConfigStr(PATH_BOF), it->c_str());
			sprintf(file_copy_path,"%s%s",ConfigStr(PATH_MEMMAP), it->c_str());
			if (BlakMoveFile(file_load_path,file_copy_path))
				files_loaded++;
      }
   }
	
	/*
	if (!files.empty())
	dprintf("LoadBof moved in %i of %i found new .bof files\n",files_loaded,files.size());
	*/

	//dprintf("starting to load bof files\n");
	files_loaded = 0;
	
	sprintf(file_load_path,"%s%s",ConfigStr(PATH_MEMMAP),BOF_SPEC);
   if (FindMatchingFiles(file_load_path, &files))
   {
      for (StringVector::iterator it = files.begin(); it != files.end(); ++it)
      {
			sprintf(file_load_path,"%s%s",ConfigStr(PATH_MEMMAP), it->c_str());
			
			if (LoadBofName(file_load_path))
				files_loaded++;
			else
				eprintf("LoadAllBofs can't load %s\n", it->c_str());
		}
	}
	
	SetClassesSuperPtr();
	SetClassVariables();
	SetMessagesPropagate();

	dprintf("LoadBof loaded %i of %i found .bof files\n",files_loaded,files.size());
}