size of array

1
2
3
4
5
6
	WriteLog(_T("GetDependentServices: checking dependencies..."));
	LPENUM_SERVICE_STATUS lpDependencies = GetDependentServices(hService);
		
	if (lpDependencies != NULL)
	{
		for (i = 0; i < (sizeof(lpDependencies)/sizeof(lpDependencies[0])); i++)

or another try with sizeof(lpDependencies)/sizeof(ENUM_SERVICE_STATUS)...

both didn't help.

how can i get the count of entries in lpdependencies?
That trick only works for stack arrays in the function that created them. This is why I'm always insisting on no using it.

See your documentation. There must be a function to traverse the enumeration.
Topic archived. No new replies allowed.