> > >#include <afx.h> >#include <stdio.h> >#include <stdlib.h> >#include <httpfilt.h> > >#import "d:\systemes\applic\sitebssfd\sitebssfd.tlb" // Définition du DLL Fox >//#import "D:\temp\test.tlb" // Définition du DLL Fox > > >// définition du type AUTH_COMPLETE >#define SF_NOTIFY_AUTH_COMPLETE 0x04000000 > >typedef struct _HTTP_FILTER_AUTH_COMPLETE_INFO >{ > BOOL (WINAPI * GetHeader) ( > struct _HTTP_FILTER_CONTEXT * pfc, > LPSTR lpszName, > LPVOID lpvBuffer, > LPDWORD lpdwSize > ); > BOOL (WINAPI * SetHeader) ( > struct _HTTP_FILTER_CONTEXT * pfc, > LPSTR lpszName, > LPSTR lpszValue > ); > BOOL (WINAPI * AddHeader) ( > struct _HTTP_FILTER_CONTEXT * pfc, > LPSTR lpszName, > LPSTR lpszValue > ); > BOOL (WINAPI * GetUserToken) ( > struct _HTTP_FILTER_CONTEXT * pfc, > HANDLE * phToken > ); > DWORD HttpStatus; > BOOL fResetAuth; > DWORD dwReserved; >} HTTP_FILTER_AUTH_COMPLETE_INFO, *PHTTP_FILTER_AUTH_COMPLETE_INFO; > > >BOOL WINAPI __stdcall GetFilterVersion(HTTP_FILTER_VERSION * pVer) >{ > pVer->dwFlags = (SF_NOTIFY_NONSECURE_PORT | SF_NOTIFY_AUTH_COMPLETE | SF_NOTIFY_ORDER_DEFAULT); // Spécifier le type de notification > > pVer->dwFilterVersion = HTTP_FILTER_REVISION; //Version interne du filter > > strcpy( pVer->lpszFilterDesc, "Filtre Bssfd 1.0"); //Version dans la propriété > > return TRUE; >} > >DWORD WINAPI __stdcall HttpFilterProc(HTTP_FILTER_CONTEXT * pfc, DWORD NotificationType,VOID * pvData) >{ > char cUserName[33]; // Usager > char cUrl[512]; // Url > DWORD wLongUser = sizeof(cUserName); // Longueur du buffer > DWORD wLongUrl = sizeof(cUrl); // Longueur du buffer > > _variant_t vUrl,vUserName,vUrlRetour; // declare variant variables. > _bstr_t res; > > PHTTP_FILTER_AUTH_COMPLETE_INFO pFACI; > > > using namespace sitebssfd; //use the PostSetup namespace > IcommunPtr psetup; // declare a smart ptr to the server > > switch ( NotificationType ) > { > > case SF_NOTIFY_AUTH_COMPLETE: > pFACI = (PHTTP_FILTER_AUTH_COMPLETE_INFO)pvData; > > pFACI->GetHeader(pfc, "url", cUrl, &wLongUrl); // Lecture de l'URL > pfc->GetServerVariable(pfc,"LOGON_USER", cUserName, &wLongUser); //Lecture de l'usager > > vUrl = cUrl; // Tranformer l'URL en variant pour le passer à fox > vUserName = cUserName; // Tranformer l'usager en variant pour le passer à fox > > CoInitialize(0); // initialize COM > psetup.CreateInstance("sitebssfd.commun"); //create an instance > vUrlRetour = psetup->verifieaccespage(&vUserName,&vUrl); // Appel de la fonction Fox > psetup->detruireobj(); > psetup = 0; // release the server > CoUninitialize(); //uninitialize COM > > res = vUrlRetour.bstrVal; > pFACI->SetHeader(pfc, "url", res); // Écriture de l'URL > > break; > > default: > break; > } > > return SF_STATUS_REQ_NEXT_NOTIFICATION; >} >Hi Michel,
pFACI = (PHTTP_FILTER_AUTH_COMPLETE_INFO) pvData;You might need to trace it and/or the code that has relation to it