Hi! I have some troubles with GetGroupInfo.
Code:
Var
dwItems: DWORD;
pArray : array[0..99] of DPNID;
i : byte;
dwSize : pdword;
gInfo : pDPN_GROUP_INFO;
Begin
dwItems := 0;
i := 0;
repeat
hr := g_pServer.EnumPlayersAndGroups( @pArray, dwItems, DPNENUM_GROUPS );
inc(i);
until ( (hr = DPNERR_BUFFERTOOSMALL) and (dwItems <> 0) );
if hr=DPNERR_BUFFERTOOSMALL then showmessage(inttostr(i));
for i := 0 to dwItems-1 do
Begin
ZeroMemory(gInfo, SizeOf(DPN_GROUP_INFO));
dwSize^ := 0;
gInfo.dwSize := SizeOf(DPN_GROUP_INFO);
hr := g_pServer.GetGroupInfo(pArray[i], gInfo, dwSize, 0);
success(hr, 'sss');
if (hr <> DPNERR_BUFFERTOOSMALL) then
Begin
Result := E_FAIL;
Exit;
End;
....
When calling GetGroupInfo: at firs, access violtion and then Unrecognized error. if gInfo as DPN_GROUPINFO(not pointer) access violation is not present, but 'Unrecofnized error' are set (sorry for my english). Can anybody help me? Thanks!
Bookmarks