Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Delphi MIDAS and threaded client requests

Posted on 1998-11-19
2
Medium Priority
?
515 Views
Last Modified: 2006-11-17
Hi,

I am writing a report server using D3 MIDAS and want a thread in the client to handle the DCOM requests. I want the thread to send the requests from a que one at a time and wait for a response on the server. This way the client can still submit further requests without being "held up" with the current request running.

I wrote this and got it working without threads. Now I am trying to thread the MIDAS requests and whenever I call a method on the application sever in the execute code of my thread I get.

EOleSysError : Coinitialize has not been called.

Can you send MIDAS calls in a background thread from the client ? and if so How ?



0
Comment
Question by:yort1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:yort1
ID: 1347379
Edited text of question
0
 
LVL 2

Accepted Solution

by:
Thaddy earned 200 total points
ID: 1347380
If you use threads, you MUST call coInitialize in the initialization section of EVERY individal thread (and coUnititialize in the finalization sections.
Imho, you should not use os threading, but com threading for a midas solution. Take a look at this site, it contains a midas example of what you want to achieve.
http://www.castle.net/~bly/Programming/Delphi/Threading2/index.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question