|
i just wanted to ask, how one could search some text in a binary file, for example i want to check, if an exefile is packed with UPX and therefore i want to search the file for the String UPX . How can i do this ?
Looking forward to some Answers
Andrea
|
|
|
|
|
in an editor just switch to ascii mode even if the file is binary and do a search ... or figure out the hex string and search in hex mode (ultraedit does this nicely)
in code just load the file into a memory buffer and trundle thru it (the boyer-moore algorithm is a winner for this stuff)
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi,
How can I let the user open multiple child frames (with different views)with the same document? When the user changes something in one of the frames, all the frames with the same document should be updated and redrawn too. There should be one main window for each document. Also the data in the document can be displayed differently, depending on the type of frame the user opened. I've noticed that Cakewalk does this.
Thanks a lot!
Erik
|
|
|
|
|
this subject is covered ad infinitum in msdn and other places if you read a little
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi.
Does any know how to detect a url entry in internet explorer in client side?
I what to develop a filter (for internet access) for a network that don't have a server ( all machines use as default gateway a router). My idea: develop a filter, runnig in each computer that enable or disable a connection to an url entry by ie5.5. Is this possible? Any sugestions (a server is out of the question )?
THX
|
|
|
|
|
Sounds like a browser helper object (BHO) will work for you. Your object will be notified when the user navigates to a new URL, and you can then do whatever you want. This is really easy to defeat, though; the user can just remove your object from the list of BHOs in the registry.
--Mike--
http://home.inreach.com/mdunn/
This must be Thursday. I never could get the hang of Thursdays...
|
|
|
|
|
I have done a program which runs in system tray for windows session statistics (start-time, end-time, ...) but on shutdown the code to write the time into the logfile is never executed because the program is terminated immediately!
Help!!!
|
|
|
|
|
You can do this, by handling a windows messages: WM_ENDSESSION and/or WM_QUERYENDSESSION.
For details look at the MSDN library
Davorin Perkovic - Pjero
|
|
|
|
|
Is there anyway to prevent another application from injecting hook dlls into my application. I should be able to unload such a dll but since I didn't load it, I dont have the dll handle. Any ideas?
|
|
|
|
|
Hi,
I have created an SDI application. The View of my application has an ::OnCommand handler in order to catch a message from an external engine. At some point in the …::OnCommand handler of my View, I call a Modal dialog which also has an …::OnCommand handler in order to be able to catch the subsequent same-type of messages from the external engine. The Modal Dialog is called and displayed but the subsequent messages from the external engine are still caught by the ..:OnCommand handler of my View and not from the corresponding handler of my Dialog. Is it possible to, somehow, de-activate the handler of the View once the Dialog is displayed, so as the subsequent messages from the engine to be serviced by the …:OnCommand handler of my Dialog?
I thank you in advance and I hope you have a nice day,
Christos P.
|
|
|
|
|
You know how you see some programs where all the text in the edit box scrolls the text automatically and without scroll bars on the side?
How do I do that in an MFC application?
If you can help, Id appreciate it alot!!
Thanks
Ashman
|
|
|
|
|
Tick the box that says autoscroll in the dialog editor, in the properties for the edit control.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
or do you mean like a scrolling credits window thingie?
if so theres a couple here on codeproject in one of the sections (cstatic i think)
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Yeh, where the text goes from the top to the bottom at a set speed like you see in some Nukes, Hacking progs, etc?
What projects are there on Codeproject, can you get an URL for me plz?
Thanks
Ashman
|
|
|
|
|
I'm a junior WTL Programer.
I want to know how to use CList and CArray in my WTL code.
Thanks in advance
|
|
|
|
|
CList and CArray is MFC not STL....
I dunno how to use both MFC and WTL in the same project...
- Anders
|
|
|
|
|
If you really want the STL classes, use list<> and vector<>. As already stated, CList and CArray are MFC.
--Mike--
http://home.inreach.com/mdunn/
This must be Thursday. I never could get the hang of Thursdays...
|
|
|
|
|
|
A prooject I have inherited at work uses MFC extension DLLs which contain Dialog classes. The DLLs are loaded using AfxLoadLibray.
The overall build environment was set up under Win95 DOS using GNU tools with a BASH shell. When building the Japanes version of the program the only thing that is different is the RC with the Japanese strings. However, the release build of only ONE DLL results in a faulty DLL which fails at the LoadLibray point. If I rebuild the DLL using Visual Studio it is fine. If I copy the OBJ and RES file across and let the Make file link them the DLL is fine. Debug builds are fine. I am at a loss where to look.
The reason make was used is because a large amount of the code is generated using Awk, parsing an export from an Access database.
ANY suggestions will be welcome.
Happy programming!!
|
|
|
|
|
if(lpCacheEntry->CacheEntryType&URLHISTORY_CACHE_ENTRY)
{
if (strstr(lpCacheEntry->lpszSourceUrlName,"http") != NULL)
{
times = new CTime(lpCacheEntry->LastAccessTime);
if (strcmp(times->Format("%Y/%m/%d/%H%M%S"),Last_Connect) > 0 )
{
fprintf(fp,"%s;%s;%d\n",strstr(lpCacheEntry->lpszSourceUrlName,"http"),times->Format("%Y/
m/%d/%H%M%S"),lpCacheEntry->dwHitRate);
strcpy(temp,strstr(lpCacheEntry->lpszSourceUrlName,"http"));
strcpy(tmp,"http://");
strcpy(temp,temp+7);
strcat(tmp,strtok(temp,"/"));
fprintf(fp,"%s;%s;%d\n",tmp,times->Format("%Y/%m/%d/%H"),lpCacheEntry->dwHitRate);
nCount++;
}
lpCacheEntry->dwHitRate = 0;
SetUrlCacheEntryInfo(lpCacheEntry->lpszSourceUrlName, lpCacheEntry, CACHE_ENTRY_HITRATE_FC);
}
}
delete[] lpCacheEntry;
what's this?
|
|
|
|
|
Hello all!
Does anyone know how I can determine (on Win NT4, Visual C++) the application (executable file name including the path) that is registered to a document?
I just need the application name, I do not want to spawn a process with ShellExecute. The way I'm doing it right now is calling the 'GetClassFile(FileName, &ClsID)' method and then searching for the matching registry entry.
This works fine for most file types but it fails for example for '.txt'-files. 'GetClassFile(...)' returns 'MK_E_INVALIDEXTENSION' in this case although '.txt' is registered...
I'm sure the solution must be a very obvious one, can someone give me a hint on this?
Chris
|
|
|
|
|
Serendipitous - was just perusing DiLascia's latest, where he mentions FindExecutable .
|
|
|
|
|
Hi any 1 out there
I have a problem and it is so interesting to me...
Ok here it comes
IDE: VC++ 5.0
Project: A simple console application that compresses files using LZW algorithm...(It has to be Win32)
Problem(s)
Project Setting: Win32 Debug >> Everyhing is OK.App. is slow but fine.
Project Setting: Win32 Reelase Optimization : Default >> Hmm...Memory Access Violation error!!! And app. is down...
Project Setting: Win32 Reelase Optimization :Maximize Speed >> No memory access error but the compressed file is ooo 22 bytes.It doesn't matter whether src file is 2M or 2K it is still 22 bytes ??
Thanx....
|
|
|
|
|
Hi any 1 out there
I have a problem and it is so interesting to me...
Ok here it comes
IDE: VC++ 5.0
Project: A simple console application that compresses files using LZW algorithm...(It has to be Win32)
Problem(s)
Project Setting: Win32 Debug >> Everyhing is OK.App. is slow but fine.
Project Setting: Win32 Reelase Optimization : Default >> Hmm...Memory Access Violation error!!! And app. is down...
Project Setting: Win32 Reelase Optimization :Maximize Speed >> No memory access error but the compressed file is ooo 22 bytes.It doesn't matter whether src file is 2M or 2K it is still 22 bytes ??
Thanx....
|
|
|
|
|
Well, there are many assumptions an optimizer must make. And while there are indeed bugs in the optimizer, chances are you are depending on some side effect in your code that gets optimized away.
What you need to do is isolate your code down to the smallest possible reproduceable case and then post it, perhaps we can help.
|
|
|
|