Rob,
I managed to trace thru the code example you sent me and found that
the error was occurring ONLY when anything other than CF_TEXT was being
saved to a file, and that I could get around the error by eliminating the
Win32 check. These lines I commented out and the multiple formats were then
read and written correctly. I confirmed this by adding a stringlist and
adding each of the enumerated formats to it and then saving it to a
separate, readable file.
//Win32Check(Data <> 0);
//Assert(Format = 0);
//if GetLastError <> Error_Success then RaiseLastOSError;
// Use 0 to designate end of data
I cannot say why this was causing the Win32 OS call failed error but
perhaps you can?
Still however, upon attempting to load the stored file back to a
stream and then the Clipboard I would again receive an error unless it was
CF_TEXT. This time the error stated that the "Segment has already been
discarded and cannot be locked!" The odd thing is that it is obviously
being discarded when the clipboard is emptied in the code you sent because
this occurs even if I leave the original information on the clipboard when I
attempt loading it again from the file! I infer from this that the data is
not actually being written to the stream in the first place, and thus the
data is nil. Am I wrong?
>From "Robert Meek"
Personal e-mail: [EMAIL PROTECTED]
dba / "Tangentals Design"
Visit us at: www.TangentalsDesign.com
Home of "The Keep"!
Member of: "Association of Shareware Professionals"
Moderator for: "The Delphi", "Delphi-DB", and "Delphi-Talk" programming
lists at elists.org,
and proud to be a donator to the Jedi VCL 3.0.
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi