Click here to Skip to main content
15,906,708 members
Home / Discussions / COM
   

COM

 
GeneralRe: Is COM an 'outdated' technology? Pin
bob1697221-Apr-12 5:52
bob1697221-Apr-12 5:52 
GeneralRe: Is COM an 'outdated' technology? PinPopular
Richard MacCutchan21-Apr-12 7:44
mveRichard MacCutchan21-Apr-12 7:44 
AnswerRe: Is COM an 'outdated' technology? Pin
Eddy Vluggen12-Oct-12 14:05
professionalEddy Vluggen12-Oct-12 14:05 
QuestionIssues with identity of COM+ application Pin
Member 39605603-Feb-12 5:52
Member 39605603-Feb-12 5:52 
AnswerRe: Issues with identity of COM+ application Pin
Member 39605606-Feb-12 2:49
Member 39605606-Feb-12 2:49 
QuestionHow to convert COM proxy-stub dll to type library ? Pin
benjava28-Dec-11 17:35
benjava28-Dec-11 17:35 
AnswerRe: How to convert COM proxy-stub dll to type library ? Pin
Jonathan Davies30-Dec-11 9:08
Jonathan Davies30-Dec-11 9:08 
AnswerRe: How to convert COM proxy-stub dll to type library ? Pin
«_Superman_»6-Jan-12 16:23
professional«_Superman_»6-Jan-12 16:23 
QuestionOPENING THE VBA EDITOR ON CLICK ON OLEOBJECTS BUTTON Pin
archana jain15-Dec-11 0:20
archana jain15-Dec-11 0:20 
QuestionHow to select the predefined area as WIDTH in PIXEL by HEIGHT IN PIXELS in MSEXCEL for desiging your templates Pin
archana jain14-Dec-11 22:18
archana jain14-Dec-11 22:18 
QuestionAdding Workbook In Excel Pin
SB_CodeForFun6-Dec-11 20:02
SB_CodeForFun6-Dec-11 20:02 
QuestionNeed Com Help - I'm a beginner Pin
jkirkerx6-Nov-11 8:48
professionaljkirkerx6-Nov-11 8:48 
AnswerRe: Need Com Help - I'm a beginner Pin
«_Superman_»6-Nov-11 15:36
professional«_Superman_»6-Nov-11 15:36 
GeneralRe: Need Com Help - I'm a beginner Pin
jkirkerx6-Nov-11 19:34
professionaljkirkerx6-Nov-11 19:34 
GeneralRe: Need Com Help - I'm a beginner Pin
jkirkerx9-Nov-11 7:36
professionaljkirkerx9-Nov-11 7:36 
QuestionHow to use unregistered tlb file Pin
SB_CodeForFun30-Oct-11 23:54
SB_CodeForFun30-Oct-11 23:54 
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 

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.