🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages Started by Maurice Anderson Mon, 05 Jun 2006 22:25
Using ConvertSidToStringSid
#3494
Author: Maurice Anderson
Date: Mon, 05 Jun 2006 22:25
11 lines
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
#3495
Author: Ed Mulroy
Date: Tue, 06 Jun 2006 00:57
24 lines
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
#3496
Author: Maurice Anderson
Date: Tue, 06 Jun 2006 06:49
14 lines
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
#3497
Author: Ed Mulroy
Date: Tue, 06 Jun 2006 14:32
26 lines
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
#3500
Author: Bob Gonder
Date: Tue, 06 Jun 2006 14:48
30 lines
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