Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages
Started by Maurice Anderson
Mon, 05 Jun 2006 22:25
Using ConvertSidToStringSid
Author: Maurice Anderson
Date: Mon, 05 Jun 2006 22:25
Date: Mon, 05 Jun 2006 22:25
11 lines
1330 bytes
1330 bytes
I am trying to use ConvertStringSidToSid(PSID Sid, LPTSTR *StringSid);
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/convertsidtostringsid.asp
Can someone show me using bcb code how I can implement this function?
Including declaring the variables and/or allocating any memory the function
needs.
I am not familiar with the types the function needs.
Thanks
Re: Using ConvertSidToStringSid
Author: Ed Mulroy
Date: Tue, 06 Jun 2006 00:57
Date: Tue, 06 Jun 2006 00:57
24 lines
1689 bytes
1689 bytes
Start with the information you already have. On the page whose link you presented go down to where this is found Example Code See Converting a Binary SID to String Format in C++ and click on the link. . Ed > Maurice Anderson wrote in message > news:4484af6a$1@newsgroups.borland.com... > >I am trying to use ConvertStringSidToSid(PSID Sid, LPTSTR *StringSid); > > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/convertsidtostringsid.asp > > Can someone show me using bcb code how I can implement this function? > Including declaring the variables and/or allocating any memory the > function needs. > > I am not familiar with the types the function needs.
Re: Using ConvertSidToStringSid
Author: Maurice Anderson
Date: Tue, 06 Jun 2006 06:49
Date: Tue, 06 Jun 2006 06:49
14 lines
1416 bytes
1416 bytes
> Example Code > See Converting a Binary SID to String Format in C++ > > and click on the link. The link example does not address the function I need. This is common in Microsoft documentation. They try to use a one-size-fits-all plan for examples. In the link they provide they do a good job giving examples for other functions like GetSidIdentifierAuthority(), GetSidSubAuthority(), etc but none for ConvertStringSidToSid(). -M-
Re: Using ConvertSidToStringSid
Author: Ed Mulroy
Date: Tue, 06 Jun 2006 14:32
Date: Tue, 06 Jun 2006 14:32
26 lines
1859 bytes
1859 bytes
You might find these useful: http://tinyurl.com/o63fe AKA http://www.codeproject.com/system/sid.asp?df=100&forumid=3040&exp=0&select=89977 http://tinyurl.com/rnbv2 AKA http://msdn.microsoft.com/library/en-us/bits/bits/setting_and_retrieving_the_properties_of_a_job.asp . Ed > Maurice Anderson wrote in message > news:44852574$1@newsgroups.borland.com... > >> Example Code >> See Converting a Binary SID to String Format in C++ >> >> and click on the link. > > The link example does not address the function I need. This is common in > Microsoft documentation. They try to use a one-size-fits-all plan for > examples. > > In the link they provide they do a good job giving examples for other > functions like GetSidIdentifierAuthority(), GetSidSubAuthority(), etc but > none for ConvertStringSidToSid().
Re: Using ConvertSidToStringSid
Author: Bob Gonder
Date: Tue, 06 Jun 2006 14:48
Date: Tue, 06 Jun 2006 14:48
30 lines
2012 bytes
2012 bytes
Maurice Anderson wrote:
>I am trying to use ConvertStringSidToSid(PSID Sid, LPTSTR *StringSid);
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/convertsidtostringsid.asp
Well, that is the wrong definition, and the wrong link
That is the correct parameter list and ilnk for ConvertSidToStringSid
BOOL ConvertStringSidToSid( LPCTSTR StringSid, PSID* Sid );
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/convertstringsidtosid.asp
>Can someone show me using bcb code how I can implement this function?
>Including declaring the variables and/or allocating any memory the function
>needs.
>
>I am not familiar with the types the function needs.
char * StringSid = "Whatever the string sid looks like";
SID* Sid;
if( ConvertStringSidToSid( StringSid, &Sid ) )
{ // use *Sid
char * StringSid2;
if( ConvertSidToStringSid( Sid, &StringSid2 ) )
{ // display StyringSid2
LocalFree( StringSid2 );
};
LocalFree( *Sid );
};
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads