vagnerinf Newbie

Joined: 15 Jun 2012 Posts: 2
|
Posted: Sat Jun 16, 2012 11:00 am Post subject: clear memory of documents with password error |
|
|
I'm trying trying to open a file with a password by brute force. I am using the correct properties. When I tell the wrong password it loads the document into memory. Every time I try to open the file with the wrong password in memory it adds. I'd like to remove these files from the memory error when the password.
I am using the following code C#:
| Code: |
localContext = uno.util.Bootstrap.bootstrap();
multiServiceFactory = (unoidl.com.sun.star.lang.XMultiServiceFactory)localContext.getServiceManager();
componentLoader = (XComponentLoader)multiServiceFactory.createInstance("com.sun.star.frame.Desktop");
propriedades = new PropertyValue[2];
propriedades[0] = new unoidl.com.sun.star.beans.PropertyValue();
propriedades[1] = new unoidl.com.sun.star.beans.PropertyValue();
propriedades[0].Name = "Hidden";
propriedades[0].Value.setValue(typeof(bool), false);
propriedades[1].Name = "Password";
propriedades[1].Value.setValue(typeof(string), password);
componentLoader = (XComponentLoader)multiServiceFactory.createInstance("com.sun.star.frame.Desktop");
XComponent xComponent = componentLoader.loadComponentFromURL(caminho, "_blank", 0, propriedades); |
When the password is wrong xComponent returns null. But the sum in memory of soffice.bin in managing tasks in Windows. How to clear memory without closing other documents that may be open? |
|