|
You can't subclass a window in another process without injecting code into that process.
You can however use a Windows hook. See SetWindowsHookEx in the Platform SDK documentation. You probably want one of WH_CALLWNDPROC , WH_CALLWNDPROCRET or WH_GETMESSAGE .
|
|
|
|
|
It sounds like you need to do soenthing limilar to what this article describes:
Mouse gestures in IE[^]
I have not read it, but it probably does something like you need.
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Hi
Can i do so that my MFC dialog launch from WinAPI dll.
Or i can to do it only in MFC dll project????
Actually i do this but after loading of my dialog AfxGetThread()->PumpMessage was invoked from MFC code and application failed.AfxGetThread return NULL,but in my code i set AFX_MANAGE_STATE(AfxGetStaticModuleState()) and change _WINDLL to _AFXDLL macro.
Thank.
|
|
|
|
|
Hi
I recently ran into a strange problem. I used the new function myDoublePtr = new double[some_number]. However, I used 570000000. The compiler gave me an array too big error. I have 1 gig of ram. Is it a compiler thing? Or maybe the language. Thanks
|
|
|
|
|
The computer did not have 570,000,000 bytes of contiguous RAM to offer.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
You cant expect 570000000*sizeof(double) = 4.56x10^9 bytes = 4.2 GB from the heap.
If you really need that much memory (I doubt it! Revise your algorithms), you probably need to look into memory mapped files.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Nothing strange about it.
The most the memory manger can allocate for one buffer is around 1 gig not 4 gig. Look up virtual memory management in the MSDN library for more info..
You should be breaking up your storage requirments into multiple smaller buffer, how many and how small is up to you. You could use GlobalAlloc() to allocate the individual buffers, but now days the MSDN recommends using the heap allocation management routines instead.
INTP
|
|
|
|
|
I know that it can be a silly question but I would use a function to pass from text string "1234" to float 1234.
thanks in advance
|
|
|
|
|
atof or sscanf .
If you're using the Standard C++ Library, you could also use a stringstream and extract the data out using the >> operator.
Finally, you could consider Boost's lexical_cast[^] template.
|
|
|
|
|
use atof() function inside ur func.
Thanks
The chosen One
|
|
|
|
|
Hi!
I have tried to clear a buffer, but it do not work.
I have tried clear().
Can someone help me
|
|
|
|
|
memset( buffer, 0, sizeof( buffer ) );
or, if using Windows.h, you can also use
ZeroMemory( buffer, sizeof( buffer ) );
although that's a macro which expands to memset in recent SDK releases.
The sizeof trick only works if your buffer was statically allocated as an array (so that the compiler knows the size). Otherwise, you'll need to record the size when you allocate so you know how many bytes to zero.
|
|
|
|
|
Hi
I use PKZIP(R) Version 2.50 for zipping some files.
I use this to make a file with all DBF, SDF, MDF files in it
PKZIP -add -nozipextension -span -pass=mypass "N:\TEST\TEST.HI" *.DBF *.SDF *.MDF
I implemented this in C coding too, works great when you want to write to the local drive. To the network share like 'N' is .. it doesn't work.
It gives me this error:
Encryping files
Creating. zip: N:/TEST/TEST.HI
PKZIP: <e7> Can't create: PKBACK# 001
Anyone got any ideas? Was this a bug that got fixed by the latest release?
Best regards
Anoy
|
|
|
|
|
I was forgotten something to mention:
I have all permittions on the sharedirectory.
I can place a file, delete it, append it etc.
Jens
|
|
|
|
|
i have no more ideas, i lodge! Here's what i want to do:
Every time the kernel32.dll is loaded, it should load a arbitrary dll, which then should create a log file to capture the name and the process id of the process which has loaded the kernel32.dll (and so the injected dll).
Here's a brief summary of what my code does:
It searches for the section which can be executed, copies my code to the end of this section and changes the entry point in order to jump to my code, and after my code has been executed (and the dll has been loaded - which only should happen if the dllmain retrieves DLL_PROCESS_DETACH) it jumps back to the original entry point (which has been saved before).
The difference between a normal dll and the kernel32.dll is the calculation of the address of the LoadLibraryA function!
I have tried this whole thing with Windows 98, and if someone now says that i am crazy and the stuff mentioned before won't work, even not if a miracle happens, i can say you are wrong. Windows 98 executes my infected kernel32.dll like it does with the original one, without a sinlge error. And YES, my code is executed too, BUT and that's my problem, the injected code doesn't load the DLL, and I DON'T KNOW WHY!!!!!!!!!!!!
Can someone help me ?
Thanks in advance!
|
|
|
|
|
|
|
|
I hope u have gone through article below:
"Three Ways to Inject Your Code into Another Process"
By Robert Kuster
The chosen One
|
|
|
|
|
Yes, i did!
But my problem is that the LoadLibraryA function doesn't load the dll!!
|
|
|
|
|
hello, im very new to .NET. i started a new VC++ project (No MFC) and now i want to design an about-dialog.
so in my resources i add a new dialog and i want to put buttons, text-labels, etc. on it. but my toolbox is empty.
what can i do?
thanks!
|
|
|
|
|
I've been using VS.NET 2003 for over 6 months now without any problems. Over the last few days I've noticed that the output window is refusing to stay undocked between sessions. It doesn't matter what solution I load the output window always defaults to being docked when VS.NET loads. It will stay undocked for the duration of the session. Does anybody have any suggestions what might be causing the problem or know where the setting is stored?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
I've managed to rectify the problem by using the 'reset window layout' button from the options dialog.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Hi All,
How to write a antivirus program in vc++..
Regards,
A.Ilamparithi
|
|
|
|
|
First find some virus, study how they function, and how they infect the system, Then figure out how to reverse its action, And there you have an antivirus.
|
|
|
|