--- spal60sr\src\TSSGCtrl\SSToggle.original.cpp	Sun Apr 20 17:58:56 2003
+++ spal60sr\src\TSSGCtrl\SSToggle.cpp	Sun Apr 20 17:58:56 2003
@@ -1,5 +1,7 @@
 #include "SSToggle.h"
 
+#define LOCAL_MEMORY_SUPPORT 1
+
 //---------------------------------------------------------------------
 //uݒ֐v
 //
@@ -20,8 +22,13 @@
  addressStr = tmpV[0];
  onCode  = tmpV[1];
  offCode = tmpV[2];
+#if !defined(SUBJECT_STATUS) || !SUBJECT_STATUS
  TSmartVector<TProcessAccessElementBase> AEV  //ڃTCYvp
 	( SSGC.MakeDataCode(this, onCode, offCode, true, SSGC.GetAddress(this, addressStr), 0) );
+#else
+ TSmartVector<TProcessAccessElementBase> AEV  //ڃTCYvp
+	(SSGC.MakeDataCode(this, onCode, offCode, true, (unsigned long)(address = (const BYTE *)SSGC.GetAddress(this, addressStr)), 0));
+#endif
  size = TProcessAccessElementBase::GetTotalSize(*AEV.GetData(), true);
 
  //̂؂蕪
@@ -48,14 +55,25 @@
  Setting(SSGC);
  
  TSmartHandle SHandle;
+#if !defined(LOCAL_MEMORY_SUPPORT) || !LOCAL_MEMORY_SUPPORT
  if(( SHandle=SSGC.Open(this, PROCESS_VM_READ) )==NULL)
+#else
+ if ((SHandle = SSGC.Open(this, PROCESS_VM_READ, addressStr.c_str())) == NULL)
+#endif
 	return ssgCtrl::reOPEN_ERROR;	//vZX̃I[vG[
 
+#if !defined(SUBJECT_STATUS) || !SUBJECT_STATUS
  if(!SSGC.IsEnabled(this)) return ssgCtrl::reNOT_ENABLED;	//LU
+#else
+ if(!SSGC.IsEnabled(this, TRUE)) return ssgCtrl::reNOT_ENABLED;	//LU
+#endif
 
 
  //Kp
  unsigned long Address = SSGC.GetAddress(this, addressStr);
+#if defined(SUBJECT_STATUS) && SUBJECT_STATUS
+ address = (const BYTE *)Address;
+#endif
 
  if(onCode.empty()) return ssgCtrl::reOPTION_ERROR;	//ONlȂł(^^;
 
@@ -82,7 +100,11 @@
  Setting(SSGC);
  
  TSmartHandle SHandle;
+#if !defined(LOCAL_MEMORY_SUPPORT) || !LOCAL_MEMORY_SUPPORT
  if(( SHandle=SSGC.Open(this, PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_VM_OPERATION) )==NULL)
+#else
+ if ((SHandle = SSGC.Open(this, PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_VM_OPERATION, addressStr.c_str())) == NULL)
+#endif
 	return ssgCtrl::reOPEN_ERROR;	//vZX̃I[vG[
 
  if(!SSGC.IsEnabled(this)) return ssgCtrl::reNOT_ENABLED;	//LU
@@ -90,6 +112,9 @@
 
  //Kp
  unsigned long Address = SSGC.GetAddress(this, addressStr);
+#if defined(SUBJECT_STATUS) && SUBJECT_STATUS
+ address = (const BYTE *)Address;
+#endif
 
  //*+??ȂǂlȂAvector<TProcessAccessElementBase *>
  TSmartVector<TProcessAccessElementBase> CompareVec
