Hi ,

I want to create a Custom  action for file selection. For this I am writing c# 
Ca using System.Windows.Forms.OpenFileDialog. this custom action is working on 
some machine and on few machines it is giving error "Current thread must be set 
to single thread apartment (STA) mode before OLE calls can be made. Ensure that 
your Main function has STAThreadAttribute marked on it".

To remove this error I am writing the below mentioned code:

        [STAThread]
        [CustomAction]
        public static ActionResult CustomAction1(Session session)
        {
                                        // code for open dialog
          }

But still this is not working.

Please help me out .

Regards
Sandeep

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to