|
There are two common ways to hook an API for a single application, IAT patching and binary re-writting or the target. IAT patching will only effect one module (DLL or EXE) binary re-writting the target will effect the entire process. Look up these terms and check out the Detours library from Microsoft.
Steve
|
|
|
|
|
Thanks alot.
I will have a look on it.
|
|
|
|
|
Giving the number of bad things that can happen with api hooking, do you know if microsoft has any plans to do something to prevent api hooking?
thanks!
|
|
|
|
|
I believe 64 bit Windows has measures to prevent kernel patching. Click here[^] for details.
Steve
|
|
|
|
|
Im making a program that uses a listbox as its message window.Iam reading content for this control from one of my file.Dynamically the text is adding in the control. But when the text goes over the height of the list box the scroll bar appears but it doesnt scroll down automatically. How do i make it autoscroll to follow new items?
|
|
|
|
|
|
In my dialog,i have list box and im entering datas to list box thru button.When im entering datas the scroll bar is always placed in top position...To see the last enter text,i have to scroll the bar to bottom...
This is my problem..
IS there any command in MFC to keep the scroll bar always down to see the updated text...(For exemple,i need a listbox control like a notepad).Pls hlp me.....
Thanks in advance
-- modified at 4:06 Tuesday 31st January, 2006
|
|
|
|
|
Capture the selection changed message, and in this message select the last item with
m_lb.SetCurSel(m_lb.GetCount());
~RaGE();
|
|
|
|
|
Hello!
is it possible that an application (created with MFC), in a system, don't execute, and it encounter with problem. But it dosn't encounter with problem,
if we create this application with Win32App.
Actually, is it necessary that we create a program with Win32App? and we can not create it with MFC?
|
|
|
|
|
A pure Win32-app needs the runtime-dll. msvcrt.dll.
For a Win32-program that uses MFC, you must also supply the correct MFC-dll-file. Else, the program can't be executed.
|
|
|
|
|
kakan wrote: A pure Win32-app needs the runtime-dll. msvcrt.dll.
Not needed when you link statically to the crt library. See Project settings. C/C++ ->Code Generation ->Use run-time library -> See the options.
this is this.
|
|
|
|
|
IMO, there aren't too many who wants the increased app size, especially since the runtime dll already is installed in most cases.
But it's a possible, yes. I know that.
|
|
|
|
|
I think believe MFC makes creating User Interface easier, and along with a bunch of very useful classes, it is easier to write Win32 programs. But these programs depend on the MFC runtime libraries, only if MFC is dynamically linked to it.
I think your problem is because you are running the debug version without the necessary DLL's. If it is a debug version, then make it Release version. It is very likely that the MFC runtime dlls are already present on the target system.
Otherwise, there is no reason that an MFC program will not execute while a Plain Win32 will.
this is this.
|
|
|
|
|
MFC classes are simple wrappers for Win32 methods...
what is the actual error you're encountering ??
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 6:36 Tuesday 31st January, 2006
|
|
|
|
|
Hi ,
I have created a button in a class derived from CWnd.
After the event handler for the button is executed ,the focus does not return to the button.
I can see this default behaviour when the class is derived from CFormView or CDialog.
Can anyone tell me what the problem is?
Thanks,
Gayathri
|
|
|
|
|
can you post the code inside the handler of that button?
|
|
|
|
|
Hello!
I have some char array of hexadecimal values I get from the network. I want to convert them to some printable form. For example I did it like:
<br />
string print_buff;<br />
<br />
char buffer2[100] = {0x7f, 0x80, 0x1a};<br />
<br />
for(int i = 0; i < 3; i++){<br />
char a[3] = {0};<br />
sprintf(a, "%2.0x", buffer2[i]);<br />
print_buff.append(a, 2);<br />
}<br />
This works well to the values 0x7f (127), but for the numbers bigger than 0x7f it doesn't work properly anymore. If I look at 'a[3]' character array (in debuger) I can see that 0x80 has converted to "ffffff80" string. How is this even possible when I limited string with formating option to 2? When I append characters afterwards, "ff" is appended not "80".
Rostfrei
|
|
|
|
|
Rostfrei wrote: char a[3] = {0};
You have to increase the size of the array(may be something like a[10], this will be much safer).
Jesus Lives Forever - Amen <marquee direction="up" height="40" scrolldelay="10" step=".5" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner drawn
--An eye for an eye makes the whole world blind.
--Jesus is Lord
|
|
|
|
|
I tried that already, but it doesn't work.
Rostfrei
|
|
|
|
|
|
Yes and it should be
7f 80 1a
Rostfrei
|
|
|
|
|
Rostfrei wrote: char buffer2[100] = {0x7f, 0x80, 0x1a};
Here is the problem.
Make that unsigned char buffer2[100];
Jesus Lives Forever - Amen <marquee direction="up" height="40" scrolldelay="10" step=".5" scrollamount="1" style="background:#99ccff;border-bottom:thin solid 1px #6699cc">
--Owner drawn
--An eye for an eye makes the whole world blind.
--Jesus is Lord
|
|
|
|
|
Yes! It works now!
Thank you!
Rostfrei
|
|
|
|
|
In my oppinion there is way too much printf ing in C++ code. Why not something like this?
<br />
#include <sstream><br />
#include <iomanip><br />
<br />
string print_buff;<br />
BYTE buffer2[100] = {0x7f, 0x80, 0x1a};<br />
<br />
for(int i = 0; i < 3; i++)<br />
{<br />
ostringstream ss;<br />
ss << setw(2) << setfill('0') << hex << buffer2[i];<br />
print_buff += ss.str();<br />
}<br />
Steve
|
|
|
|
|