Sunday, 15 January 2012

c# - The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B) -



c# - The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B) -

i'm receiving error when code path, dont understand whe happend, think im doing right.

code:

string newuri = imagegalleryuri.replace("ms-appdatalocal/", ""); //replace part of string nonspace character. newuri = newuri.replace("/", "\\"); newuri = newuri.replace("%20", " "); //replace ascii code space actual space. reason i'm getting invalid character error %20. storagefolder folder = windows.storage.applicationdata.current.localfolder; storagefile storagefile = await folder.getfileasync(newuri); datapackage dp = new datapackage(); //create datapackage containing clipboard content. dp.setbitmap(randomaccessstreamreference.createfromfile(storagefile)); clipboard.setcontent(dp); await successdialog.showasync();

the error in line: newuri = ms-appdata:\local\books\assets\recursos para el docente\matematicas\9\esp\1\0\geometria_page_04.png

storagefile storagefile = await folder.getfileasync(newuri);

maybe seek this:

newuri = uri.escapedatastring(newuri);

instead of:

newuri = newuri.replace("%20", " ");

c# winrt-xaml

No comments:

Post a Comment