To ensure that everything happens in a thread-safe way, use SHGetMalloc to get the pointer to the shell s memory allocator an object implementing IMalloc. Then, use IMalloc s Alloc method to allocate the memory needed to hold the Unicode representation of the Infotip text. The accompanying source code contains the standard code you will use for all Infotip Extensions you create. Simply use the same code and your extensions will be shell friendly and thread-safe. IPersistFile is what the shell uses to provide the extension with information about the file the user is hovering over.
Load opens the specified file and initializes an object from the file contents.
We use this method to retrieve the name of the file the user is hovering over. Save saves the object into the specified file. SaveCompleted notifies the object that it can revert from NoScribble mode to Normal mode. GetCurFile gets the current name of the file associated with the object. To begin, we need to create an automation object called DPRInfoTip.