Hi
VERIFY(wmfDC.Create("c:\\My Documents\\ppp.wmf")) gives assertion error
VERIFY(wmfDC.Create("c:\\temp\\ppp.wmf")) does not
so Create function does not support long filenames?? cuz there is no any other fails...
thanx alot
Printable View
Hi
VERIFY(wmfDC.Create("c:\\My Documents\\ppp.wmf")) gives assertion error
VERIFY(wmfDC.Create("c:\\temp\\ppp.wmf")) does not
so Create function does not support long filenames?? cuz there is no any other fails...
thanx alot
Test by eliminating the space from "My Documents":
VERIFY(wmfDC.Create("c:\\MyDocuments\\ppp.wmf"));
If this works, the problem is the space in the "My Documents". You may need to surround the path in quotes if you want to include the space:
VERIFY(wmfDC.Create("\"c:\\My Documents\\ppp.wmf\""))
Many programs have the bug/feature of having to specify quotes around paths and file names that have spaces.
Also, what was the assertion error?
Regards,
Paul McKenzie
You know, it does not work also on directory names more than 8 chars, not only on space included pathe names...
I am using VC 5.0
it works on VERIFY(wmfDC.Create("c:\\aaa\\ppp.wmf"));
and does not work on
VERIFY(wmfDC.Create("c:\\aaaaaaaaaaaaaaaaaa\\ppp.wmf"));
I Have tryed VERIFY(wmfDC.Create("\"c:\\My Documents\\ppp.wmf\"")) but got the same error...
thank you for reply
P.S.
The error was not Assertion sorry, it was Verification error -> VERIFY(....)
There is a way to convert from a long file name to a short file name. Use the function GetShortPathName(). I think that there's one small catch... if you're trying to get the path name to a file or directory that doesn't exist, I think the call fails. I don't remember exactly though. You'll have to try it out. You can use GetLastError() to find out why it failed.
Good luck!
Valerie Bradley
http://www.synthcom.com/~val
[email protected]