|
Hi,
I am using SECDialogBar class inside mainframe.cpp , during my application exit and startup my dialogbar settings are getting written into .ini file. the standard framework is providing this by default, Is there a way to prevent it from reading and writing into ini file ? I want this behaviour for all dialogbars in the application except one, for this one dialogbar I want to control writing into ini file.
If you have any idea please let me know asap.
Krishna
|
|
|
|
|
Hi ,
I am using WinHelp2000 for dislaying Help on my application in VC++.
The help is displayed based on the language my application is being executed.
Lets say I can run my application in English and Italian.
The appropriate help file is loaded when i start the application, based on the language selected.
Now the problem is if I do not have help on a specific topic in Italian,then I should be able to display help on that topic in English.
If anyone knows a solution to this ,kindly help me.
Thanks,
Gayathri.
|
|
|
|
|
I am pretty sure if you call WinHelp, that you can detect if the requested topic was located. If not located, then open the OTHER help file and try to get the topic again. Default implementations of WinHelp calls typically do very little, if any, checking on the return status values of the function calls.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi ,
The problem itself is that though I am able to call Winhelp,I am not able to detect if the requested topic has been located or not.
WinHelp returns a value of TRUE even if it doesnt detect a topic and this is where I am stuck up.
If I can resolve this ,my problem is solved.
The Code snippet I am using is
::WinHelp(HWnd, HelpFilePath, HELP_CONTEXT, HelpTopic );
Thanks,
Gayathri
|
|
|
|
|
Typical MS BS
I did some experimentation, and indeed I observed the 'success' return value for an invalid topic - but no help window appeared whatsoever. I thought to check GetLastError and got a '5' back. However, when I called WinHelp asking for the contents, I got a success back (no surprise there) but GetLastError also again returned a '5'.
My summary is that this poorly documented or incorrectly written function (WinHelp) makes it impossible to disinguish between successful outcomes and failures.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Hi,
There have been many articles on codeproject and elsewhere on how to use a pdb file to generate a call stack, and other information in the case of a fatal exception. This works great but it requires the distribution of the pdb file with the .exe for the symbol lookup to work. This is a problem if you are worried about the possible reverse engineering of your application.
Interested to hear from anyone who may have considered this and possible solutions - e.g. encrypt .pdb file, etc
Thanks
Dig
|
|
|
|
|
|
Well, if the customer turns on the user dump, then you can get the dump file from them and analyze it post-mortem and usually tell exactly what the problem was anyway. No need to distribute the PDB at all. You do need to compile your release builds to contain the debugging information, hwoever, to make it useful.
Marriage slows down your coding, a baby slows it down even more!
|
|
|
|
|
Look up the "/PDBSTRIPPED" linker option. I think this is only available with VC>6. I think there is a utility that generates a "stripped" .PDB from a normal one (if you use VC6), but I can't remember the name.
Steve
-- modified at 1:27 Friday 13th January, 2006
|
|
|
|
|
Here's the story:
My program checks a LARGE numrer of Unicode RTF strings to find out whenever they contain one of predefined strings (given as plain text).
I need a way to search RTF string for plain text string (ignoring the formating tags). It would be pretty easy if it wasn't for the unicode part and lots of strange symbols (let me just say there's polish, english, russian and hebrew).
The only methods I could think of were serching rtf string and ignoring formating or converting to plain text an using simple cstringw::find
I've already atempted the second method and failed miserably (CRichEditCtrl + callback function + sf_rtf, sf_text, sf_unicode, as well as coping it to clipboard and atempting to capture it back).
Any WORKING method is welcome :>
Maciej Lisiewski
39s' hour of non-stop coding. I'm starting to see things and like visual studio.
|
|
|
|
|
Is there any reason you couldn't just go through character by character with your own search function?
For instance, something like:
int x = 0, j = 0;
bool MatchString()
{
while (string_you_are_searching[x])
{
if (string_you_are_searching[x] == predefined_string[j])
j++;
else
j = 0;
if (j == strlen(predefined_string))
return true;
x++;
}
}
Or something like that?
Kelly Ryan
|
|
|
|
|
Sadly, yes there is.
If I was just searching for a string inside another I'd do
if ((theString.Find(anotherString)!=-1);
But the string I'm searching in is not plain text, it's RTF. I can't just check whenever it has some other string inside because it might be ie. split in two by a formating tag, or if it contains non-english characters, it would have the waco RTF encoding in the middle of it.. :/
Anyone? I can hear a deadline zooming and it's not a good sound..
Maciej Lisiewski
Last 72 hours: Eating: 2,5h; Sleeping: 5,5h; Coding 62h; other: 2h.
Read-eyed: yup, Pale: you betcha, Barely awake: barely alive
-- modified at 4:15 Tuesday 10th January, 2006
|
|
|
|
|
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
|
|
|
|
|