Click here to Skip to main content
15,890,609 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTemplate Pin
Alexander M.,18-May-04 4:37
Alexander M.,18-May-04 4:37 
GeneralRe: Template Pin
Diddy18-May-04 4:39
Diddy18-May-04 4:39 
GeneralRe: Template Pin
Alexander M.,18-May-04 4:45
Alexander M.,18-May-04 4:45 
GeneralRe: Template Pin
Anonymous18-May-04 6:32
Anonymous18-May-04 6:32 
GeneralRe: Template Pin
Alexander M.,18-May-04 7:46
Alexander M.,18-May-04 7:46 
GeneralISAPI FILTER ON ISA SERVER Pin
SuzannaS18-May-04 4:35
SuzannaS18-May-04 4:35 
GeneralRe: ISAPI FILTER ON ISA SERVER Pin
Mahendra_78619-May-04 21:27
Mahendra_78619-May-04 21:27 
GeneralRe: ISAPI FILTER ON ISA SERVER Pin
SuzannaS20-May-04 21:38
SuzannaS20-May-04 21:38 
Hi Mahendra,
are you ready for my questions? so, let's start:

FIRST QUESTION:
How can I get the client's browser's session ID?
For each browser does an ID exist?

SECOND QUESTION
I would like to know why the following code for the event OnAuthComplete is not working; I have already declared the method and caught the notification (SF_NOTIFY_AUTH_COMPLETE: dwRet = OnAuthComplete(pfc, (PHTTP_FILTER_AUTH_COMPLETE_INFO))pvNotification); :

HANDLE TokenHandle = (HANDLE)1;
DWORD dwLen = 0;
PTOKEN_USER pTokenUser = NULL;
DWORD dwErr;
char name[MAX_NAME], domain[MAX_NAME];

// Get user token.
if ( pAuthCompInfo->GetUserToken(pfc,&TokenHandle) )
{
// Get token information size.
if ( !GetTokenInformation(TokenHandle,TokenUser,NULL,dwLen,&dwLen) )
{
dwErr = GetLastError();
if ( ERROR_INSUFFICIENT_BUFFER == dwErr )
{
// Alocate buffer for token information.
pTokenUser = (PTOKEN_USER)GlobalAlloc(GPTR,dwLen);
dwErr = S_OK;
}
}

// Now get the actual token information.
if ( dwErr != S_OK ||
!GetTokenInformation(TokenHandle, TokenUser,pTokenUser,dwLen,&dwLen) )
{
return WriteIntoFile(pfc, "Evento OnAuthComplete: ERRORE 1");
}
else // We have the token information in hand.
{
// Extract from the token information - the SID.
SID *pSid = (SID *)pTokenUser->User.Sid;
DWORD dwNLen = MAX_NAME, dwDLen = MAX_NAME;
SID_NAME_USE eUse;

// Get the user name and the domain from the SID.
if (!LookupAccountSid(NULL,pSid,name,&dwNLen,domain,&dwDLen,&eUse) )
{
return WriteIntoFile(pfc, "Evento OnAuthComplete: ERRORE 2");
}
else
{
return WriteIntoFile(pfc, "Evento OnAuthComplete: User name:" + *name);
// name buffer contains user name.
// domain buffer contains user domain.
}
}
}

SQLPOINTER sp = name;
long userID = GetUserID(sp);
return WriteIntoFile(pfc, "Evento OnAuthComplete: ");
}

WriteIntoFile is a method that write into a file and I have already tested it and it works well.


I have other question but I start just with the two first question.

Thanks a lot.Smile | :)

Questionhow to set multi color subitem in CListCtrl grid? Pin
george ivanov18-May-04 3:55
george ivanov18-May-04 3:55 
AnswerRe: how to set multi color subitem in CListCtrl grid? Pin
RChin18-May-04 4:13
RChin18-May-04 4:13 
GeneralRe: how to set multi color subitem in CListCtrl grid? Pin
Roger Allen18-May-04 4:34
Roger Allen18-May-04 4:34 
GeneralRe: how to set multi color subitem in CListCtrl grid? Pin
alex.barylski18-May-04 4:37
alex.barylski18-May-04 4:37 
GeneralRe: how to set multi color subitem in CListCtrl grid? Pin
RChin18-May-04 5:25
RChin18-May-04 5:25 
GeneralRe: how to set multi color subitem in CListCtrl grid? Pin
george ivanov18-May-04 8:38
george ivanov18-May-04 8:38 
AnswerRe: how to set multi color subitem in CListCtrl grid? Pin
chris10918-May-04 5:11
chris10918-May-04 5:11 
GeneralRe: how to set multi color subitem in CListCtrl grid? Pin
george ivanov18-May-04 22:44
george ivanov18-May-04 22:44 
AnswerIf you want an EZ-Pass... Pin
Abin18-May-04 7:18
Abin18-May-04 7:18 
QuestionHow to read byte array sent by api from managed c++ Pin
hasansheik18-May-04 3:47
hasansheik18-May-04 3:47 
GeneralFile's length over HTTP Pin
Hans Ruck18-May-04 3:37
Hans Ruck18-May-04 3:37 
GeneralRe: File's length over HTTP Pin
Michael Dunn18-May-04 4:55
sitebuilderMichael Dunn18-May-04 4:55 
GeneralRe: File's length over HTTP Pin
Hans Ruck18-May-04 5:00
Hans Ruck18-May-04 5:00 
QuestionHow to use mutex in a dll Pin
yingkou18-May-04 2:49
yingkou18-May-04 2:49 
AnswerRe: How to use mutex in a dll Pin
Diddy18-May-04 4:46
Diddy18-May-04 4:46 
GeneralRe: How to use mutex in a dll Pin
yingkou18-May-04 14:08
yingkou18-May-04 14:08 
GeneralRe: How to use mutex in a dll Pin
Diddy18-May-04 23:40
Diddy18-May-04 23:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.