Where does it fail ? You actually need to do
some work to find the location and the cause.
You can try to track down the location by the use
of printf & log files to hone in on the failure spot,
or use message_box() to track down the location
in release mode since the debugger doesn't help much.
Comment out sections of code if you can and see if that
has any effect on the failure.
Common causes of release mode failing :-
( assuming you are using microsoft vc++)
1. ASSERT() statements containing necessary code
statements being optmized/preprocssed out of the
release code. Use VERIFY() instead.
2. Memory is initialized with random patterns in release
mode, this might cause some unpredicted behavior.
Initialize all memory before use.
3. You are using some undefined behavior which behaves
differently in different modes.
4. Mixtures of DLLs for debug/release being used at runtime.
Use the DEPENDS tool to check what dll are being found.
Check the run-time environment when the service is being run
is what you expect it to be.
In years gone by, compiler bugs often were a cause but is
more rare these days, I should assume you have a bug and
not blame the compilers.
dave
"ss" <sa**********@citigroup.com> wrote in message
news:d1**************************@posting.google.c om...
Hi
I built an exe in console debug mode & Release mode . The console
debug mode -exe works fine ...but the release mode EXE starts well but
fails mid way .
The exe is being started as a service. So I need the Release mode EXE.
I've checked the dlls being used . they are working fine for other
services.
Plz Help.
cheers