[commit] r1232 - in trunk/GME: Core Meta Mga

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Mar 30 15:18:26 CDT 2011


Author: ksmyth
Date: Wed Mar 30 15:18:26 2011
New Revision: 1232

Log:
Compile under UNICODE

Modified:
   trunk/GME/Core/Core.vcxproj
   trunk/GME/Meta/Meta.vcxproj
   trunk/GME/Mga/Mga.vcxproj
   trunk/GME/Mga/MgaCheck.cpp
   trunk/GME/Mga/MgaProject.cpp

Modified: trunk/GME/Core/Core.vcxproj
==============================================================================
--- trunk/GME/Core/Core.vcxproj	Wed Mar 30 15:17:04 2011	(r1231)
+++ trunk/GME/Core/Core.vcxproj	Wed Mar 30 15:18:26 2011	(r1232)
@@ -23,13 +23,13 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">

Modified: trunk/GME/Meta/Meta.vcxproj
==============================================================================
--- trunk/GME/Meta/Meta.vcxproj	Wed Mar 30 15:17:04 2011	(r1231)
+++ trunk/GME/Meta/Meta.vcxproj	Wed Mar 30 15:18:26 2011	(r1232)
@@ -23,13 +23,13 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -244,4 +244,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: trunk/GME/Mga/Mga.vcxproj
==============================================================================
--- trunk/GME/Mga/Mga.vcxproj	Wed Mar 30 15:17:04 2011	(r1231)
+++ trunk/GME/Mga/Mga.vcxproj	Wed Mar 30 15:18:26 2011	(r1232)
@@ -23,13 +23,13 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <UseOfMfc>false</UseOfMfc>
     <UseOfAtl>Dynamic</UseOfAtl>
-    <CharacterSet>MultiByte</CharacterSet>
+    <CharacterSet>Unicode</CharacterSet>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -236,4 +236,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file

Modified: trunk/GME/Mga/MgaCheck.cpp
==============================================================================
--- trunk/GME/Mga/MgaCheck.cpp	Wed Mar 30 15:17:04 2011	(r1231)
+++ trunk/GME/Mga/MgaCheck.cpp	Wed Mar 30 15:18:26 2011	(r1232)
@@ -375,8 +375,7 @@
 				}
 				msg += relpath2;
 				msg += "\nMissing endpoints sometimes can be generated by UDM based interpreters.";
-				CW2A msg2(msg);
-				::MessageBox(NULL, msg2, "Connection endpoint error" , MB_OK | MB_ICONERROR);
+				::MessageBox(NULL, msg, _T("Connection endpoint error") , MB_OK | MB_ICONERROR);
 				COMTHROW(E_MGA_META_VIOLATION);
 			}
 			ITERATE_THROUGH(roles) {

Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp	Wed Mar 30 15:17:04 2011	(r1231)
+++ trunk/GME/Mga/MgaProject.cpp	Wed Mar 30 15:18:26 2011	(r1232)
@@ -1904,15 +1904,9 @@
 		COMTHROW(mgareg.CoCreateInstance(OLESTR("MGA.MgaRegistrar")));
 		CComBSTR undo_size;
 		COMTHROW( mgareg->GetUndoQueueSize( REGACCESS_USER, &undo_size));
-		TCHAR p[3] = { 0, 0, 0}; // max = 99
-		unsigned int len = (undo_size)? undo_size.Length(): 0;
-		if( len != 0 && len <= sizeof( p) - 1)
-		{
-			CopyTo( undo_size, len, p, len); // strcpy
-			int val = _tstoi( p); // atoi
-			if( val > 0 && val < 100) // requirement is to be above 0 and below 100
-				retval = val;
-		}
+		int val = _wtoi(undo_size);
+		if (val > 0 && val < 100) // requirement is to be above 0 and below 100
+			retval = val;
 	}
 	catch( hresult_exception&)
 	{


More information about the gme-commit mailing list