#include "isapi.h" #pragma hdrstop BOOL IsapiFaxGetRoutingInfo( LPEXTENSION_CONTROL_BLOCK Ecb ) { PIFAX_GET_ROUTINGINFO iFaxGetRoutingInfo = (PIFAX_GET_ROUTINGINFO) Ecb->lpbData; LPBYTE RoutingInfoBuffer = NULL; DWORD RoutingInfoBufferSize = 0; if (!FaxGetRoutingInfoW( iFaxGetRoutingInfo->FaxPortHandle, iFaxGetRoutingInfo->RoutingGuid, &RoutingInfoBuffer, &RoutingInfoBufferSize )) { SendError( Ecb, GetLastError() ); return FALSE; } SendResponseWithData( Ecb, (LPBYTE) &RoutingInfoBufferSize, sizeof(DWORD) ); SendResponseWithData( Ecb, (LPBYTE) RoutingInfoBuffer, RoutingInfoBufferSize ); FaxFreeBuffer( RoutingInfoBuffer ); return TRUE; } static DWORD BufferSize( PFAX_ROUTING_METHODW RoutingMethod, DWORD MethodCount ) { DWORD i; DWORD Size = 0; for (i=0; ilpbData; PFAX_ROUTING_METHODW RoutingMethod = NULL; DWORD MethodsReturned = 0; if (!FaxEnumRoutingMethodsW( iFaxGeneral->FaxHandle, (LPBYTE*)&RoutingMethod, &MethodsReturned )) { SendError( Ecb, GetLastError() ); return FALSE; } DWORD Size = BufferSize( RoutingMethod, MethodsReturned ); for (DWORD i=0; ilpbData; if (!FaxEnableRoutingMethodW( iFaxEnableRouting->FaxPortHandle, iFaxEnableRouting->RoutingGuid, iFaxEnableRouting->Enabled)) { SendError( Ecb, GetLastError() ); return FALSE; } return TRUE; }