exemple WebResponseModifier (isa 2004 server SDK exemple) ne marche pa

exemple WebResponseModifier (isa 2004 server SDK exemple) ne marche pa - C++ - Programmation

Marsh Posté le 17-01-2012 à 12:31:32    

Salut;
 
J'ai un problème avec les exemples ISA SDK 2004.
Je veux essayer le filtre Web WebResponseModifier avec ISA Server 2004, mais il semble non fonctionnel.
J'ai suivi les instructions dans le fichier readme de l'exemple "Web Response Modifier".
 
1 - Je construis avec succès le fichier dll
2 - je l'ai placé dans le répertoire d'installaion de ISA Server  
3 - Je l'ai enregistré (regsvr32 WebResponseModifier.dll) de sorte que le filtre Web WebResponseModifier est répertoriée dans l'onglet Web Add-ins filtre sous gestion ISA Server.
4 - J'ai configuré une règle d'accès qui permet le trafic HTTP à passer par ISA Server
5 - J'ai envoyé une requête HTTP (qui est autorisé par la règle) à notre serveur Web de test.
 
Comme il est dit, il faut ajouter la chaîne "Brought to you by an ISA Web Filter» à chaque réponse, mais ça ne marche pas!
 
Pour déboguer ce problème, j'ai ajouté un simple code pour ecrire une trace en un fichier,
donc j'ai trouvé que le filtre Web est chargé (appels GetFilterVersion) puis directement déchargées (appels TerminateFilter) et donc sans appeler la HttpFilterProc.
Il semble que le filtre Web ne reste pas chargé (loaded) pour de traiter les demandes.
 
Il faut noter aussi qu'il y a aucun message d'erreur ni d'avertissement dans le gestionnaire isa server !
 
Voici le code source .. peut etre il vous permettrez de voir la source de probleme
 

Code :
  1. /*
  2. *  This filter is a flavor of the filter IIS uses for compression.
  3. * (Original filter written by David Treadwell on July 1997.)
  4. *
  5. * ISA and IIS let you accumulate Requests chunks into a complete
  6. * Request.
  7. * The following filter is an example to a filter that collects the
  8. * response chunks and then allows you to change them depending on the
  9. * complete response.
  10.  
  11. * This filter works with 2 notifications.
  12. * In Send Raw Data it collects the response's chunks, sends 0 bytes
  13. * instead of them (i.e. sends nothing).
  14.  
  15. * Then, when all the chunks of this response passed Send Raw Data
  16. * notification, ISA thinks the complete response was sent. So
  17. * it calls End Of Request Notification. End Of Request Notification
  18. * will be the place where we will send the complete response.
  19. *
  20. * Note. Since the filter allocates memory for accumulating a response from a  
  21. * Web server, it is vulnerable to a DoS attack. In this sample we show how  
  22. * to handle that issue using a threshold. When the memory needed for the  
  23. * response exceeds that threshold, the filter will behave as if it received
  24. * an end-of-request notification and will call OnEndOfRequest. The
  25. * OnEndOfRequest function will try do to change the response based on the
  26. * partial data accumulated. After doing this, the filter will notify the  
  27. * ISA Server Web proxy to stop sending notifications regarding the current
  28. * request. After this, the filter will transparent and pass the response  
  29. * without altering it.
  30. */
  31. #include <windows.h>
  32. #include <httpfilt.h>
  33. #include <stdio.h>
  34. #include <stdlib.h>
  35. #include <errno.h>
  36. #include <limits.h>
  37. #include <assert.h>
  38. #include <time.h>
  39. /*************** Declaration  ***************/
  40. const char *fileName = "C:\\LogWRM.txt";   // i made the C drive accessible to network service so this work fine
  41. FILE *p = NULL;
  42. const char LINE_TO_INSERT[] = "<h3>Brought to you by an ISA Web Filter</h3>\r\n";
  43. const char CONTENT_LENGTH[] = "Content-Length:";
  44. const int ACCUMULATION_SIZE_LIMIT = 10000;
  45. /*************** Prototype  ***************/
  46. void logLn(char buffer[] );       // to log into a file to see the trace of the filter
  47. static DWORD OnSendRawData(PHTTP_FILTER_CONTEXT pfc, PHTTP_FILTER_RAW_DATA pRawData);
  48. static DWORD OnEndOfRequest(PHTTP_FILTER_CONTEXT pfc);
  49. static void DisableNotifications(PHTTP_FILTER_CONTEXT pfc, DWORD   flags);
  50. static int strnstr(const char *string, const char *strCharSet , int n);
  51. void OutputDebugStringF (const char* pchFormat, ...);
  52. static bool InsertOurHTMLHeader(PHTTP_FILTER_CONTEXT pfc,LPBYTE *ppBuffer,LPDWORD lpdwLen);
  53. static DWORD dwfnContentLen(LPSTR ContentLenLine,int iLineLen);
  54. static DWORD IsFirstInCARP(PHTTP_FILTER_CONTEXT pfc, BOOL *IsFirst);
  55. /*************** Implementation  ***************/
  56. void logLn(char buffer[] ){
  57. time_t t;
  58. time(&t);
  59. if (p != NULL)
  60.  fprintf(p,"%s\t\t%s\n", ctime(&t), buffer);
  61. };
  62. BOOL WINAPI TerminateFilter ( DWORD dwFlags )
  63. {
  64. //logLn("" );
  65. logLn("TerminateFilter" );
  66.     if (p != NULL)
  67.  fclose(p);
  68. UNREFERENCED_PARAMETER(dwFlags);
  69.     return TRUE;
  70. }
  71. BOOL WINAPI GetFilterVersion ( PHTTP_FILTER_VERSION pVer )
  72. {
  73. p = fopen(fileName, "a+" );
  74. logLn("GetFilterVersion" );
  75.     if (pVer == NULL)
  76.     {
  77.         SetLastError( ERROR_INVALID_PARAMETER);
  78.         return FALSE;
  79.     }
  80.    
  81.     pVer->dwFilterVersion = HTTP_FILTER_REVISION;
  82.     pVer->dwFlags =   SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SECURE_PORT | SF_NOTIFY_NONSECURE_PORT  | SF_NOTIFY_SEND_RAW_DATA //| SF_NOTIFY_ORDER_HIGH
  83.     ;
  84.     return TRUE;
  85. }
  86. DWORD WINAPI HttpFilterProc (
  87.     PHTTP_FILTER_CONTEXT pfc,
  88.     DWORD NotificationType,
  89.     LPVOID pvNotification
  90. )
  91. {
  92. logLn("HttpFilterProc: begin" );
  93.     OutputDebugStringA("WEBRESPONSEMODIFIER: entring HttpFilterProc.\n" );
  94.     DWORD dwRet = SF_STATUS_REQ_NEXT_NOTIFICATION;
  95.     switch (NotificationType)
  96.     {
  97.         case SF_NOTIFY_SEND_RAW_DATA:
  98.             dwRet = OnSendRawData(pfc, (PHTTP_FILTER_RAW_DATA)pvNotification);
  99.             break;
  100.         case SF_NOTIFY_END_OF_REQUEST:
  101.             dwRet = OnEndOfRequest(pfc);
  102.             break;
  103.         default:
  104.             // We cannot reach here, unless Web Filter support has a BAD ERROR.
  105.             SetLastError( ERROR_INVALID_PARAMETER);
  106.             dwRet = SF_STATUS_REQ_ERROR;
  107.             break;
  108.     }
  109. logLn("HttpFilterProc: end" );
  110.     return dwRet;
  111. }
  112. /*
  113. * OnSendRawData():
  114. * During Send Raw Data Notification we do the following:
  115. * 1) Append each chunk to an accumulation buffer (pRawData->cvInData).
  116. * 2) Resize the Current chunk to 0 (don't send anything.)
  117. */
  118. static DWORD OnSendRawData ( PHTTP_FILTER_CONTEXT pfc, PHTTP_FILTER_RAW_DATA pInRawData )
  119. {
  120. logLn("OnSendRawData" );
  121.     if ( NULL == pfc || NULL == pInRawData)
  122.     {
  123.         SetLastError( ERROR_INVALID_PARAMETER);
  124.         return SF_STATUS_REQ_ERROR;
  125.     }
  126.    /*
  127.     * Making the filter CARP-aware.  
  128.     * The filter is active only if we are in the last array server.
  129.     */
  130.     BOOL IsFirst;
  131.     DWORD dwErrorCode = IsFirstInCARP(pfc,&IsFirst) ;
  132.     if (dwErrorCode != ERROR_SUCCESS)
  133.     {
  134.         SetLastError(dwErrorCode);
  135.         return SF_STATUS_REQ_ERROR;
  136.     }
  137.     if (!IsFirst)
  138.     {
  139.         OutputDebugStringA("WEBRESPONSEMODIFIER: OnSendRawData, intra array server, do nothing.\n" );
  140.         DisableNotifications(pfc, SF_NOTIFY_SEND_RAW_DATA);
  141.         return SF_STATUS_REQ_NEXT_NOTIFICATION;
  142.     }
  143.     OutputDebugStringA("WEBRESPONSEMODIFIER: First array server, accumulate data.\n" );
  144.     /*
  145.      * Called first time for this request - then allocate pRawData.
  146.      */
  147.     DWORD dwReserved = 0;
  148.     if ( NULL == pfc->pFilterContext )
  149.     {
  150.         pfc->pFilterContext = (LPVOID)pfc->AllocMem( pfc, sizeof(HTTP_FILTER_RAW_DATA), dwReserved);
  151.         if ( NULL == pfc->pFilterContext )
  152.         {
  153.             DisableNotifications( pfc, SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  154.             SetLastError( ERROR_NOT_ENOUGH_MEMORY );
  155.             return SF_STATUS_REQ_ERROR;
  156.         }
  157.         PHTTP_FILTER_RAW_DATA pRawData = (PHTTP_FILTER_RAW_DATA)pfc->pFilterContext;
  158.         pRawData->cbInBuffer = pInRawData->cbInBuffer;
  159.         pRawData->pvInData = (LPVOID)pfc->AllocMem( pfc, pRawData->cbInBuffer, dwReserved);
  160.         if ( NULL == pRawData->pvInData )
  161.         {
  162.             DisableNotifications(pfc,SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  163.             SetLastError( ERROR_NOT_ENOUGH_MEMORY );
  164.             return SF_STATUS_REQ_ERROR;
  165.         }
  166.         pRawData->cbInData = 0;
  167.         pRawData->dwReserved = pInRawData->dwReserved ;
  168.     }
  169.     /*
  170.      * Get the pRawData from the Request Context.
  171.      */
  172.     PHTTP_FILTER_RAW_DATA pRawData = (PHTTP_FILTER_RAW_DATA)pfc->pFilterContext;
  173.     /*
  174.      * Check for integer overflow
  175.      */
  176.     DWORD NewSize = pInRawData->cbInData + pRawData->cbInData ;
  177.     if (NewSize < pInRawData->cbInData || NewSize < pRawData->cbInData )
  178.     {
  179.         DisableNotifications(pfc,SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  180.         SetLastError( ERROR_NOT_ENOUGH_MEMORY );
  181.         return SF_STATUS_REQ_ERROR;
  182.     }
  183.     OutputDebugStringF("WEBRESPONSEMODIFIER: new data size: %d.\n",NewSize);
  184.     /*
  185.      * Check if the memory needed exceeds the limit allowed (the threshold).
  186.      * Note. In this sample, when the filter identifies such a case, it will try to  
  187.      * change the response based on the partial data accumulated. After that,  
  188.      * the filter will cease to receive notifications for the current request and  
  189.      * will pass the rest of the response without change. This sample can be  
  190.      * modified so that the filter will block the response if the threshold is  
  191.      * exceeded.  
  192.      */
  193.     if  (NewSize  > ACCUMULATION_SIZE_LIMIT)
  194.     {
  195.         OutputDebugStringF("WEBRESPONSEMODIFIER: OnSendRawData, required data size (%d) exceeds accumulation limit (%d) - trying to insert header.\n",NewSize,ACCUMULATION_SIZE_LIMIT);
  196.         DWORD dwRetVal = OnEndOfRequest(pfc);
  197.         DisableNotifications( pfc, SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  198.         return dwRetVal;
  199.     }
  200.     /*
  201.      * If the buffer in pRawData is insufficient, increase the buffer size.
  202.      * Note. To achieve better performance, when additional memory allocation  
  203.      * is needed, the filter allocates twice the amount of memory that is needed.  
  204.      * This way, we reduce the number of allocation operations significantly and  
  205.      * achieve better performance for the filter.
  206.      */   
  207.     if ( NewSize > pRawData->cbInBuffer)
  208.     {
  209.        /*
  210.         * Check for integer overflow
  211.         */
  212.         pRawData->cbInBuffer = 2*NewSize;
  213.         if (pRawData->cbInBuffer <  NewSize)
  214.         {
  215.             DisableNotifications(pfc,SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  216.             SetLastError( ERROR_ARITHMETIC_OVERFLOW );
  217.             return SF_STATUS_REQ_ERROR;
  218.         }
  219.        
  220.         LPBYTE lpBuffer = (LPBYTE)pfc->AllocMem(pfc,pRawData->cbInBuffer, dwReserved);
  221.         if ( NULL == lpBuffer )
  222.         {
  223.             DisableNotifications(pfc,SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  224.             SetLastError( ERROR_NOT_ENOUGH_MEMORY );
  225.             return SF_STATUS_REQ_ERROR;
  226.         }
  227.         memcpy((LPVOID)lpBuffer, pRawData->pvInData, pRawData->cbInData);
  228.         pRawData->pvInData = (void *)lpBuffer;
  229.     }
  230.     /*
  231.      * Append InRawData ( new chunk )  to accumulation buffer.
  232.      */
  233.     LPBYTE lpBuffer = (LPBYTE)pRawData->pvInData;
  234.     memcpy((LPVOID)(&lpBuffer[pRawData->cbInData]), pInRawData->pvInData, pInRawData->cbInData);
  235.     pRawData->cbInData = pRawData->cbInData + pInRawData->cbInData;
  236.     /*
  237.      * Mark current chunk as size 0 ( i.e. Don't send enything. )
  238.      */
  239.     pInRawData->cbInData = 0;
  240.     return SF_STATUS_REQ_NEXT_NOTIFICATION;
  241. }
  242. /*
  243. * OnEndOfRequest():
  244. * During End Of Request Notification we:
  245. * 1) Get the complete response from the filter Request Specific Data.
  246. * 2) May manipulate that response.
  247. * 3) Send that response.
  248. */
  249. static DWORD OnEndOfRequest ( PHTTP_FILTER_CONTEXT pfc )
  250. {
  251. logLn("OnEndOfRequest" );
  252.     if ( NULL == pfc)
  253.     {
  254.         SetLastError( ERROR_INVALID_PARAMETER);
  255.         return SF_STATUS_REQ_ERROR;
  256.     }
  257.     /*
  258.      * Making the filter CARP-aware. We change the HTTP reply (adding the header) only  
  259.      * if we are the first server. Note that if this is not the first server, all the data already transferred
  260.      * and there is nothing left to do.  
  261.      *
  262.      */
  263.     BOOL IsFirst;
  264.     DWORD dwErrorCode = IsFirstInCARP(pfc,&IsFirst) ;
  265.     if (dwErrorCode != ERROR_SUCCESS)
  266.     {
  267.         SetLastError(dwErrorCode);
  268.         return SF_STATUS_REQ_ERROR;
  269.     }
  270.     if (!IsFirst)
  271.     {
  272.         OutputDebugStringA("WEBRESPONSEMODIFIER: OnEndOfRequest, intra array server, do nothing.\n" );
  273.         return SF_STATUS_REQ_NEXT_NOTIFICATION;
  274.     }
  275.     OutputDebugStringA("WEBRESPONSEMODIFIER: First array server, insert header and send.\n" );
  276.     /*
  277.      * Block the following SEND_RESPONSE and END_OF_REQUEST notifications for
  278.      * this request. ( WriteClient() bellow will generate them.)
  279.      *
  280.      */
  281.     DisableNotifications( pfc, SF_NOTIFY_END_OF_REQUEST | SF_NOTIFY_SEND_RAW_DATA);
  282.     /*
  283.      * OK all data was accumulated. Now extract from Request Data
  284.      * the response buffer. (which now contains the complete response).
  285.      */
  286.     PHTTP_FILTER_RAW_DATA pRawData = (PHTTP_FILTER_RAW_DATA)pfc->pFilterContext;
  287.     if ( NULL == pRawData)
  288.     {
  289.         return SF_STATUS_REQ_NEXT_NOTIFICATION;
  290.     }
  291.     LPBYTE lpBuffer = (LPBYTE)pRawData->pvInData;
  292.     DWORD bytesToSend = pRawData->cbInData;
  293.     /*
  294.      * Empty Request data to make it ready for next response
  295.      * in case the connection is kept alive
  296.      */
  297.     pfc->pFilterContext = NULL;
  298.     /*
  299.      * Add here code to modify the response. It is now the complete response.
  300.      * any decisions and changes that demand the complete Response in hand
  301.      * should be done here.
  302.      */
  303.      if (!InsertOurHTMLHeader( pfc, &lpBuffer, &bytesToSend))
  304.      {
  305.         SetLastError( ERROR_NOT_ENOUGH_MEMORY );
  306.         return SF_STATUS_REQ_ERROR;
  307.      }
  308.     /*
  309.      * Send the complete response in one chunk.
  310.      */
  311.     DWORD dwReserved = 0 ;
  312.     if ( pfc->WriteClient(pfc,(LPVOID)lpBuffer,&bytesToSend,dwReserved) )
  313.     {
  314.         return SF_STATUS_REQ_NEXT_NOTIFICATION;
  315.     }
  316.     else
  317.     {
  318.         return SF_STATUS_REQ_ERROR;
  319.     }
  320. }
  321. #define STRING_SIZE(str)    (sizeof(str) - 1)
  322. /*
  323. *
  324. * InsertOurHTMLHeader()
  325. * Given the full response chunk, test if the response is in HTML format (has
  326. * <HTML> in it). If so, insert an HTML header line into the response
  327. * HTML. To do that we look at the input HTML as made of 3 chunks:
  328. * Chunk1 from start till "Content-Length: ..." header ( if exist.)
  329. * Chunk2 from "\r\n" after "Content-Length:" header until last character of
  330. * "<HTML>".
  331. * Chunk3 from first character after "<HTML>" till the end of the response.
  332. * We then calculate the new Content-Length value by adding the length of the
  333. * line we will insert to the original content length, and finally allocate a new
  334. * buffer and paste into it the chunks in the following order:
  335. * Chunk1, Updateded-Content-Length-Header, Chunk2, Line-we-wish-to-insert, chunk3.
  336. *
  337. */
  338. static bool InsertOurHTMLHeader ( PHTTP_FILTER_CONTEXT pfc, LPBYTE *ppBuffer, LPDWORD lpdwLen )
  339. {
  340. logLn("InsertOurHTMLHeader" );
  341.     LPSTR lpBuffer = (LPSTR)*ppBuffer;
  342.     DWORD dwLen = *lpdwLen;
  343.     bool bStatus = true;
  344.     if (lpBuffer == NULL || dwLen > INT_MAX)
  345.     {
  346.         bStatus = false;
  347.         goto  ReturnBuffer;
  348.     }
  349.    
  350.     if ( 0 < strnstr( lpBuffer, "<HTML>", dwLen)  )
  351.     {
  352.         /*
  353.          *
  354.          * Find first chunk. If no Content-Length header then first chunk will be
  355.          * zero sized.
  356.          *
  357.          */
  358.         int iStartChunk1 = 0;
  359.         int iEndChunk1 = strnstr( lpBuffer, CONTENT_LENGTH, dwLen);
  360.         if ( 0 >= iEndChunk1 )
  361.             iEndChunk1 = 0;
  362.         int iTmp = 0;
  363.         if ( 0 < iEndChunk1 )
  364.         {
  365.             /*
  366.              *
  367.              * If we are here then there is a Content-Length header, so we
  368.              * find the first "\r\n" after the the Content-Length header.
  369.              *
  370.              */
  371.             iTmp = strnstr( lpBuffer + iEndChunk1, "\r\n" , dwLen - iEndChunk1);
  372.             if ( 0 >= iTmp )
  373.                 goto ReturnBuffer;
  374.         }
  375.         /*
  376.          *
  377.          * Find the second chunk. It starts on the "\r\n" after the Content-Length
  378.          * Header, and ends after the first "<HTML>".
  379.          *
  380.          */
  381.         int iStartChunk2 = iEndChunk1 + iTmp;
  382.         iTmp = strnstr( lpBuffer + iStartChunk2, "<HTML>", dwLen - iStartChunk2);
  383.         if ( 0 >= iTmp )
  384.             goto ReturnBuffer;
  385.         int iEndChunk2 = iStartChunk2 + iTmp + STRING_SIZE("<HTML>" );
  386.         /*
  387.          *
  388.          * The third and last chunk starts after the first "<HTML>" and goes till
  389.          * the end of the input response.
  390.          *
  391.          */
  392.         int iStartChunk3 = iEndChunk2;
  393.         int iEndChunk3 = (int)dwLen;
  394.         char szContentLen[100];
  395.         if ( 0 < iEndChunk1 )
  396.         {
  397.             /*
  398.              *
  399.              * If there is Content-Length Header then find the Input Content Length,
  400.              * and add to it the length of the inserted line.
  401.              *
  402.              */
  403.             DWORD dwContentLen =
  404.                 dwfnContentLen( lpBuffer + iEndChunk1, iStartChunk2 - iEndChunk1) +
  405.                 STRING_SIZE(LINE_TO_INSERT);
  406.             char *p = (char *) memcpy( szContentLen, CONTENT_LENGTH, STRING_SIZE(CONTENT_LENGTH)) +
  407.                 STRING_SIZE(CONTENT_LENGTH);
  408.             *p++ = ' ';
  409.             _ultoa( dwContentLen, p, 10);
  410.         }
  411.         else
  412.         {
  413.             szContentLen[0] = 0;
  414.         }
  415.         /*
  416.          *
  417.          * Allocate a buffer for the new response.
  418.          *
  419.          */
  420.         iTmp = iEndChunk1 - iStartChunk1 + strlen(szContentLen) + iEndChunk2 - iStartChunk2 +
  421.                STRING_SIZE(LINE_TO_INSERT) + iEndChunk3 - iStartChunk3 + 1;
  422.         DWORD dwReserved = 0;
  423.         LPSTR lpNewBuffer = (LPSTR)pfc->AllocMem(pfc,iTmp, dwReserved);
  424.         if ( !lpNewBuffer )
  425.         {
  426.             bStatus = false;
  427.             goto ReturnBuffer;
  428.         }
  429. #define MEMCAT(lpTarget,lpSource,SourceLen,TargetLen) \
  430.         memcpy(lpTarget,lpSource,SourceLen); TargetLen += SourceLen;
  431.         DWORD dwNewLen = 0;
  432.         MEMCAT( lpNewBuffer + dwNewLen, lpBuffer + iStartChunk1, iEndChunk1 - iStartChunk1, dwNewLen);
  433.         MEMCAT( lpNewBuffer + dwNewLen, szContentLen, strlen(szContentLen), dwNewLen);
  434.         MEMCAT( lpNewBuffer + dwNewLen, lpBuffer + iStartChunk2, iEndChunk2 - iStartChunk2, dwNewLen);
  435.         MEMCAT( lpNewBuffer + dwNewLen, LINE_TO_INSERT, strlen(LINE_TO_INSERT), dwNewLen);
  436.         MEMCAT( lpNewBuffer + dwNewLen, lpBuffer + iStartChunk3, iEndChunk3 - iStartChunk3, dwNewLen);
  437.         /*
  438.          * We don't have to do that, but making it a string is good for debugging
  439.          */
  440.         lpNewBuffer[dwNewLen] = 0;
  441.         lpBuffer = lpNewBuffer;
  442.         dwLen = dwNewLen;
  443.     }
  444. ReturnBuffer:
  445.     *ppBuffer = (LPBYTE)lpBuffer;
  446.     *lpdwLen = dwLen;
  447.     return bStatus;
  448. }
  449. /*
  450. *
  451. * Extract the input Content-Length value.
  452. *
  453. * Note: This function receive a pointer to a string begins with "Content-Length:".  
  454. * It searches for the first occurrence of ":" and tries to parse the number followed by  
  455. * the ":"  character. If the parsing fails, the function return 0.
  456. *
  457. */
  458. static ULONG dwfnContentLen(LPSTR ContentLenLine, int iLineLen)
  459. {
  460.     .....
  461. }
  462. /*
  463. *
  464. * Utility function to notify that a filter is not to be called
  465. * to a notification throughout the lifetime of the current Request.
  466. *
  467. */
  468. static void DisableNotifications ( PHTTP_FILTER_CONTEXT pfc, DWORD   flags )
  469. {
  470. .....
  471. }
  472. /*
  473. * strnstr()
  474. * finds first appearance of strCharSet in string ignoring
  475. * letters case.
  476. */
  477. static int strnstr ( const char *string, const char *strCharSet , int n)
  478. {
  479.     ....
  480. }
  481. void OutputDebugStringF (const char* pchFormat, ...)
  482. {
  483.     .....
  484. }
  485. /*
  486. * IsFirstInCARP()
  487. * Returns in IsFirst variable true if the current server is the first server and false otherwise.
  488. */
  489. static DWORD IsFirstInCARP(PHTTP_FILTER_CONTEXT pfc, BOOL *pfIsFirst)
  490. {
  491.     .....
  492. }


 
Merci pour l'aide!

Reply

Marsh Posté le 17-01-2012 à 12:31:32   

Reply

Marsh Posté le 17-01-2012 à 13:24:44    

Ce sujet a été déplacé de la catégorie Systèmes & Réseaux Pro vers la categorie Programmation par Je@nb

Reply

Marsh Posté le 08-02-2012 à 12:45:53    

salut,  
C'est vraiment pas amusant de tout !
aucune réponse !
Es ce tellement difficile !
:(

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed