Click here to Skip to main content
15,797,672 members
Home / Discussions / COM
   

COM

 
AnswerRe: How to use unregistered tlb file Pin
DriveByCoder24-Mar-15 8:48
professionalDriveByCoder24-Mar-15 8:48 
QuestionCOM Component Late binding trouble Pin
nilarya25-Aug-11 7:28
nilarya25-Aug-11 7:28 
AnswerRe: COM Component Late binding trouble Pin
tom-englert21-Sep-11 2:20
tom-englert21-Sep-11 2:20 
GeneralRe: COM Component Late binding trouble Pin
nilarya7-Oct-11 0:27
nilarya7-Oct-11 0:27 
GeneralRe: COM Component Late binding trouble Pin
tom-englert7-Oct-11 4:59
tom-englert7-Oct-11 4:59 
GeneralRe: COM Component Late binding trouble Pin
nilarya7-Oct-11 23:46
nilarya7-Oct-11 23:46 
GeneralRe: COM Component Late binding trouble Pin
nilarya7-Oct-11 23:57
nilarya7-Oct-11 23:57 
GeneralRe: COM Component Late binding trouble Pin
nilarya24-Oct-11 0:27
nilarya24-Oct-11 0: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 7:23
tom-englert7-Nov-11 7:23 
AnswerRe: COM Component Late binding trouble Pin
Vi25-Oct-11 1:39
Vi25-Oct-11 1:39 
QuestionUnable to register 64 bit COM Server Pin
sandeepkavade17-Aug-11 3:07
sandeepkavade17-Aug-11 3:07 
AnswerRe: Unable to register 64 bit COM Server Pin
Shameel17-Aug-11 3:32
professionalShameel17-Aug-11 3:32 
AnswerRe: Unable to register 64 bit COM Server Pin
«_Superman_»19-Aug-11 5:18
professional«_Superman_»19-Aug-11 5:18 
QuestionRegarding SheetCalculate event in Excel API Pin
gtag20-Jun-11 11:02
gtag20-Jun-11 11:02 
AnswerRe: Regarding SheetCalculate event in Excel API Pin
«_Superman_»13-Jul-11 8:04
professional«_Superman_»13-Jul-11 8:04 
AnswerI need help...(context menu shell extension) [modified] Pin
T800G5-Jun-11 5:53
T800G5-Jun-11 5:53 
Questionhow do i find all "src" attributes from frame object of html document? Pin
yogish29313-May-11 4:20
yogish29313-May-11 4:20 
AnswerRe: how do i find all "src" attributes from frame object of html document? Pin
«_Superman_»21-Jun-11 20:43
professional«_Superman_»21-Jun-11 20:43 
QuestionHow to create an OLE control in EXCEL sheet? Pin
whiteclouds28-Apr-11 0:46
whiteclouds28-Apr-11 0:46 
AnswerRe: How to create an OLE control in EXCEL sheet? Pin
barneyman28-Apr-11 19:52
barneyman28-Apr-11 19:52 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds28-Apr-11 22:07
whiteclouds28-Apr-11 22:07 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
barneyman29-Apr-11 14:55
barneyman29-Apr-11 14:55 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds1-May-11 20:21
whiteclouds1-May-11 20:21 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
barneyman1-May-11 20:30
barneyman1-May-11 20:30 
GeneralRe: How to create an OLE control in EXCEL sheet? Pin
whiteclouds2-May-11 16:48
whiteclouds2-May-11 16: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.