Click here to Skip to main content
16,004,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: office look not supported in VC .NET 2005 Pin
Justin Tay29-Jul-06 23:15
Justin Tay29-Jul-06 23:15 
QuestionLowerCase(char stringtoConvert) Pin
jon-8029-Jul-06 6:35
professionaljon-8029-Jul-06 6:35 
AnswerRe: LowerCase(char stringtoConvert) Pin
Maxwell Chen29-Jul-06 7:27
Maxwell Chen29-Jul-06 7:27 
Questionalloc memory, debug and release Pin
includeh1029-Jul-06 4:48
includeh1029-Jul-06 4:48 
AnswerRe: alloc memory, debug and release Pin
Maxwell Chen29-Jul-06 7:34
Maxwell Chen29-Jul-06 7:34 
AnswerRe: alloc memory, debug and release Pin
Chris Losinger29-Jul-06 9:05
professionalChris Losinger29-Jul-06 9:05 
AnswerRe: alloc memory, debug and release [modified] Pin
Rilhas4-Aug-06 11:10
Rilhas4-Aug-06 11:10 
QuestionPacket Filtering API failing Pin
_tasleem29-Jul-06 4:38
_tasleem29-Jul-06 4:38 
now i had implemented through PfAddFiltersToInterface(ihandle,1,&inFilter,0,NULL,&fHandle) instead of addglobal filter to interface so that i could specify the ip port+ip to block of my pc.

but it did not work it depends only the parameter passed in pfcreateinterface rather then in addfilter to interface or i might be interpretting the src and destination as wrong. the complete code below

if(::PfCreateInterface(0,PF_ACTION_FORWARD,PF_ACTION_FORWARD,false,true,&ihandle)==NO_ERROR)

{
AfxMessageBox("Step 1 Done");
BYTE ip[4]={202,165,250,50};
BYTE msk[4]={255,255,255,0};
BYTE dm[4]={0,0,0,0};

inFilter.dwFilterFlags = FD_FLAGS_NOSYN; //always this value
inFilter.dwRule = 0; //always this value
inFilter.pfatType = PF_IPV4; //using ipV4 addresses
inFilter.SrcAddr = (PBYTE)dm;
inFilter.SrcMask = (PBYTE)dm; //mask for local ip
inFilter.DstAddr = (PBYTE)ip; //any destination
inFilter.DstMask = (PBYTE)msk;
inFilter.wSrcPort =0;//any source port
inFilter.wSrcPortHighRange=4000;
inFilter.wDstPort = 80; //destination port 80(http service)
inFilter.wDstPortHighRange=80;

inFilter.dwProtocol =(DWORD)FILTER_PROTO_ANY; //Tcp protocol
DWORD err;
err=::PfAddFiltersToInterface(ihandle,1,&inFilter,0,NULL,&fHandle);
if(err==NO_ERROR)
{
if(::PfBindInterfaceToIPAddress(ihandle,PF_IPV4,(PBYTE)ip)==NO_ERROR)
{
AfxMessageBox("IP Adress Binded");
}

}
}

i think input according to input filter it should block on port 80 but i can browse internet through that port.
either i m misunderstanding the src and destination or these api not working.


Tasleem Arif

QuestionA simple question on PreTranslateMessage and ON_WM_ Pin
Jay Zhu29-Jul-06 4:04
Jay Zhu29-Jul-06 4:04 
AnswerRe: A simple question on PreTranslateMessage and ON_WM_ Pin
includeh1029-Jul-06 5:03
includeh1029-Jul-06 5:03 
GeneralRe: A simple question on PreTranslateMessage and ON_WM_ Pin
Jay Zhu29-Jul-06 6:27
Jay Zhu29-Jul-06 6:27 
GeneralRe: A simple question on PreTranslateMessage and ON_WM_ [modified] Pin
Justin Tay29-Jul-06 7:37
Justin Tay29-Jul-06 7:37 
GeneralRe: A simple question on PreTranslateMessage and ON_WM_ Pin
Jay Zhu29-Jul-06 18:34
Jay Zhu29-Jul-06 18:34 
GeneralRe: A simple question on PreTranslateMessage and ON_WM_ Pin
Jay Zhu29-Jul-06 18:49
Jay Zhu29-Jul-06 18:49 
GeneralRe: A simple question on PreTranslateMessage and ON_WM_ Pin
Justin Tay29-Jul-06 19:59
Justin Tay29-Jul-06 19:59 
Questiona Simple Question about ON_MESSAGE and ON_NOTIFY Pin
JackNotAll29-Jul-06 3:03
JackNotAll29-Jul-06 3:03 
AnswerRe: a Simple Question about ON_MESSAGE and ON_NOTIFY Pin
Ryan Binns29-Jul-06 5:18
Ryan Binns29-Jul-06 5:18 
GeneralRe: a Simple Question about ON_MESSAGE and ON_NOTIFY Pin
JackNotAll30-Jul-06 3:25
JackNotAll30-Jul-06 3:25 
GeneralRe: a Simple Question about ON_MESSAGE and ON_NOTIFY Pin
Ryan Binns30-Jul-06 4:44
Ryan Binns30-Jul-06 4:44 
GeneralRe: a Simple Question about ON_MESSAGE and ON_NOTIFY Pin
JackNotAll30-Jul-06 19:26
JackNotAll30-Jul-06 19:26 
QuestionTransparent checkboxes Pin
Twister33629-Jul-06 1:22
Twister33629-Jul-06 1:22 
AnswerRe: Transparent checkboxes Pin
includeh1029-Jul-06 5:11
includeh1029-Jul-06 5:11 
GeneralRe: Transparent checkboxes Pin
Twister33629-Jul-06 5:46
Twister33629-Jul-06 5:46 
GeneralRe: Transparent checkboxes Pin
anthonym728-Aug-06 5:55
anthonym728-Aug-06 5:55 
QuestionSending a bit stream through the serial port (VC++ 6.0) Pin
Dhananjayak0229-Jul-06 1:00
Dhananjayak0229-Jul-06 1:00 

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.