Hello NitramR, Try this idea. I haven't checked it out, but it should work. There are a few different ways of acheiving the end result. 1a) System wide hook that hooks each process. This loads your spy DLL into their process when their process starts. 1b) Use CreateRemoteThread() to inject your DLL into the running process. You'll need a thread to watch for new processes and then inject your DLL into each new process. This is more complicated than a system wide hook, but acheives the same result. 2) Your DLL will then hook the Kernel/User/GDI/whatever DLL functions that you think are appropriate. In this case you'll want to be hooking User32 functions related to finding windows. In your hooks you'll let the function execute then examine the return value before returning. If the value indicates your window you'll overwrite the value to indicate failure. 3) Their program will search for the window and fail. There is info on hooking technique elsewhere on this site and also in MSJ/MSDN website/magazine. Caveats. -------- If they know which DLL you are loading they may be able to write code to hook LoadLibrary and LoadLibraryEx and prevent the library from loading dy diverting the function call and returning a library not loaded return code. Not hard to do. If they get their hooks in before you get your hooks in, you have lost the battle. Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
Stephen Kellett
Posts
-
Prevent from getting Window Handle -
KDE v's GNOMEThis version came close to the visual appearance of MSVC, but failed in a very important aspect - the editor was a ONE source window at a time application - plain SDI. Indeed, I've met quite a few talented people that insisted on using cough, splutter - vi - the worst editor in the world, after edlin. Single file at a time, or multiple files, but only sequentially, and fully modal interface. Completely unproductive software. But, switch to Emacs, turn on cough, splutter vi mode, and you've a decent multi buffer, fully configurable editor, complete with keystroke compatible vi emulation. I still think thats appalling, but at least its somewhat productive. These days I get to think about the type of people I want to hire. And sure I want bright guys and gals, but I want them productive as well, and by definition, vi isn't. So why do people use this appaling product? Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
KDE v's GNOMEDamn, That would have been so much cooler if I'd said... As to which is better, KDE or Gnome, I've no idea, truth is a three edged sword. :-) Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
KDE v's GNOMETrue, KDE uses QT which is free for use if your app is free to use. If your app is commercial then QT has a license fee/royalty attached. Can't remember which. However, if you are targetting Windows *as well as Linux and Unix*, then QT is clearly the way to go as the GUI only gets written once, provided of course that you write the QT version prior to writing the Windows/Linux/Unix version. Ahem, I've just finished my Windows prog and it doesn't use QT, so I'm up a gum tree without a paddle, or something like that. As to which is better, KDE or Gnome, I've no idea. I haven't looked into it. Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Speaking of the pommiespedant mode, *engage*, I thought it was 52nd State of the USA. Didn't "The The" do a song about that on the "Infected" album? Cheers Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
MVC for MFCAnd of course the code Norm has suggested doesn't work if your object can also be instantiated as an OLE/COM server. In which case you are down to (if you are lucky enough) to using virtual methods, and if you are not lucky enough doing a *VOMIT* IsKindOf() on the object and doing the appropriate thing with the pointer based on whether it really is a CFrameWnd or a CSomethingOrOtherOLEServerThisThatTheOtherObject. Just lurve that OOD. Stephen Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Pascal calling convention !!Correct. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Who's afraid of memory leaks?Memory leaks and related problems such as memory corruption are responsible for a large amount of the consultancy work I do. People hire me to fix memory leak problems their own staff can't fix, or don't have the time to fix. For example, people using CAD systems are often willing to wait over an hour for extremely large models to load into memory. Personally I wouldn't wait that long, but that isn't the point, I've heard about such people from support staff. When they do this, they may schedule the document to load an hour before they arrive at work, intending to work all day modifying the document, before saving when they leave the office. The last thing they want to is to run out of memory part way through the day, spend an hour saving and then another hour reloading the document. It doesn't have to be 24/7 apps that are critical. The above example is real and I found out about whilst beta testing a related product. Also, consider this, when your application uses more virtual memory than physical memory, the operating system must page data out and page data in from disk each time your application references memory that is not in physical storage. This is a serious performance killer. Garbage collected programs always perform badly in such scenarios. Programs with bad memory leaks usually end up in this scenario. If you get to this stage, tuning your algorithms won't help one bit, you need to address the memory usage. If memory leaks are the reason for the memory usage, you need to address the memory leaks. Multi-threaded bugs are just as important, possibly more important if your application consumes very little memory and runs for short time durations. Its like comparing apples and oranges, rather than comparing Granny Smiths with Golden Delicious - Granny Smith every time! Cheers Stephen Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
PDF as interactive help?Why would you want to inflict PDF on anyone? The viewer is appaling. Scroll from one page to the next with no warning whatsoever, so then you have to scroll back up to read what magically disappeared when it jumped pages. A truly awful product. Its a shame as Adobe's products are generally excellent. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Balmer doing the dance!The start reminded me of Jerry Springer! Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Freeware CASE ToolJohn, Together J++/Together C++ claims the ability to reverse engineer a project as well as update the project from the UML diagrams. I tried it (the java version for a client of mine) 2 years ago and it failed to parse the app (or maybe I didn't wait long enough, I though 2 hours was enough...). That siad they have buckets of testimonials, so I guess the app I'd written was the one that broke their project. As I said, I tried the Java version, but they also do a C++ version. The single user is free, the team version is (from memory) $1000, but check their website. I don't use their product. I have no connection with them. The app I tried it on was grown in an evolutionary style, because the gentleman I was developing it for, didn't know what he wanted in specific terms, and he actively wanted "try this" "try that" style development. We tried Together J++ to try to get a UML description of the (at the time) product. The product is now on sale (helps blind/partially sighted to read HTML/txt without a screen reader) and we still don't have UML diagrams. Sorry I don't have a URL to hand. Try google... Stephen Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Balmer doing the dance!You cruel, cruel man, I love you :-) Way funny Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Linker optionsNot that I'm aware of. Its generally straightforward to sort out. Don't worry about trying to guess which libs you need. After a while you'll learn which libs you need. But if you don't know which libs you need repeat the following procedure:- 1) Link as normal. 2) if no errors, then finished (duh!) 3) Look at the first link error. Identify the function name that is not resolved. Look it up in MSDN. The entry in MSDN will tell you which lib you need (if its a COM object it may not, then you'll need to hunt around a bit). 3a) if the function name is not in MSDN check that it isn't a 3rd party lib you have forgotten to list. 4) Now relink. The reason for not worrying about the remaining errors is that many of them may be for the same lib as the first error. 5) Repeat from (3) until no errors. After a while you'll be able to realise which function come from which lib and you'll be able to do more functions/libs in stage 3 than I've suggested above. None of that was rocket science, and it isn't really that hard. Cheers Stephen Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Name your most hated technology- Caravans 2) Mixer taps (mixer faucets to you Americans). Damned inefficient... want a drink of cold water, you have to run the thing for a while to get rid of the hot/luke warm water. Aaargh, I hate mixer taps. Hey, you said technology, not computer technology :-) Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Recommend a Help/Documentation package?Thanks for the recommendations. I've been looking for a package like "help and manual" for ages. I'd always held off buying a package until I absolutely needed one. Glad I wait now that I've been shown H&M. This looks like it is exactly what I want. Of course I may change my mind once I've used it... Thanks to all that replied. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Converting CString to int in Visaul C++, please help.Or you could use strtod() and strtol(). strtol() is useful if you want to read a number that is not in base 10. For example to read hex numbers use strtol("0x12345678", NULL, 16) _tcstol() and _tcstod() are the macros for UNICODE/MBCS portability Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Recommend a Help/Documentation package?Recommend a Help/Documentation package?
Title says it all. I don't mind if the package needs Office or doesn't need it. Pros and Cons etc. I'm a software developer, not an author, but I need a help system now, so help me :-) All feedback appreciated. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice. -
Dual Processor BoxThanks for the replies folks. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Sharing dynamically allocated data across DLL instances?You are correct they will be in their private address space. However you could pass messages with object index in them. Each process would have its own objects and you'd gain access to them via the object index/id which you would use as a hashtable key/array index/ whatever. You could also try something with a memory mapped file. All processes could map the same file and try for the same load address. Then write your objects in there. Yuck. Or worse, they don't load at the same address, so them you are down to offsets from the memory mapped file address. Double yuck. Can't think of anything for now... Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.
-
Court vacates MSFT rulingHa! You obviously haven't tried, (or as in my case read about) how hard it is to programatically navigate a directory tree on an Apple Mac. MAybe my info is out of date, but what I read was, they published the documents, then from that point on, everything is an update, so you have addendums left right and center. Talk about hard to handle documentation. No one source and all that. Stephen Kellett -- C++/Java/Win NT/Unix variants Memory leaks/corruptions/performance/system problems. UK based. Problems with RSI/WRULD? Contact me for advice.