|
Being RTF doesn't prevent a character by character search though, my point was that by writing your own char by char search you can ignore the things you want to ignore.
For instance anytime you see a \, ignore the following letters until you see a space or a return. Anytime you see a change to another language, ignore all following characters until you see a change back to English, or whatever language you're looking for.
Of course this is assuming the strings you're searching for don't contain \ in them. But if they don't, you should be able to do something along those lines. And even if they do, worst case scenario you could write up a list of all the formatting tags to ignore (horrible but it would work), and every time you see a \, begin to compare to that list, if you get a match, ignore that word, if not, tack it onto the current string you're looking through for comparison.
Kelly Ryan
|
|
|
|
|
KellyR wrote: For instance anytime you see a \, ignore the following letters until you see a space or a return. Anytime you see a change to another language, ignore all following characters until you see a change back to English, or whatever language you're looking for.
So basically write my own code to convert rtf2txt.. a lot of work, which I'd like to avoid.
KellyR wrote: Of course this is assuming the strings you're searching for don't contain \ in them.
RTF uses it's own control codes.
Maciej Lisiewski
|
|
|
|
|
Hi guys,
I'm trying to figure out how to replace a system DLL ( ws2_32.dll ) with a DLL of my own, but am not sure how to go about creating a wrapper.
I have two goals, one is add some code of my own into the DLL_PROCESS_ATTACH part of DLLMain so that the DLL will execute it when loaded.
The second is to pass calls to Send to my own custom Send function first, then go on to the original Send call so that everything works normally.
All other DLL functions should work normally.
I guess I need to see an example of how a wrapper is created. Can anyone redirect me to the appropriate article?
I know how to write a DLL, I've just never written a "hook" before and tried to intercept a Win32 API call. Any help will be appreciated, thanks!
- Mithra
|
|
|
|
|
There are samples of API hijacking on the CodeProject website.
Do a search
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Thanks Blake,
What I was REALLY looking for here is minimal confirmation I was looking at the right material, OR had reasonable expectations and was using correct terminology. If I knew anything about hooks I wouldn't have asked. I'm guessing the API Hijack material is what I need to be looking at, http://www.codeproject.com/dll/apihijack.asp .
|
|
|
|
|
I am using IE6.0 with SP1, Win2K professional. And VC++6.0 version.
When I run our online bank appilcation, the appilcation is getting crashed and I am getting a window saying “Microsoft Internet Explore has encourned a problem and needs to close….”. When I click on Debug button, I am getting another window with error message: “The exception unknown software exception (0xC00000fd) occurred in the applicatin at the lcoation 0x6c3a3c97.
And then I am getting Unhandled exception in IExplore.exe (MFC42.dll):0xC00000FD: Stack Overflow.
This application runs perfectly. This error is getting raised with only some perticular type of checks only.
Any help will be highly appricated.
Below are errror messages I got from dissembly.
Loaded 'C:\Program Files\Internet Explorer\IEXPLORE.EXE', no matching symbolic information found.
Loaded 'C:\WINNT\system32\NTDLL.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\KERNEL32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\USER32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\GDI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\SHLWAPI.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ADVAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\SHDOCVW.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\SHELL32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\OLE32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\BROWSEUI.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\browselc.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\clbcatq.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\OLEAUT32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\WININET.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\CRYPT32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\cscui.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\cscdll.dll', no matching symbolic information found.
Loaded 'C:\Program Files\Adobe\Acrobat 7.0\ActiveX\AcroIEHelper.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msvcr71.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\URLMON.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\lz32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\MSHTML.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\shdoclc.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\mlang.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\PDM.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\MSDBG.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msls31.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\winmm.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\wdmaud.drv', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msacm32.drv', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msacm32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msadp32.acm', no matching symbolic information found.
Loaded 'C:\WINNT\system32\wsock32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ws2_32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ws2help.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\RASAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\RASMAN.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\TAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\rtutils.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\sensapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\USERENV.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\NETAPI32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\secur32.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ntdsapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\dnsapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\WLDAP32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\netrap.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\samlib.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\msafd.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\wshtcpip.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\RNR20.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\IPHLPAPI.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\icmp.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\mprapi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\activeds.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\adsldpc.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\SETUPAPI.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\DHCPCSVC.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\winrnr.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\rasadhlp.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\jsproxy.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\jscript.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\mshtmled.dll', no matching symbolic information found.
Loaded symbols for 'C:\projectW23\ddeposit\clasp\wrapper\code\WFSCAN\Release\ABCScan.ocx'
Loaded 'C:\WINNT\system32\mfc42.dll', no matching symbolic information found.
Loaded 'C:\Program Files\ Ranger.ocx', no matching symbolic information found.
Loaded 'C:\WINNT\system32\OLEPRO32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\MVXApi.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\WINSPOOL.DRV', no matching symbolic information found.
Loaded 'C:\WINNT\system32\mpr.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\vbscript.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\baroc.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\AXBAR32.DLL', no matching symbolic information found.
Loaded 'C:\Program Files\BulletIQA.ocx', no matching symbolic information found.
Loaded 'C:\WINNT\system32\COMDLG32.DLL', no matching symbolic information found.
Loaded 'C:\WINNT\system32\oledlg.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ltocx14N.ocx', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ltkrn14N.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ltefx14N.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\LTDIS14N.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ltimg14N.dll', no matching symbolic information found.
Loaded 'C:\WINNT\system32\ltfil14N.DLL', no matching symbolic information found.
The thread 0x620 has exited with code 0 (0x0).
The thread 0x980 has exited with code 0 (0x0).
First-chance exception in IEXPLORE.EXE (MFC42.DLL): 0xC0000005: Access Violation.
First-chance exception in IEXPLORE.EXE (MFC42.DLL): 0xC0000005: Access Violation.
The thread 0xB18 has exited with code 0 (0x0).
First-chance exception in IEXPLORE.EXE (MFC42.DLL): 0xC0000005: Access Violation.
The program 'C:\Program Files\Internet Explorer\IEXPLORE.EXE' has exited with code 0 (0x0).
|
|
|
|
|
Run your application under debugger and when the it crashes again, check the call stack and see what is that you are doing to crash IE.
I guess C:\projectW23\ddeposit\clasp\wrapper\code\WFSCAN\Release\ABCScan.ocx this is the activeX that you have developed.
-Prakash
|
|
|
|
|
I am new in c++, can Anybody tell me how one can divide image into blocks.
I have yuv format image saved in byte memory. I want to divide it into 16x 16 blocks The image size is 144x176.
I want to process further each block for calculating motion estimation .
Thanks
koreno
|
|
|
|
|
Seeing as it's in a non-Windows format, I assume you have a bunch of raw pixel data. Surely, you just need to create 16x16 blocks of memory ( well, 48x16 ) and copy the data across ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a video sequence foreman.yuv.I can read frame separately, But my questions is still there , The data is in byte memory in an array, while i need a 16x16 block in raster form .
I know it is not difficult question but I could have idea how i will use loop to acquire the refereces to each block in the image .
koreno
|
|
|
|
|
What do you mean by 'in raster form' ? Do you need it to be RGB ?
I'm not sure what the overall format is here, but YUV is still a format where one triple is a pixel, right ? So, you just need to copy out the triples for the pixels you want. Which means working in blocks of 48, and then working out the number of bytes in a row in order to jump by rows.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
this should be no problem if u know it's data format.
I don't know what format u are reffering to, so lets assume the pixels are arranged in lines and are 4 bytes.
Now u can just read the blocks in a double loop:
int bx = block_x*block_width;
int by = block_y*block_height;
for(int x=0; x<16; x++) {
for(int y=0; y<16; y++) {
int pixel = data[(y+by)*img_width+(x+bx)];
}
}
HTH,
|
|
|
|
|
Hello!
I have made a tiny change to a console-application I've been using for years. I changed some variables of type 'unsigned long' into '_int64' to be able to represent larger numbers. As a result the application now halts before execution even enters the main() function. Only after I give a character input and then hits return does the program start its normal execution. This is inconvienient since the program is normally run as a child of another application.
Any ideas about how to fix this?
Thanks in advance!!!
maladuk
|
|
|
|
|
If you change those __int64 references back to unsigned long , does it start working again?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I got another hint which I checked out first, that the error could stem from erroneous initialization in global objects. It turned out to be the case.
Thanks a lot for engaging anyway!
maladuk
|
|
|
|
|
Hi,
I was just wondering if anyone else has ever seen this problem, and might be aware of a fix for it:
I'm calling malloc in a recursive fuction I recently wrote, and it gets called a ton of times very quickly, could be 1-2k times or more per fraction of a second.
For some reason, if I have it call too many times, the program crashes. If I lower the bounds of the recursive exit slightly, then I can get it to work most of the time. Lowering the bounds further will result in the program working 100% of the time, but I don't get the results I need (it needs to be very precise).
Of course the first instinct is to assume I'm running out of memory, but no, that is not the case, I'm calling malloc on tiny tiny portions of memory and when the program crashes it's normally only using between 1700 and 3500K of RAM.
The program is actually crashing inside of malloc so there isn't much I can do about the function itself, it doesn't even get to the return.
I tried placing sleep calls into the function but this strategy didn't work, as well as causing the function call to take horrendously long amounts of time to run.
Any ideas?
Thanks!
Kelly Ryan
|
|
|
|
|
KellyR wrote: I'm calling malloc in a recursive fuction I recently wrote, and it gets called a ton of times very quickly, could be 1-2k times or more per fraction of a second.
Recursion is very stack-intensive.
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
Are you sure that malloc is the cause? or are you running out of stack space by making all those recursive function calls. You must remember that every time you make a recursive function call new storage space is allocated on the stack for the parameters, and all your register values are also pushed onto the stack so that they are saved for when the function returns. If you make too many recursive function calls you stack will get used up very quickly and your program will crash.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
That's probably what it is, thanks.
Kelly Ryan
|
|
|
|
|
In C/C++ when u malloc() memory you allocate heap, which is memory. Whereas your recursion calls are like the proverbial stack of plates. Each pass takes one more away until they are all gone.
You could increase the stack space in you program but that will only buy you a temporary fix. Instead you should probably revist the design of your app and decide if recursion is really needed.
Good Luck
Mike Luster
|
|
|
|
|
Hello,
I have a GUI application developed in VS.net. Depending on a users OS, they may require that certain DLL's be in the system folder(s) in order for the GUI to run.
Can someone tell me how to develop a simple installation CD, that will load the GUI exe, and then load the required DLL(s) onto the users system.
Thanks.
Jerry
|
|
|
|
|
Google for InnoSetup.
~RaGE();
|
|
|
|
|
Microsoft Visual Studio .NET 2003 -> File -> New Project -> Setup And Deployment Projects -> Setup Wizard -> ...
From here you should do everything its not difficult
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
jerry1211a wrote: Can someone tell me how to develop a simple installation CD, that will load the GUI exe, and then load the required DLL(s) onto the users system.
In Continuation with Mr. Rage,
here is the link for InnoSetup:-
http://www.jrsoftware.org/isinfo.php[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks for providing the link.
~RaGE();
|
|
|
|
|