OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

clear memory of documents with password error

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
vagnerinf
Newbie
Newbie


Joined: 15 Jun 2012
Posts: 2

PostPosted: Sat Jun 16, 2012 11:00 am    Post subject: clear memory of documents with password error Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group