News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Programmatic Access to the Recycle Bin

Started by baltoro, August 30, 2011, 08:36:30 PM

Previous topic - Next topic

baltoro

This might be a subject of interest to some of you MASM Forum members,...
Raymond Chen has a blog entry entitled: How Can I Get Information About the Items in the Recycle Bin?
Baltoro

baltoro

#1
...Seeing as MASM programmers are so fascinated with this subject,...I thought I should post part two,...
Modernizing Our Simple Program That Retrieves Information About the Items in the Recycle Bin

And, Raymond Chen has posted a third blog entry about items in the Recycle Bin,...so, I am adding this link for completeness:   
Invoking Commands on Items in the Recycle Bin
Baltoro

Vortex

Hi baltoro,

Thanks for the links. Reading the reader comments :

QuoteCOM is not a friendly technology to program.

I agree. COM is very complicated to learn and use.

QuoteC++ cannot be called by non C++ code cleanly.

Now, is C++ a "clean" language?

baltoro

VORTEX,   
Interesting comments. COM is especially difficult to do correctly in assembly language. In fact, I didn't even think it was possible until I visited Japheth's Website. This page: COM and Assembly has an enormous amount of information (source code examples).
I learned COM by reading Don Box's book: "Essential COM"
But, in all honesty, I use Visual Studio to write COM (which I do very infrequently),...mainly because of the MIDL Compiler
Baltoro

Vortex

Hi baltoro,

Japheth is the expert of COM programming in assembly. Personnaly, I prefer to keep things related to COM simple as possible. COM is not easy to read and maintain. Maybe I am going off topic : A lot of people can create extremely complicated code but writing readable,clean and understable code is another art. I don't guess that COM can be a part of this.

baltoro

Right. I think I've seen a few COM examples posted here by EDGAR, for instance:

I have to suspect that you EDGAR, and Japheth are the only people in the galaxy that write COM in assembly,... :eek
Baltoro

Vortex

Quote from: baltoro on August 31, 2011, 09:08:14 PM
I have to suspect that you EDGAR, and Japheth are the only people in the galaxy that write COM in assembly,... :eek

Hi baltoro,

To tell the truth, my COM knowledge is very modest and my COM examples are very elementary and simple. Edgar has nice COM examples and I appreciated his efforts. Japheth and Edgar are presenting good work related to COM.

baltoro

As regards COM,...it's not fun to learn. I had to force myself to become acquainted with it, bacause I read somewhere that an awful lot of the components that the Windows System commonly uses are COM. If you examine the OLE/COM Object Viewer, you'll see this is true.
Baltoro

Vortex

Yes,  I know COM is allmost everywhere in Windows. I don't understand why humanity is inclined to make things more and more complicated. COM is not an exception here.

From Bogdan Ontanu's web site :

Quote"Any intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
- Albert Einstein

A designer knows he has achieved perfection
not when there is nothing left to add,
but when there is nothing left to take away.
- Antoine de Saint Exupery

baltoro

#9
 :bg ...Ha,...Ha,... :bg
Yeah,...if I ever see Don Box,...I'll be sure to back over him with my car,... :eek

I think what makes COM difficult is that it is designed to be remoted. And, the security it has to implement to do this is buried deep within just a few COM interfaces. It's BIG weakness, I think is that all the necessary configuration information resides in the Registry, where any idiot can find it.
Don't tell HUTCH this,...but, I think if I was actually a hacker/evildoer,...I'd be using COM for just about everything,... :eek
Baltoro

Vortex

Quote from: baltoro on August 31, 2011, 09:38:56 PM
I think is that all the necessary configuration information resides in the Registry

The registry is another complicated database too. Instead, why not to create and use simple and readable configuration files? Just have a look at Vista, 7 and Server 2008 : they introduced a registry based information store to replace the simple boot.ini file...

redskull

I never really had too much problem with COM, but that's probably coming from a C++ background first.  I think it makes perfect, logical sense if you look at as a way to write truly object-oriented code; of course, if you don't care to write object oriented code in the first place, then it will no doubt seem overly architectured and complex.  My only real beef with COM is the threading model is truly heinous, it being sort of 'tacked on' after windows went 32-bits.  Other than that, it all seems pretty straightforward, given the goals. 

IMHO, some of the stuff you can do with COM is really, truly amazing

-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

Geryon

COM is just a system wide class factory pattern.
If your language don't have "->" operator, it would be frustrating due to "pointer of pointer of pointer of ....." thing.
The main purpose of COM is prevent conflict of different version of same dll.
"Some people have got a mental horizon of radius zero and call it their point of view." --D.Hilbert

dedndave

Quote from: Geryon on September 01, 2011, 07:45:18 AM
COM is just a system wide class factory pattern.

that's easy for you to say   :P

the first thing i noticed when i started reading the docs was that i saw about 20 new buzz-words in the first paragraph   :lol

baltoro

Yeah,...funny,... :eek
That's one of the most annoying aspects of learning COM initially,...getting used to the clinical language that authors use to describe the COM interface archetecture. And,...what most authors don't make clear (and. the MSDN docs are notorious for this...) is why the essential features of COM exist in the first place. That's why I always recommend Don Box's book. He starts off describing serious problems in the evolution of C++, in particular, the DLL Hell problem. He provides clear examples demonstrating in detail, how and why it occurs,...and, then, suggests a better way to define and implement a class object, so that it is essentially impossible to crash your program by importing a DLL function that is incompatible with your local definition (in the binary sense).
...So,...COM can be thought of as a better C++,...
Baltoro