Am 18.12.2013 09:49, schrieb Wedel, Jan:
> Hi,
>
> I already wrote to this mailing list ("Serious problem with
> RPC_E_SERVERFAULT (0x80010105)") last year.
>
> Unfortunately but understandably, Thomas Heller stopped supporting
> comtypes actively. However, I saw there was some development going on in
> terms of a new release, so I wanted to bump this topic because we
> couldn't find a solution yet.
>
> Let me sum up the issue and what we've found out so far:
>
> - We've written an OPC (OLE for Process Control) COM Server in Python
>
> - The existing version of this server works perfectly for over a year on
> a Win XP machine
>
> - Because XP is quite old and not supported anymore, we needed to move
> on to Win 7 / Server 2008
>
> - On these recent OSes, the server stopped working
>
> - It actually starts and responds to some method calls. But, when a
> method needs to return a pointer to an array of structures, the client
> receives the COM error 0x80010105
>
> - The server continues running.
>
> - We've modified the code to use the low-level comtypes implementation
> so that the client actually receives the server response without an
> error. But, unfortunately, the response is corrupted (the first two
> bytes of the array are overwritten).
>
> - We assumed memory being unintentionally freed because we're returning
> a pointer but not the actual array.

Hm, as far as I know you cannot pass arbitrary pointers via COM.
At least not in automation compatible interfaces.  Or do you do
some custom marshalling?

> - We modified the python code to keep a reference to the array but then
> the client again gets the same COM error 0x80010105
>
> - We've debugged the issue with a windows debugger (see stack trace from
> the old mail) and it seems as if an access violation happens when ctypes
> calls CoTaskMemFree internally.

Thomas



------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to