Windows API Tutorials by Unknown
Author:Unknown
Language: eng
Format: epub
Tags: comp_programming
IMalloc * SComMalloc::GetMalloc () {
IMalloc * malloc = 0;
if (CoGetMalloc (1, & malloc) == S_OK) return malloc;
else return 0;
}
That's all there is to know in order to start using Windows95 shell and its COM interfaces. Here's an example. Windows95 shell has this notion of a Desktop being the root of the "file" system. Did you notice how Windows95 applications let the user browse the file system starting at the desktop? This way you can, for instance, create files directly on your desktop, move between drives, browse a network drive, etc. It is, in effect, a poor man's Distributed File System (PMDFS). How can your application get access to PMDFS? Easy. For instance, let's write some code that will let the user pick a folder by browsing PMDFS. All we need to do is to get hold of the desktop, position ourselves with respect to it, start the built-in browser and retrieve the path that the user has chosen.
char path [MAX_PATH];
path [0] = '