Click here to Skip to main content
15,887,683 members
Home / Discussions / COM
   

COM

 
AnswerRe: How to use unregistered tlb file Pin
DriveByCoder24-Mar-15 7:48
professionalDriveByCoder24-Mar-15 7:48 
QuestionCOM Component Late binding trouble Pin
nilarya25-Aug-11 6:28
nilarya25-Aug-11 6:28 
AnswerRe: COM Component Late binding trouble Pin
tom-englert21-Sep-11 1:20
tom-englert21-Sep-11 1:20 
GeneralRe: COM Component Late binding trouble Pin
nilarya6-Oct-11 23:27
nilarya6-Oct-11 23:27 
GeneralRe: COM Component Late binding trouble Pin
tom-englert7-Oct-11 3:59
tom-englert7-Oct-11 3:59 
GeneralRe: COM Component Late binding trouble Pin
nilarya7-Oct-11 22:46
nilarya7-Oct-11 22:46 
GeneralRe: COM Component Late binding trouble Pin
nilarya7-Oct-11 22:57
nilarya7-Oct-11 22:57 
GeneralRe: COM Component Late binding trouble Pin
nilarya23-Oct-11 23:27
nilarya23-Oct-11 23:27 
Hi again,
I have finally got this COM object to work, but some problem still remains. I changed the code as following:


C#
...     
using System.Threading;
 
namespace...     
protected void Button1_Click(object sender, EventArgs e)
      {
        Thread thread = new Thread(new ThreadStart(STAOperation));
        thread.SetApartmentState(ApartmentState.STA);
        thread.Start();
        thread.Join();
       }      
public void STAOperation()
       {
         CSViewerRL.ViewerClass csv = new ViewerClass();
         csv.Open(filePath, 0, 0);//strange error
         //other codes..
       }



this code works, but once in a while, I am getting a strange error while debugging, which states AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

generally the app runs fine the first time I try to debug, but this error occures mostly on the second or third time I press f5 from my VS while the ASP.Net server is still running. and generally it goes away if I stop the server and run again. I think this problem is because of this new STA thread. Maybe I am not handling the new thread correctly. Or there is some other thing I should look into? Can someone point out whatshould I do under this circumstance?
GeneralRe: COM Component Late binding trouble Pin
tom-englert7-Nov-11 6:23
tom-englert7-Nov-11 6:23 
AnswerRe: COM Component Late binding trouble Pin
Vi25-Oct-11 0:39
Vi25-Oct-11 0:39 
QuestionUnable to register 64 bit COM Server Pin
sandeepkavade17-Aug-11 2:07
sandeepkavade17-Aug-11 2:07 
AnswerRe: Unable to register 64 bit COM Server Pin
Shameel17-Aug-11 2:32
professionalShameel17-Aug-11 2:32 
AnswerRe: Unable to register 64 bit COM Server Pin
«_Superman_»19-Aug-11 4:18
professional«_Superman_»19-Aug-11 4:18 
QuestionRegarding SheetCalculate event in Excel API Pin
gtag20-Jun-11 10:02
gtag20-Jun-11 10:02 
AnswerRe: Regarding SheetCalculate event in Excel API Pin
«_Superman_»13-Jul-11 7:04
professional«_Superman_»13-Jul-11 7:04 
AnswerI need help...(context menu shell extension) [modified] Pin
T800G5-Jun-11 4:53
T800G5-Jun-11 4:53 
Questionhow do i find all "src" attributes from frame object of html document? Pin
yogish29313-May-11 3:20
yogish29313-May-11 3:20 
AnswerRe: how do i find all "src" attributes from frame object of html document? Pin
«_Superman_»21-Jun-11 19:43
professional«_Superman_»21-Jun-11 19:43 
QuestionHow to create an OLE control in EXCEL sheet? Pin
whiteclouds27-Apr-11 23:46
whiteclouds27-Apr-11 23:46 
AnswerRe: How to create an OLE control in EXCEL sheet? Pin
barneyman28-Apr-11 18:52
barneyman28-Apr-11 18:52 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds28-Apr-11 21:07
whiteclouds28-Apr-11 21:07 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
barneyman29-Apr-11 13:55
barneyman29-Apr-11 13:55 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds1-May-11 19:21
whiteclouds1-May-11 19:21 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
barneyman1-May-11 19:30
barneyman1-May-11 19:30 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds2-May-11 15:48
whiteclouds2-May-11 15:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.