Questions tagged [mta]

Multiple Threaded Apartment of the Component Object Model (COM), as opposed to STA

MTA refers to the Multiple Threaded Apartment of Microsoft's Component Object Model (COM). Its opposite is the Single-Threaded Apartment (MTA), but there is also a Neutral Apartment.

Related tags:

References:

110 questions
3
votes
1 answer

How to understand MTA's real-time gtfs data feeds

So far I've filled out the MTA online registration form for a Developer's API Key. Then in my android project, I implemented the gtfs realtime bindings dependecy from one of Google's github repositories, compile group: 'com.google.transit', name:…
Chris Gong
  • 8,031
  • 4
  • 30
  • 51
3
votes
1 answer

Switching between STAThread and MTAThread and memory leaks

While looking for a memoryleak in a vb.net WebService, I detected that finalizers where blocked, and so several objects where never released (e.g. System.Threading.ReaderWriterLock) Google told me that this might be, because the STAThread Attribute…
DanielG
  • 1,217
  • 1
  • 16
  • 37
3
votes
2 answers

STA call from MTA

I am just starting to deal with STA/MTA issues, so apologies for the simplicity of the question. I couldn't find an answer I could actually understand at the bottom of the ladder here. I am writing a plugin for another piece of software, and come…
Aaron Marcus
  • 153
  • 2
  • 13
3
votes
2 answers

local MTA even if a reliable remote MTA is available

I had a discussion with our development team to have a local MTA installed on the application server or if they should use the MTA server located on the internal network to send their emails. There are pros and cons for both solutions. Pros: The…
ycae
  • 35
  • 3
2
votes
2 answers

Microsoft's Aparment Analogy (STA, MTA): Need help understanding it

I've read lots about the Microsoft's threaded apartment model, but I'm still having a little trouble visualizing it. Microsoft uses the analogy of living things living in an apartment. So, for STA, consider the following (I know it's a little…
Verax
  • 2,409
  • 5
  • 27
  • 42
2
votes
2 answers

Questions about COM multithreading and STA / MTA

Hi I am a beginner in COM. I want to test a COM dll in both STA and MTA modes. My first question is: is it possible a COM object supports both STA and MTA? Now I imagine the STA code snippet below: // this is the main…
Charlie
  • 111
  • 2
  • 4
2
votes
1 answer

Calling STA COM object from WebApi

Is C#'s Runtime Callable Wrapper around a STA remote application type library safe (from the thread model and apartments perspective) to be called from a MTA thread context (.Net WebApi request)? Should I change the server STA application to MTA or…
EProgrammerNotFound
  • 2,403
  • 4
  • 28
  • 59
2
votes
5 answers

What are All the Ways a Programmer Could use PHP to Send an Email?

I'm looking for a list of built in PHP functions that a programmer could use to send an email. The obvious answer here is mail(), but I'm also looking for a list of functions someone might use to manually open a connection to an MTA, or spawn a…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
2
votes
1 answer

Implementation of MTA COM server

I can't find any source code on the prerequisites of an MTA compliant COM. I tried changing the ThreadingModel registry key of my object from Apartment to Both, and it results in a crash when a secondary thread calls the method before any data is…
Vadim Berman
  • 1,932
  • 1
  • 20
  • 39
2
votes
2 answers

QueueUserWorkItem with COM in C++

I have a performance issue where clients are creating hundreds of a particular kind of object "Foo" in my C++ application's DOM. Each Foo instance has its own asynchronous work queue with its own thread. Obviously, that doesn't scale. I need to…
David Gladfelter
  • 4,175
  • 2
  • 25
  • 25
2
votes
1 answer

prevent event from spawning another thread

I bit ago I was reading about delegates and events (for a completely different reason) from this [website][1] In there I got the impression that if your event takes long enough a seperate thread is generated. Well that got me thinking about a bug…
Robert Snyder
  • 2,399
  • 4
  • 33
  • 65
2
votes
3 answers

Is server to server email transmission secure?

We are running a website with a web to email form. We force https to secure the transmission from the browser to the web server. From the web server we use PHP to generate an email message containing the information received. The destination email…
Ruben Reyes
  • 745
  • 6
  • 8
2
votes
1 answer

Winforms: One COM object needs an STAThread, the other needs an MTAThread. How can I use them?

I'm trying to build a Winforms application with two COM components. However, one of the components only works when using [MTAThread] and the other only works with [STAThread]. What would the recommended solution be?
hb.
  • 1,705
  • 5
  • 22
  • 43
2
votes
1 answer

Out of process COM server with MTA

I have an out of proc COM (ATL) Server that has been created as free threaded (CComMultiThreadModel) I am slightly confused as to how that relates to the re-entrancy of calls into my object, for example I assumed that I would be allowed to call from…
user1371314
  • 762
  • 7
  • 24
2
votes
2 answers

Running REST/WCF as STA instead of MTA for COM

Is it possible to configure a REST (WCF) service to run as STA instead of MTA? This is approach is needed in order to run legacy COM objects. In order to configure ASMX web services to run as STA instead of MTA, there is a workaround available that…
BGBG