Can you do that in dlgpreflibrary and browsefeature. They actually call the filedialog and also should create the security token. This method could also be called without using a filedialog before!