Results 1 to 2 of 2

Thread: GetGroupInfo

  1. #1
    Ilich
    Guest

    GetGroupInfo

    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 &#40; &#40;hr = DPNERR_BUFFERTOOSMALL&#41; and &#40;dwItems <> 0&#41; &#41;;
      if hr=DPNERR_BUFFERTOOSMALL then showmessage&#40;inttostr&#40;i&#41;&#41;;
    
      for i &#58;= 0 to dwItems-1 do
      Begin
       
        ZeroMemory&#40;gInfo, SizeOf&#40;DPN_GROUP_INFO&#41;&#41;;
        dwSize^ &#58;= 0;
        gInfo.dwSize &#58;= SizeOf&#40;DPN_GROUP_INFO&#41;;
        hr &#58;= g_pServer.GetGroupInfo&#40;pArray&#91;i&#93;, gInfo, dwSize, 0&#41;;
        success&#40;hr, 'sss'&#41;;
        if &#40;hr <> DPNERR_BUFFERTOOSMALL&#41; then
        Begin
          Result &#58;= 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!

  2. #2

    Re: GetGroupInfo

    You have declared gInfo as PDPN_GROUP_INFO. It should be DPN_GROUP_INFO.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •