Search code examples
winapifile-copyingsymantec

Using Win32's ::CopyFile to retrieve file from Symantec Enterprise Vault


I'm having a problem copying a file from a Symantec Enterprise Vault. Usually, I use the Win32 ::CopyFile function to copy from one NTFS to another. Now, the NTFS has a special symbolic link or shortcut. If you access the shortcut via Windows Explorer, the Symantec service intercepts the request and recovers the full file for you. This does not seem to happen when using the API call. It appears that the retrieval is occurring, but the API call doesn't wait for it to complete.

Is there a method for interacting with these special shortcuts programmatically?


Solution

  • I assume by IE you mean "Windows Explorer" and NOT "Internet Explorer"...
    IF Symantec just intercepts so-called "shell operation" as your description suggests then you need to use SHFileOperation for that...

    see

    http://msdn.microsoft.com/en-us/library/bb762164%28v=vs.85%29.aspx

    depending on your OS it could be better to use IFileOperation

    http://msdn.microsoft.com/en-us/library/bb775771%28v=vs.85%29.aspx

    BOTH methods behave exactly as if the copy operation was handled by Windows Explorer (for example when you copy a file manually) thus would engage the Symantec Intercept in the same manner...