size of array

Apr 1, 2010 at 11:41am
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?
Apr 1, 2010 at 2:05pm
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.