Usługa i wczytywanie pliku XML

0

Czesc,
mam problem z wczytaniem pliku xml podczas dzialania aplikacji, ktora jest usługą.

wg poradnika: XML w Delphi
napisałem sobie prosty programik i wszystko działało.

Potem przepisałem go na usługę i usługa konczy swoje dzialanie zaraz po starcie gdy napotka jakikolwiek kod zwiazany z obsluga XML.

chociazby xmldocument.loadfromfile i juz nie dziala.

Ktos sie z tym juz spotkal?

0

To strzał, ale spróbuj najpierw CoInitializeEx, a na koniec oczywiście CoUninitialize

0

Poczytalem dokumentacje i sie troche wyjasnilo:

Occurs when the thread associated with the service starts up.

If you are not spawning a new thread to handle individual service requests in an OnStart event handler, this is where you implement the service. When the OnExecute event handler finishes, the service thread terminates. Most OnExecute event handlers contain a loop that calls the service thread's ProcessRequests method so that other service requests are not locked out.

Mam nadzieje, ze nie bedzie wiecej niespodzianek... pozdro

1 użytkowników online, w tym zalogowanych: 0, gości: 1