🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3500

Re: Using ConvertSidToStringSid

#3500
From: 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 );
	};
Technical Details
Message-ID: <lb4b8218in1mi9rehtt15fmii2ms189noq@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4484af6a$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,817ba10f149908eb
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Using ConvertSidToStringSid
Date: Tue, 06 Jun 2006 07:48:27 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <lb4b8218in1mi9rehtt15fmii2ms189noq@4ax.com>
References: <4484af6a$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.77.145.19
X-Trace: newsgroups.borland.com 1149605305 67.77.145.19 (6 Jun 2006 07:48:25 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail