[Fanda] Ako sa zbavit automatickych "prekladov" textu na internete

Ondrej Rosík ondrej.rosik na gmail.com
Středa Říjen 23 13:13:27 CEST 2013

no neviem veľmi poradiť, ako sa toho striasť, ja tu ale dočasne
používam firefox portable v angličtine a aj ich stránka sa mi asi
preto ukazuje v angličtine.
Posielam textový výpis.

Skip Navigation
Microsoft Home Page
Sign in
My Products
My Billing
My Support Requests
Find it myself  Selected
Ask the community
Get live help
Select the product you need help with
Internet Explorer
Internet Explorer
Windows Phone
Windows Phone
More products
More products
How to marshal interfaces across apartments in Visual C++
Article ID: 206076 - View products that this article applies to.
This article was previously published under Q206076
Note Microsoft Visual C++ 2008, Microsoft Visual C++ 2005, Microsoft
Visual C++ .NET 2003, and Microsoft Visual C++ .NET 2002 support both
the managed code model that is provided by the Microsoft .NET
Framework and the unmanaged native Microsoft Windows code model. The
information in this article applies only to unmanaged Visual C++ code.
Expand all | Collapse all
Collapse image
Marshal.exe is a sample that shows the different ways of marshaling an
interface across apartments.
Back to the top | Give Feedback
Collapse image
The following file is available for download from the Microsoft Download Center:

DownloadDownload the Marshal.exe package now.

For more information about how to download Microsoft support files,
click the following article number to view the article in the
Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most
current virus-detection software that was available on the date that
the file was posted. The file is stored on security-enhanced servers
that help prevent any unauthorized changes to the file.

A Single-Threaded Apartment (STA) is a thread that was initialized
with CoInitialize() or CoInitializeEx (NULL,
COINIT_APARTMENTTHREADED). Also, any other threads in the same process
that use COM must also call CoInitialize() or CoInitializeEx() to
initialize COM for its thread.

If you create a COM object in one STA thread, you cannot pass an
interface pointer to another STA thread and call out on that pointer.
Since calls to STA objects are supposed to be serialized, COM enforces
this by only allowing one thread to call into the STA object (the
thread where it was created). If the interface pointer you pass to the
second STA thread is a pointer to a proxy, you will get an error
HRESULT of 0x8001010E or RPC_E_WRONG_THREAD (the application called an
interface that was marshaled for a different thread). If the interface
pointer is a direct pointer to the object, COM will not enforce
serialization, you will not get the above error, and the interface
method call will be made. However, this is still illegal behavior on
the part of the client.

You can still call methods on the STA object from a different STA
thread as long as you do it through a proxy. A proxy is a copy of the
interface that you get via marshaling/unmarshaling. When you make a
call through the proxy, COM makes a thread switch and the call ends up
executing in the context of the thread where the STA object was

There are three ways to marshal/unmarshal an interface to another STA thread:
1.CoMarshalInterThreadInterfaceInStream() and
CoGetInterfaceAndReleaseStream(): One drawback to using this method is
the interface can only be unmarshaled once. That is, if you need
access to the same object from several STA threads, this method won't
2.CoMarshalInterface() and CoUnMarshalInterface(): This method is more
flexible since you can marshal the interface once and unmarshal the
interface as many times as you like; for example, specifying
interface. But it also requires more code since you have to create the
IStream, set the seek pointer and clean up the marshal packet via
CoReleaseMarshalData(). When marshaling pointers to a proxy you must
have Windows NT 4.0 Service Pack 4 or later, Windows 98 or Windows 95
with DCOM 1.2 or later installed. Also when using the
MSHLFLGS_TABLESTRONG flag you must have Windows 2000 or later.
3.Global Interface Table(GIT): The GIT is a COM object that allows you
to store an interface in one STA thread and get access to it's proxy
in another STA thread. This is only available with Windows NT 4.0
Service Pack 3 or later, Windows 98 or Windows 95 with DCOM 1.1 or
later installed.
Marshal.exe contains TSTMARSH which is the main project. This contains
an ATL EXE server that implements ITest. ITest has one method called
ToUpper(), which converts a string to uppercase. A sub-project called
Client is also included. Client.cpp is where all the
marshaling/unmarshaling methods are shown. Each method creates an
instance of the Test object, marshals an ITest interface and creates a
thread. In each thread, an ITest interface is unmarshaled and the
method ToUpper() is called to convert a string. You should see the
output in the debug window of: "THIS IS OUTPUT FROM THREAD #N".
Back to the top | Give Feedback
Collapse image
For more information, click the following article number to view the
article in the Microsoft Knowledge Base:
172314 Explanation of RPC_E_WRONG_THREAD error
Back to the top | Give Feedback
Collapse image
Article ID: 206076 - Last Review: May 22, 2008 - Revision: 7.0
•Microsoft Visual C++ 2008 Express Edition
•Microsoft Visual C++ 2005 Express Edition
•Microsoft Visual C++ .NET 2003 Standard Edition
•Microsoft Visual C++ .NET 2002 Standard Edition
•Microsoft Visual C++ 6.0 Professional Edition
•Microsoft Visual C++ 6.0 Enterprise Edition
kbsweptvs2008 kbarchitecture kbfile kbhowto kbsample kbthread KB206076
Back to the top | Give Feedback
Collapse image
Give Feedback
Was this information helpful?



How much effort did you personally put forth to use this article?

Very low




Very high
Tell us why and what can we do to improve this information


Back to the topBack to the top
Article Translations
(الشرق الاوسط (العربية
Translate the article dropdown button
Other Microsoft sites


Windows Phone
Windows Phone




Microsoft Store
Microsoft Store
Download center
Windows downloads
Office downloads
Service Pack downloads
Direct X download
Privacy feedback
About Microsoft
Company news
Investor relations
Site map
Knowledge Base search
Supported Products list
Support offerings
Product support lifecycle
Small and medium business support
IT Pro support
Developer support
Virus and Security solution center
Security home page
Microsoft Update
Download Security Essentials
Malware Removal tool
Popular resources
Microsoft Outlook Express
Microsoft Fix It downloads
Windows keyboard shortcuts
Microsoft Visual C library runtime error
Windows Installer error: service could not be accessed
How to: Windows XP system restore
Windows update error message
Microsoft Security Essentials manual update download
Inbox Scanpst.exe
United States

©2013 Microsoft
Services Agreement
Contact Us
Terms of Use
Privacy & Cookies

Dňa 23.10.2013, Lubos Pintes <lubos.pintes na gmail.com> napísal(a):
> Pozdravujem,
> Ak si otvorím stránku
> http://support.microsoft.com/kb/206076
> ukáže sa mi "preklad" do slovenčiny. Nakoľko sa jedná o odborný článok,
> je to totálna nezrozumiteľná kravina.
> Vie mi niekto povedať, či sa dá ten "preklad" vypnúť a ako? Nič som
> totiž nenašiel. Toto sa zobrazí "preložené" aj vo Firefoxe aj v IE.
> Vďaka

Další informace o konferenci Fanda