Index: trunk/zoo-project/zoo-services/utils/status/cgi-env/demo.zcfg
===================================================================
--- trunk/zoo-project/zoo-services/utils/status/cgi-env/demo.zcfg	(revision 384)
+++ trunk/zoo-project/zoo-services/utils/status/cgi-env/demo.zcfg	(revision 384)
@@ -0,0 +1,32 @@
+[demo]
+ Title = Demo long process. 
+ Abstract = This service doesn't do anything except taking its time to return an error message, it demonstrates how to use the update_status function of the Python ZOO-API from your services code.
+ processVersion = 1
+ storeSupported = true
+ statusSupported = true
+ serviceProvider = service
+ serviceType = Python
+ <DataInputs>
+  [sid]
+   Title = Service ID
+   Abstract = A ZOO Service ID (unused).
+   minOccurs = 0
+   maxOccurs = 1
+   <LiteralData>
+    dataType = integer
+    <Default />
+   </LiteralData>
+ </DataInputs>
+ <DataOutputs>
+  [Result]
+   Title = ExecuteResponse document
+   Abstract = The resulting ExecuteResponse document.
+   <MetaData>
+    title = Demo XSL use case
+   </MetaData>   
+   <LiteralData>
+    dataType = string
+    <Default>
+    </Default>
+   </LiteralData>
+ </DataOutputs>  
Index: trunk/zoo-project/zoo-services/utils/status/cgi-env/service.py
===================================================================
--- trunk/zoo-project/zoo-services/utils/status/cgi-env/service.py	(revision 384)
+++ trunk/zoo-project/zoo-services/utils/status/cgi-env/service.py	(revision 384)
@@ -0,0 +1,14 @@
+def demo(conf,inputs,outputs):
+    import zoo,time
+    i=0
+    while i < 100:
+        conf["lenv"]["status"]=str(i)
+        zoo.update_status(conf,i)
+        time.sleep(0.5)
+        i+=1
+    conf["lenv"]["message"]=zoo._("Error executing the service")
+    return zoo.SERVICE_FAILED
+
+def demo1(conf,inputs,outputs):
+    conf["lenv"]["message"]=zoo._("Error executing the service")
+    return zoo.SERVICE_FAILED
Index: trunk/zoo-project/zoo-services/utils/status/makefile.vc
===================================================================
--- trunk/zoo-project/zoo-services/utils/status/makefile.vc	(revision 348)
+++ trunk/zoo-project/zoo-services/utils/status/makefile.vc	(revision 384)
@@ -1,12 +1,24 @@
-ZOODIR=../../../zoo-kernel
-THIRDSDIR=../../../thirds
-!INCLUDE $(ZOODIR)/nmake.opt
-CFLAGS=-DWIN32 -I$(THIRDSDIR)/dirent-win32 -I$(GEODIR)/include -I$(TPATH)/include -I$(ZOODIR)/ -I./ -DLINUX_FREE_ISSUE -DDEBUG
-CPP=cl /TP 
+TROOT= $(ZOOK_DIR)
+!INCLUDE $(ZOOK_DIR)/nmake.opt
+
+FILES=$(ZOOK_DIR)/dirent.obj $(ZOOK_DIR)/service_internal.obj $(ZOOK_DIR)/ulinet.obj
+!IFDEF JS_DIR
+FILES=$(FILES) $(ZOOK_DIR)$(JS_FILE)
+!ENDIF
+!IFDEF JDK_DIR
+FILES=$(FILES) $(ZOOK_DIR)$(JAVA_FILE)
+!ENDIF
+!IFDEF PY_DIR
+FILES=$(FILES) $(ZOOK_DIR)$(PY_FILE)
+!ENDIF
+!IFDEF MS_DIR
+FILES=$(FILES) $(ZOOK_DIR)$(MS_FILE)
+!ENDIF
 
 cgi-env/wps_status.zo: service.c
-	$(CPP) $(CFLAGS) /c service.c
-	link /dll /out:cgi-env/wps_status.zo $(ZOODIR)/service_internal.obj $(ZOODIR)/dirent.obj ./service.obj -L$(TPATH)/lib/libssl32.dll.a $(TPATH)/lib/libxslt.lib $(TPATH)/lib/libxml2.lib $(TPATH)/lib/libeay32.dll.a $(TPATH)/lib/libcrypto.a $(TOOLS)/lib/libssl32.dll.a $(LIBINTL_CPATH)/lib/libintl.lib
+	$(CPP) /D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DZOO_SERVICE $(CFLAGS) /c service.c
+	link /dll /out:cgi-env/wps_status.zo $(FILES) ./service.obj $(LDFLAGS) $(XSLT_DIR)\win32\bin.msvc\libxslt.lib /FORCE:MULTIPLE
 
 clean:
-	del /f cgi-env\wps*
+	erase cgi-env\*_status.*
+	erase *.obj
Index: trunk/zoo-project/zoo-services/utils/status/service.c
===================================================================
--- trunk/zoo-project/zoo-services/utils/status/service.c	(revision 348)
+++ trunk/zoo-project/zoo-services/utils/status/service.c	(revision 384)
@@ -24,7 +24,5 @@
 
 #include "service.h"
-#ifdef WIN32
-#include <windows.h>
-#endif
+#include "service_internal.h"
 
 extern "C" {
@@ -40,5 +38,4 @@
 
 #include <dirent.h>
-#include "service_internal.h"
 
   /**
@@ -76,7 +73,8 @@
 	fprintf(stderr,"File : %s searched : %s\n",dp->d_name,tmp);
 #endif
-	if(strstr(dp->d_name,tmp)!=0){
+	if(strstr(dp->d_name,"final_")==0 && strstr(dp->d_name,tmp)!=0){
 	  sprintf(fileName,"%s/%s",tmpTmap->value,dp->d_name);
 	  hasFile=1;
+	  break;
 	}
       }
@@ -109,6 +107,4 @@
       xmlDocDumpFormatMemory(res, &xmlbuff, &buffersize, 1);
       setMapInMaps(outputs,"Result","value",(char*)xmlbuff);
-      setMapInMaps(outputs,"Result","mimeType","text/xml");
-      setMapInMaps(outputs,"Result","encoding","UTF-8");
       xmlFree(xmlbuff);
     }
