Article View: borland.public.cppbuilder.nativeapi
Article #3412Dynamically allocating an Array of type LOCALGROUP_MEMBERS_INFO_3
From: Maurice Anderson
Date: Wed, 21 Jun 2006 05:10
Date: Wed, 21 Jun 2006 05:10
19 lines
1528 bytes
1528 bytes
Hello, as you can see a I am adding two users to local group Test. I have
"info" defined as a array with two elements of type
LOCALGROUP_MEMBERS_INFO_3.
I want to somehow allocate the number of elements dynamically depending on
the amount of users I want to add to the group.
void __fastcall TMDIChild::Test1Click(TObject *Sender)
{
int a = 0; LOCALGROUP_MEMBERS_INFO_3 info[2];
info[0].lgrmi3_domainandname = L"Administrator";
info[1].lgrmi3_domainandname = L"guest";
Memo1->Lines->Add(String(NetLocalGroupAddMembers(NULL, L"Test", 3,
(LPBYTE)&info2, 2)));
}
How could I do that?
Technical Details
Message-ID:
<4498d4d4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,724ecf1877cbb66c,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Maurice Anderson" <mauriceanderson@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Dynamically allocating an Array of type LOCALGROUP_MEMBERS_INFO_3 Date: Tue, 20 Jun 2006 22:10:46 -0700 Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 NNTP-Posting-Host: 64.30.203.223 Message-ID: <4498d4d4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1150866644 64.30.203.223 (20 Jun 2006 22:10:44 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail