Index: pjproject/trunk/pjsip-apps/build/Samples-vc.mak
===================================================================
--- pjproject/trunk/pjsip-apps/build/Samples-vc.mak	(revision 328)
+++ pjproject/trunk/pjsip-apps/build/Samples-vc.mak	(revision 328)
@@ -0,0 +1,51 @@
+
+MACHINE_NAME = i386
+OS_NAME = win32
+CC_NAME = vc6-$(BUILD_MODE)
+LIBEXT = .lib
+
+!if "$(BUILD_MODE)" == "debug"
+BUILD_FLAGS = /MTd /Od /Zi
+!else
+BUILD_FLAGS = /Ox /MD /DNDEBUG
+!endif
+
+PJLIB_LIB = ..\..\pjlib\lib\pjlib-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB = ..\..\pjlib-util\lib\pjlib-util-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJMEDIA_LIB = ..\..\pjmedia\lib\pjmedia-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB = ..\..\pjmedia\lib\pjmedia-codec-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_LIB = ..\..\pjsip\lib\pjsip-core-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_UA_LIB = ..\..\pjsip\lib\pjsip-ua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_SIMPLE_LIB = ..\..\pjsip\lib\pjsip-simple-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSUA_LIB_LIB = ..\..\pjsip\lib\pjsua-lib-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+
+LIBS = $(PJSUA_LIB_LIB) $(PJSIP_UA_LIB) $(PJSIP_SIMPLE_LIB) \
+	  $(PJSIP_LIB) $(PJMEDIA_CODEC_LIB) $(PJMEDIA_LIB) \
+	  $(PJLIB_UTIL_LIB) $(PJLIB_LIB)
+
+CFLAGS 	= /DPJ_WIN32=1 /DPJ_M_I386=1 \
+	  $(BUILD_FLAGS) \
+	  -I..\..\pjsip\include \
+	  -I..\..\pjlib\include -I..\..\pjlib-util\include \
+	  -I..\..\pjmedia\include
+LDFLAGS = $(BUILD_FLAGS) $(LIBS) \
+	  ole32.lib user32.lib dsound.lib dxguid.lib netapi32.lib \
+	  mswsock.lib ws2_32.lib 
+
+SRCDIR = ..\src\samples
+OBJDIR = .\output\samples-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)
+BINDIR = ..\bin\samples
+
+
+SAMPLES = $(BINDIR)\simpleua.exe
+
+all: $(OBJDIR) $(SAMPLES)
+
+$(SAMPLES): $(SRCDIR)\$(@B).c $(LIBS) Samples-vc.mak
+	cl -nologo -c $(SRCDIR)\$(@B).c /Fo$(OBJDIR)\$(@B).obj $(CFLAGS) 
+	cl /nologo $(OBJDIR)\$(@B).obj /Fe$@ /Fm$(OBJDIR)\$(@B).map $(LDFLAGS)
+
+$(OBJDIR):
+	mkdir $(OBJDIR)
+
+
Index: pjproject/trunk/pjsip-apps/build/Samples.mak
===================================================================
--- pjproject/trunk/pjsip-apps/build/Samples.mak	(revision 328)
+++ pjproject/trunk/pjsip-apps/build/Samples.mak	(revision 328)
@@ -0,0 +1,66 @@
+
+include ../../build/common.mak
+
+PJLIB_LIB:=../../pjlib/lib/libpj-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJMEDIA_CODEC_LIB:=../../pjmedia/lib/libpjmedia-codec-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_LIB:=../../pjsip/lib/libpjsip-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_UA_LIB:=../../pjsip/lib/libpjsip-ua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSIP_SIMPLE_LIB:=../../pjsip/lib/libpjsip-simple-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+PJSUA_LIB_LIB=../../pjsip/lib/libpjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT)
+
+
+###############################################################################
+# Gather all flags.
+#
+export _CFLAGS 	:= $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \
+		   $(CFLAGS) $(CC_INC)../../pjsip/include $(CC_INC)../../pjlib/include \
+		   $(CC_INC)../../pjlib-util/include $(CC_INC)../../pjmedia/include
+export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \
+		   $(HOST_CXXFLAGS) $(CXXFLAGS)
+export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSUA_LIB_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_SIMPLE_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_CODEC_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \
+		   $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \
+		   $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \
+		   $(LDFLAGS) -lm
+
+SRCDIR := ../src/samples
+OBJDIR := ./output/samples-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)
+BINDIR := ../bin/samples
+
+CFLAGS = $(_CFLAGS)
+LDFLAGS = $(_LDFLAGS)
+
+SAMPLES := simpleua
+EXES := $(foreach file, $(SAMPLES), $(BINDIR)/$(file)-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE))
+
+all: $(OBJDIR) $(EXES)
+
+$(BINDIR)/%-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE): $(OBJDIR)/%$(OBJEXT)
+	$(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \
+	    $(subst /,$(HOST_PSEP),$<) \
+	    $(_LDFLAGS)
+
+$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c
+	$(CC) $(CFLAGS) \
+	  $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \
+	  $(subst /,$(HOST_PSEP),$<) 
+
+$(OBJDIR):
+	$(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) 
+
+clean:
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR))
+	$(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR))
+
+distclean realclean: clean
+	$(subst @@,$(EXES),$(HOST_RM))
+#	$(subst @@,$(subst /,$(HOST_PSEP),$(EXES)) $(subst /,$(HOST_PSEP),$(EXES)),$(HOST_RM))
+#	$(subst @@,$(DEP_FILE),$(HOST_RM))
+
Index: pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw
===================================================================
--- pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw	(revision 320)
+++ pjproject/trunk/pjsip-apps/build/pjsip_apps.dsw	(revision 328)
@@ -169,4 +169,40 @@
 ###############################################################################
 
+Project: "samples"=".\samples.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+    Begin Project Dependency
+    Project_Dep_Name pjlib
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjlib_util
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjmedia_codec
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_core
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_simple
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsip_ua
+    End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name pjsua_lib
+    End Project Dependency
+}}}
+
+###############################################################################
+
 Global:
 
Index: pjproject/trunk/pjsip-apps/build/samples.dsp
===================================================================
--- pjproject/trunk/pjsip-apps/build/samples.dsp	(revision 328)
+++ pjproject/trunk/pjsip-apps/build/samples.dsp	(revision 328)
@@ -0,0 +1,108 @@
+# Microsoft Developer Studio Project File - Name="samples" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) External Target" 0x0106
+
+CFG=samples - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "samples.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "samples.mak" CFG="samples - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "samples - Win32 Release" (based on "Win32 (x86) External Target")
+!MESSAGE "samples - Win32 Debug" (based on "Win32 (x86) External Target")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+
+!IF  "$(CFG)" == "samples - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP BASE Cmd_Line "NMAKE /f samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "samples.exe"
+# PROP BASE Bsc_Name "samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-release"
+# PROP Cmd_Line "nmake /f Samples-vc.mak BUILD_MODE=release"
+# PROP Rebuild_Opt "/a"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ELSEIF  "$(CFG)" == "samples - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP BASE Cmd_Line "NMAKE /f samples.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "samples.exe"
+# PROP BASE Bsc_Name "samples.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Intermediate_Dir "./output/samples-i386-win32-vc6-debug"
+# PROP Cmd_Line "nmake /NOLOGO /S /f Samples-vc.mak BUILD_MODE=debug"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "../bin/samples/simpleua.exe"
+# PROP Bsc_Name ""
+# PROP Target_Dir ""
+
+!ENDIF 
+
+# Begin Target
+
+# Name "samples - Win32 Release"
+# Name "samples - Win32 Debug"
+
+!IF  "$(CFG)" == "samples - Win32 Release"
+
+!ELSEIF  "$(CFG)" == "samples - Win32 Debug"
+
+!ENDIF 
+
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\src\samples\simpleua.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\src\samples\util.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# Begin Source File
+
+SOURCE=".\Samples-vc.mak"
+# End Source File
+# End Target
+# End Project
