Part of the WPChanger code:
Сообщение отредактировал Andy51 - 8.5.2008, 12:40
Код
typedef struct
{
WCHAR *url;
UINT32 unk;
} UIS_SETWALLPAPER_SETTINGS_T;
UINT32 Setwallpaper( )
{
UINT16 *IDURL;
UIS_SETWALLPAPER_SETTINGS_T wset;
DL_FsGetIDFromURI(FS_search_test(),IDURL);
DL_DbFeatureStoreBlock(0xAAD,IDURL,8);
wset.url=FS_search_test();
wset.unk=0;
UIS_SetWallpaper(&wset);
return RESULT_OK;
}
WCHAR * FS_search_test( )
{
FS_SEARCH_PARAMS_T fs_param;
FS_SEARCH_RESULT_T fs_result[50];
FS_SEARCH_HANDLE_T fs_handle;
UINT16 res_count, count,index;
WCHAR search_string[] = L"file://b/mobile/picture/edy/\xFFFE*.jpg";
fs_param.flags = 0x1C;
fs_param.attrib = 0x00;
fs_param.mask = 0x00;
DL_FsSSearch( fs_param, search_string, &fs_handle, &res_count, 0x0);
if(res_count == 0)
{
return NULL;
}
count = res_count;
if(count > 50)count = 1;
index=rand()%(count);
DL_FsSearchResults(fs_handle, 0x0, &count, &fs_result[0]);
DL_FsSearchClose(fs_handle);
return fs_result[index].name;
}
{
WCHAR *url;
UINT32 unk;
} UIS_SETWALLPAPER_SETTINGS_T;
UINT32 Setwallpaper( )
{
UINT16 *IDURL;
UIS_SETWALLPAPER_SETTINGS_T wset;
DL_FsGetIDFromURI(FS_search_test(),IDURL);
DL_DbFeatureStoreBlock(0xAAD,IDURL,8);
wset.url=FS_search_test();
wset.unk=0;
UIS_SetWallpaper(&wset);
return RESULT_OK;
}
WCHAR * FS_search_test( )
{
FS_SEARCH_PARAMS_T fs_param;
FS_SEARCH_RESULT_T fs_result[50];
FS_SEARCH_HANDLE_T fs_handle;
UINT16 res_count, count,index;
WCHAR search_string[] = L"file://b/mobile/picture/edy/\xFFFE*.jpg";
fs_param.flags = 0x1C;
fs_param.attrib = 0x00;
fs_param.mask = 0x00;
DL_FsSSearch( fs_param, search_string, &fs_handle, &res_count, 0x0);
if(res_count == 0)
{
return NULL;
}
count = res_count;
if(count > 50)count = 1;
index=rand()%(count);
DL_FsSearchResults(fs_handle, 0x0, &count, &fs_result[0]);
DL_FsSearchClose(fs_handle);
return fs_result[index].name;
}
Сообщение отредактировал Andy51 - 8.5.2008, 12:40