Hello all,
I am writting a classical web application with three tiers. I have encapsulated the database access and some of the business logic in a few COM components written in C++. And I use as a middle tier application written in Delphi by means of WebSnap technology. And I encountered problems in how delphi uses pointers to my interfaces. In all situations where pointer to my object has been passed across pages by means of a session variable there is error RPC_E_WRONG_THREAD. After some effors I noticed that the apartment model which the delphi uses is SINGLE_THREADED. So every time when somebody tries to use a pointer to my interface receives error RPC_E_WRONG_THREAD because my pointers are not marshalled properly for this thread.
So, my question is: Can I change the threading model in WebSnap and how?
I have some special reasons for which I don't want to use the free threaded marshaller.
Dimitar.
Thanks in advance.
I am writting a classical web application with three tiers. I have encapsulated the database access and some of the business logic in a few COM components written in C++. And I use as a middle tier application written in Delphi by means of WebSnap technology. And I encountered problems in how delphi uses pointers to my interfaces. In all situations where pointer to my object has been passed across pages by means of a session variable there is error RPC_E_WRONG_THREAD. After some effors I noticed that the apartment model which the delphi uses is SINGLE_THREADED. So every time when somebody tries to use a pointer to my interface receives error RPC_E_WRONG_THREAD because my pointers are not marshalled properly for this thread.
So, my question is: Can I change the threading model in WebSnap and how?
I have some special reasons for which I don't want to use the free threaded marshaller.
Dimitar.
Thanks in advance.