Click here to Skip to main content
15,912,897 members
Home / Discussions / COM
   

COM

 
QuestionSetting computer name with WMI Pin
one-trick-pony29-Jun-07 7:07
one-trick-pony29-Jun-07 7:07 
Questionusing asp.net2.0, in case of Gridview control if we dont use Sqldatasource control ,can we use inbuilt edit update.. functionality? Pin
yogita charhate28-Jun-07 23:29
yogita charhate28-Jun-07 23:29 
QuestionMulti threading in c++ [modified] Pin
role127-Jun-07 20:25
role127-Jun-07 20:25 
AnswerRe: Multi threading in c++ Pin
Jürgen Jung1-Jul-07 21:26
Jürgen Jung1-Jul-07 21:26 
QuestionHow to Deploy Presentation Layer and COM + in two servers? Pin
Sylvester george27-Jun-07 19:04
Sylvester george27-Jun-07 19:04 
Questionverify MS Index server from code Pin
kaushik_Manoj26-Jun-07 18:47
kaushik_Manoj26-Jun-07 18:47 
QuestionWhy TLS(Thread Local Storage) can not be used in COM Pin
jsjwql26-Jun-07 16:58
jsjwql26-Jun-07 16:58 
AnswerRe: Why TLS(Thread Local Storage) can not be used in COM Pin
Roger Stoltz27-Jun-07 1:56
Roger Stoltz27-Jun-07 1:56 
jsjwql wrote:
Do I need to adjust some other setting of the COM, or COM really doesn't support TLS. This code works well in normal dll.


Are you by any chance linking your DLL statically?

An in-process COM server is a DLL that will be loaded at runtime and this is probably why your TLS doesn't work.

Here's what MSDN has to say about it:
If a DLL declares any nonlocal data or object as __declspec( thread ), it can cause a protection fault if dynamically loaded. After the DLL is loaded with LoadLibrary, it causes system failure whenever the code references the nonlocal __declspec( thread ) data. Because the global variable space for a thread is allocated at run time, the size of this space is based on a calculation of the requirements of the application plus the requirements of all of the DLLs that are statically linked. When you use LoadLibrary, there is no way to extend this space to allow for the thread local variables declared with __declspec( thread ). Use the TLS APIs, such asTlsAlloc, in your DLL to allocate TLS if the DLL might be loaded with LoadLibrary.

My guess is that you would get the same error with your DLL if you load it in runtime with ::LoadLibrary().


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown

QuestionSQL XML 3 BulkLoad Error Pin
Panchal Hardik25-Jun-07 2:29
Panchal Hardik25-Jun-07 2:29 
AnswerRe: SQL XML 3 BulkLoad Error Pin
Dave Kreskowiak25-Jun-07 4:05
mveDave Kreskowiak25-Jun-07 4:05 
QuestionCatching events from C# COM in VC++ client Pin
Gakk22-Jun-07 3:57
Gakk22-Jun-07 3:57 
QuestionProblem with dll file Pin
Natarajasivan22-Jun-07 0:45
Natarajasivan22-Jun-07 0:45 
Question"Server busy" since changed to VC2005 SP1 [modified] Pin
howieh21-Jun-07 20:47
howieh21-Jun-07 20:47 
Questionadd Activex Object Pin
dhatchu21-Jun-07 16:27
dhatchu21-Jun-07 16:27 
QuestionPrinterProperties Pin
moon_stick21-Jun-07 5:46
moon_stick21-Jun-07 5:46 
AnswerRe: PrinterProperties Pin
moon_stick21-Jun-07 22:41
moon_stick21-Jun-07 22:41 
QuestionStateable Web application using COM+ Pin
Babak Ansari19-Jun-07 23:38
Babak Ansari19-Jun-07 23:38 
QuestionReleasing a com interface Pin
john563219-Jun-07 18:31
john563219-Jun-07 18:31 
AnswerRe: Releasing a com interface Pin
Steve S20-Jun-07 1:49
Steve S20-Jun-07 1:49 
AnswerRe: Releasing a com interface Pin
Erik Midtskogen20-Jun-07 12:36
Erik Midtskogen20-Jun-07 12:36 
QuestionDifference between COM and DLL Pin
Karismatic19-Jun-07 1:24
Karismatic19-Jun-07 1:24 
AnswerRe: Difference between COM and DLL Pin
Steve S21-Jun-07 2:05
Steve S21-Jun-07 2:05 
AnswerRe: Difference between COM and DLL Pin
CPallini24-Jun-07 20:38
mveCPallini24-Jun-07 20:38 
QuestionProblem facing with connection points Pin
Raj Prathap17-Jun-07 21:05
Raj Prathap17-Jun-07 21:05 
AnswerRe: Problem facing with connection points Pin
HakunaMatada20-Jun-07 19:38
HakunaMatada20-Jun-07 19:38 

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.