Embedded Thread not returning when running in win 64

Jan 29, 2012 at 1:07 AM

Strange error here.. the code works fine in win 32 but in win 64 systems the thread never returns after the process finishes.

But it's only when the smartthread object spawns off a STA thread within it's process to use a browser control (issue only in win 64)

code snippet:

      public object Start(object state)       

{            
            try            {

  Thread threadBrowser = new Thread(ProcessBrowser);   

threadBrowser.SetApartmentState(ApartmentState.STA);   

threadBrowser.Start();   

RSSProcessProgress(this, new RSSThreadEventArgs()); threadBrowser.Join();

}catch.....

Process browser Function:  public void ProcessBrowser()      

  { // custom class that simply called a delegate function but uses the browser control           

webMain wbmain = new webMain(); 
try            {               

bBrowserResult = wbmain.RSSPOSTDelegate(ref RssAccount, TITLE, Tags, this.URLList);           

}           

catch (Exception ex)           

{                Console.WriteLine("Process browser exception: {0}", ex.Message);               

bBrowserResult = false;           

}

try           

{                    wbmain.Dispose();            }           

catch (Exception ex2)            {        }

            return;       

}

The process just never returns in win 7 / 2008 - 64 bit systems