https://bugs.winehq.org/show_bug.cgi?id=35884 Anastasius Focht <focht(a)gmx.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://download.microsoft. | |com/download/A/9/1/A91D6B2B | |-A798-47DF-9C7E-A97854B7DD1 | |8/VC.iso --- Comment #5 from Anastasius Focht <focht(a)gmx.net> --- Hello Nikolay, --- quote --- This does not look trivial in case of remote calls, I don't see how client tid could be communicated to the server. --- quote --- I don't know either, but I found this interesting piece of information about the location of COM caller/callee process and thread ids: https://stackoverflow.com/questions/41204672/problems-using-dbgrpc-on-window... ("Problems using dbgrpc on Windows7"): --- quote --- To avoid this kernel mess, I use the "ReservedForOle" pointer in the thread's TEB (offset 0xf80) where COM stores process and thread IDs. The following commands can be used to access them for WinDbg: In COM-server: where is an incoming COM-call is coming from: Caller's process ID: ? dwo(dwo(@$teb + 0xf80) + 0x108) Caller's thread ID (will be 0 if the caller's thread is in MTA, or -1 if in NA): ? dwo(dwo(@$teb + 0xf80) + 0x34) In COM-client: where is an outgoing COM-call going to: Target's process ID: ? dwo(dwo(@$teb + 0xf80) + 0x100) Target's thread ID (will be 0 if the target server is a MTA COM-server): ? dwo(dwo(@$teb + 0xf80) + 0x104) These values are for 32-bit processes. For native 64-bit processes, the offsets would be different (e.g. "ReservedForOle" is on the offset 0x1758 in TEB). --- quote --- At least we have explanation for the 'unknown' DWORD at offset +0x34 and more offsets. https://source.winehq.org/git/wine.git/blob/3b1c3e57fcac4e23c0f9b376a483c494... --- snip --- 163 /* this is what is stored in TEB->ReservedForOle */ 164 struct oletls 165 { 166 struct apartment *apt; 167 IErrorInfo *errorinfo; /* see errorinfo.c */ 168 DWORD thread_seqid;/* returned with CoGetCurrentProcess */ 169 DWORD apt_mask; /* apartment mask (+0Ch on x86) */ 170 void *unknown0; 171 DWORD inits; /* number of times CoInitializeEx called */ 172 DWORD ole_inits; /* number of times OleInitialize called */ 173 GUID causality_id; /* unique identifier for each COM call */ 174 LONG pending_call_count_client; /* number of client calls pending */ 175 LONG pending_call_count_server; /* number of server calls pending */ 176 DWORD unknown; 177 IObjContext *context_token; /* (+38h on x86) */ 178 IUnknown *call_state; /* current call context (+3Ch on x86) */ 179 DWORD unknown2[46]; 180 IUnknown *cancel_object; /* cancel object set by CoSetCancelObject (+F8h on x86) */ 181 IUnknown *state; /* see CoSetState */ 182 struct list spies; /* Spies installed with CoRegisterInitializeSpy */ 183 DWORD spies_lock; 184 }; --- snip --- Also adding download links. https://download.microsoft.com/download/A/9/1/A91D6B2B-A798-47DF-9C7E-A97854... (MS Visual C++ 2005 Express) Internet Archive Snapshot/Mirror: https://web.archive.org/web/20190127082540/http://download.microsoft.com/dow... $ sha1sum VC.iso 1ae44e4eaf8c61c3a39e573fd6efd9889e940529 VC.iso $ du -sh VC.iso 463M VC.iso $ wine --version wine-5.0-rc3 Regards -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.