ReactOS 0.4.16-dev-306-g647d351
CAsyncLoadIcon Struct Reference
Collaboration diagram for CAsyncLoadIcon:

Public Member Functions

void Free ()
 

Static Public Member Functions

static CAsyncLoadIconQueue (HWND hAppsList, CAppInfo &AppInfo, bool Parse)
 
static void StartTasks ()
 

Public Attributes

CAsyncLoadIconpNext
 
HWND hAppsList
 
CAppInfoAppInfo
 
UINT TaskId
 
bool Parse
 
WCHAR Location [ANYSIZE_ARRAY]
 

Detailed Description

Definition at line 1041 of file appview.cpp.

Member Function Documentation

◆ Free()

void CAsyncLoadIcon::Free ( )
inline

Definition at line 1049 of file appview.cpp.

1049{ free(this); }
#define free
Definition: debug_ros.c:5

◆ Queue()

CAsyncLoadIcon * CAsyncLoadIcon::Queue ( HWND  hAppsList,
CAppInfo AppInfo,
bool  Parse 
)
static

Definition at line 1081 of file appview.cpp.

1082{
1084 CStringW szIconPath;
1085 if (!AppInfo.RetrieveIcon(szIconPath))
1086 return NULL;
1087 SIZE_T cbstr = (szIconPath.GetLength() + 1) * sizeof(WCHAR);
1088 CAsyncLoadIcon *task = (CAsyncLoadIcon*)malloc(sizeof(CAsyncLoadIcon) + cbstr);
1089 if (!task)
1090 return NULL;
1091 task->hAppsList = hAppsList;
1092 task->AppInfo = &AppInfo;
1093 task->TaskId = g_AsyncIconTaskId;
1094 task->Parse = Parse;
1095 CopyMemory(task->Location, szIconPath.GetBuffer(), cbstr);
1096 szIconPath.ReleaseBuffer();
1097 task->pNext = g_AsyncIconTasks;
1098 g_AsyncIconTasks = task;
1099 return task;
1100}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
static UINT g_AsyncIconTaskId
Definition: appview.cpp:1053
struct CAsyncLoadIcon * g_AsyncIconTasks
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
int GetLength() const noexcept
Definition: atlsimpstr.h:362
virtual BOOL RetrieveIcon(CStringW &Path) const =0
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
CAsyncLoadIcon * pNext
Definition: appview.cpp:1042
CAppInfo * AppInfo
Definition: appview.cpp:1044
WCHAR Location[ANYSIZE_ARRAY]
Definition: appview.cpp:1047
ULONG_PTR SIZE_T
Definition: typedefs.h:80
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
#define CopyMemory
Definition: winbase.h:1735
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CAppsListView::AddApplication().

◆ StartTasks()

void CAsyncLoadIcon::StartTasks ( )
static

Definition at line 1103 of file appview.cpp.

1104{
1107 if (HANDLE hThread = CreateThread(NULL, 0, AsyncLoadIconProc, tasks, 0, NULL))
1109 else
1110 AsyncLoadIconProc(tasks); // Insist so we at least free the tasks
1111}
static DWORD CALLBACK AsyncLoadIconProc(LPVOID Param)
Definition: appview.cpp:1056
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
HANDLE hThread
Definition: wizard.c:28

Referenced by CAppsListView::AddApplication().

Member Data Documentation

◆ AppInfo

CAppInfo* CAsyncLoadIcon::AppInfo

Definition at line 1044 of file appview.cpp.

Referenced by CAppsListView::OnAsyncIcon(), and Queue().

◆ hAppsList

HWND CAsyncLoadIcon::hAppsList

Definition at line 1043 of file appview.cpp.

Referenced by Queue().

◆ Location

WCHAR CAsyncLoadIcon::Location[ANYSIZE_ARRAY]

Definition at line 1047 of file appview.cpp.

Referenced by Queue().

◆ Parse

bool CAsyncLoadIcon::Parse

Definition at line 1046 of file appview.cpp.

Referenced by Queue().

◆ pNext

CAsyncLoadIcon* CAsyncLoadIcon::pNext

Definition at line 1042 of file appview.cpp.

Referenced by Queue().

◆ TaskId

UINT CAsyncLoadIcon::TaskId

Definition at line 1045 of file appview.cpp.

Referenced by CAppsListView::OnAsyncIcon(), and Queue().


The documentation for this struct was generated from the following file: