Check_FileMappingMT4_dll

Author: Copyright � Zhunko
0 Views
0 Downloads
0 Favorites
Check_FileMappingMT4_dll
//+------------------------------------------------------------------+
//|                                     Check_FileMappingMT4.dll.mq4 |
//|                                     Copyright © Zhunko           |
//|                                     vadim@zhunko.ru              |
//+------------------------------------------------------------------+
//| Äëÿ âûâîäà â êîìåíòàðèè âñåõ ïðèìåðîâ íåîáõîäèì ýêðàí ñ âûñîêèì  |
//|ðàçðåøåíèåì ïî âåðòèêàëè èëè êîììåíòèðóéòå íåíóæíûå áëîêè.        |
//+------------------------------------------------------------------+
#property copyright "Copyright © Zhunko"
#property link      "vadim@zhunko.ru"
#property show_inputs
#include <FileMappingMT4.mqh> // Çàãîëîâî÷íûé ôàéë áèáëèîòåêè "TimeSeriesMT4.dll".
//ææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ
extern bool   CheckWriteRead = false;                       // Êîíòðîëü çàïèñè/÷òåíèÿ â îäíîé ïðîãðàììå.
extern bool   CheckWrite     = false;                       // Êîíòðîëü çàïèñè â ðàçíûõ ïðîãðàììàõ.
extern bool   CheckRead      = false;                       // Êîíòðîëü ÷òåíèÿ â ðàçíûõ ïðîãðàììàõ.
extern bool   CheckGeneral   = false;                       // Êîíòðîëü îñíîâíûõ ôóíêöèé.
extern string NamePrefix     = "Loc";                       // Ïðåôèêñ èìåíè ïðîåöèðóåìîãî ôàéëà äëÿ çàêðûòèÿ ïî ïðåôèêñó èìåíè.
extern string NameFileMap0   = "Local\Check_FileMapping0";  // Èìÿ äëÿ ïðîåöèðóåìîãî ôàéëà. Äîïîëíèòåëüíûå ïðåôèêñû äëÿ ïðîñòðàíñòâà èì¸í: "Global\" èëè "Local\".
extern string NameFileMap1   = "Local\Check_FileMapping1";  // Èìÿ äëÿ ïðîåöèðóåìîãî ôàéëà.
extern string NameFileMap2   = "Local\Check_FileMapping2";  // Èìÿ äëÿ ïðîåöèðóåìîãî ôàéëà.
extern string NameFileMap3   = "Local\Check_FileMapping3";  // Èìÿ äëÿ ïðîåöèðóåìîãî ôàéëà.
extern string NameFileMap4   = "Global\Check_FileMapping4"; // Èìÿ äëÿ ïðîåöèðóåìîãî ôàéëà.
extern int    MemorySize     = 64000;                       // Êîëè÷åñòâî ðåçåðâèðóåìîé ïàìÿòè äëÿ ôàéëîâîãî îòáðàæåíèÿ.
extern int    StartByte      = 0;                           // Íîìåð áàéòà îò íà÷àëà âûäåëåííîé ïàìÿòè, ñ êîòîðîãî áóäóò çàïèñàíû äàííûå.
extern bool   bValue         = true;                        // ×èñëî òèïà BOOL.
extern int    cValue         = 123;                         // ×èñëî òèïà CHAR.
extern int    ucValue        = 255;                         // ×èñëî òèïà UNSIGNED CHAR.
extern int    shValue        = 32100;                       // ×èñëî òèïà SHORT.
extern int    ushValue       = 65535;                       // ×èñëî òèïà UNSIGNED SHORT.
extern int    nValue         = 2147012345;                  // ×èñëî òèïà INT.
extern double fValue         = 1234.56789012;               // ×èñëî òèïà FLOAT.
extern double dValue         = 1234.56789012;               // ×èñëî òèïà DOUBLE.
extern string sValue0        = "Êîíòðîëü = 1234.56789";     // Ñòðîêà òèïà STRING.
extern string sValue1        = "Êîíòðîëü = 9876.54321";     // Ñòðîêà òèïà STRING.
extern string sValue2        = "Ïðèâåò ìèð!!!";             // Ñòðîêà òèïà STRING.
extern string sValue3        = "Ìèðó ìèð!";                 // Ñòðîêà òèïà STRING.
extern string sValue4        = "Íå ïðàâèëüíîå èìÿ";         // Ñòðîêà òèïà STRING.
//ææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ
void start()
 {
  int    i = 0;
  int    hMapping = NULL;
  int    nAddress = NULL;
  string sComment = "";
  // Áóôåð äëÿ ïðè¸ìà ñòðîêè.
  string sBuffer25 = "                         "; // Áóôåð äëÿ ïðè¸ìà ñòðîêè.
  string sBuffer50 = "                                                  "; // Áóôåð äëÿ ïðè¸ìà ñòðîêè.
  string sBufferClaer50 = "                                                  "; // Áóôåð äëÿ î÷èñòêè ôàéëîâîãî îòîáðàæåíèÿ.
  // Ìàññèâû äëÿ çàïèñè.
  bool   abOutArray[10] = {true, false, true, false, true, true, true, false, false, false};
  int    acOutArray[10] = {-128, -93, -70, -25, 0, 25, 56, 86, 96, 127};
  int    aucOutArray[10] = {0, 54, 75, 123, 150, 175, 199, 210, 230, 255};
  int    ashOutArray[10] = {-32768, -22210, -16789, -8765, 0, 4567, 8907, 16789, 22456, 32767};
  int    aushOutArray[10] = {0, 1210, 3789, 4765, 50764, 12567, 18907, 35789, 45456, 65535};
  int    aiOutArray[10] = {-2147483648, -1147432001, -16789, -8765, 0, 4567, 8907, 16789, 1147432001, 2147483647};
  double afOutArray[10] = {-21474.3200112345, -11474.3200112345, -16.78912345, -876.512345, 0, 45671.2345612345, 890712.345678912, 167891.234567891, 1147432.00112345, 214743.200112345};
  double adOutArray[10] = {-21474.3200112345, -11474.3200112345, -16.78912345, -876.512345, 0, 45671.2345612345, 890712.345678912, 167891.234567891, 1147432.00112345, 214743.200112345};
  // Ìàññèâû äëÿ ÷òåíèÿ.
  bool   abIncArray[10] = {0};
  int    acIncArray[10] = {0};
  int    aucIncArray[10] = {0};
  int    ashIncArray[10] = {0};
  int    aushIncArray[10] = {0};
  int    aiIncArray[10] = {0};
  double afIncArray[10] = {0};
  double adIncArray[10] = {0};
  //xxxx Êîíòðîëü çàïèñè/÷òåíèÿ â îäíîì ïðîöåññå. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  if (CheckWriteRead)
   {//==== Ñîçäàíèå ôàéëîâîãî îòîáðàæåíèÿ. ==========================================================================================================================================
    hMapping = FileMapCreate(NULL, NameFileMap0, MemorySize); // Ñîçäà¸ì îòîáðàæåíèå.
    sComment = "Îòîáðàæåíèå \"" + NameFileMap0 + "\" ñîçäàíî. Äåñêðèïòîð: " + hMapping + "\n\n";
    Comment(sComment);
//    hMapping = FileMapOpen(NameFileMap0);
//    sComment = sComment + "Îòîáðàæåíèå îòêðûòî. Äåñêðèïòîð: " + hMapping + "\n\n";
//    Comment(sComment);
    //==== Êîíòðîëü çàïèñè/÷òåíèÿ ÷èñåë è ñòðîê. ====================================================================================================================================
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà BOOL: (" + FileMapWriteBool(NameFileMap0, StartByte, bValue) + ")  " + bValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà BOOL:             " + FileMapReadBool(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà CHAR: (" + FileMapWriteChar(NameFileMap0, StartByte, cValue) + ")  " + cValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà CHAR:             " + FileMapReadChar(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà UNSIGNED CHAR: (" + FileMapWriteUnsChar(NameFileMap0, StartByte, ucValue) + ")  " + ucValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà UNSIGNED CHAR:             " + FileMapReadUnsChar(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà SHORT: (" + FileMapWriteShort(NameFileMap0, StartByte, shValue) + ")  " + shValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà SHORT:             " + FileMapReadShort(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà UNSIGNED SHORT: (" + FileMapWriteUnsShort(NameFileMap0, StartByte, ushValue) + ")  " + ushValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà UNSIGNED SHORT:             " + FileMapReadUnsShort(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà INT: (" + FileMapWriteInt(NameFileMap0, StartByte, nValue) + ")  " + nValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà INT:             " + FileMapReadInt(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà FLOAT: (" + FileMapWriteFloat(NameFileMap0, StartByte, fValue) + ")  " + fValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà FLOAT:             " + FileMapReadFloat(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà DOUBLE: (" + FileMapWriteDouble(NameFileMap0, StartByte, dValue) + ")  " + dValue + "\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ÷èñëî òèïà DOUBLE:             " + FileMapReadDouble(NameFileMap0, StartByte) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ñòðîêó òèïà STRING: (" + FileMapWriteString(NameFileMap0, StartByte, sValue0) + ")  \"" + sValue0 + "\"\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ñòðîêó òèïà STRING:             \"" + FileMapReadString(NameFileMap0, StartByte, sBuffer50, StringLen(sValue0)) + "\"\n\n";
    Comment(sComment);
    //==== Êîíòðîëü çàïèñè/÷òåíèÿ ìàññèâîâ. =========================================================================================================================================
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà BOOL: (" + FileMapWriteBoolArray(NameFileMap0, StartByte, abOutArray, ArraySize(abOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + abOutArray[i] + ", ";
      else sComment = sComment + abOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà BOOL: (" + FileMapReadBoolArray(NameFileMap0, StartByte, abIncArray, ArraySize(abIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + abIncArray[i] + ", ";
      else sComment = sComment + abIncArray[i] + "}\n";
     }
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà CHAR: (" + FileMapWriteCharArray(NameFileMap0, StartByte, acOutArray, ArraySize(acOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + acOutArray[i] + ", ";
      else sComment = sComment + acOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà CHAR: (" + FileMapReadCharArray(NameFileMap0, StartByte, acIncArray, ArraySize(acIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + acIncArray[i] + ", ";
      else sComment = sComment + acIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà UNSIGNED CHAR: (" + FileMapWriteUnsCharArray(NameFileMap0, StartByte, aucOutArray, ArraySize(aucOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aucOutArray[i] + ", ";
      else sComment = sComment + aucOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà UNSIGNED CHAR: (" + FileMapReadUnsCharArray(NameFileMap0, StartByte, aucIncArray, ArraySize(aucIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aucIncArray[i] + ", ";
      else sComment = sComment + aucIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà SHORT: (" + FileMapWriteShortArray(NameFileMap0, StartByte, ashOutArray, ArraySize(ashOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + ashOutArray[i] + ", ";
      else sComment = sComment + ashOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà SHORT: (" + FileMapReadShortArray(NameFileMap0, StartByte, ashIncArray, ArraySize(ashIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + ashIncArray[i] + ", ";
      else sComment = sComment + ashIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà UNSIGNED SHORT: (" + FileMapWriteUnsShortArray(NameFileMap0, StartByte, aushOutArray, ArraySize(aushOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aushOutArray[i] + ", ";
      else sComment = sComment + aushOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà UNSIGNED SHORT: (" + FileMapReadUnsShortArray(NameFileMap0, StartByte, aushIncArray, ArraySize(aushIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aushIncArray[i] + ", ";
      else sComment = sComment + aushIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà INT: (" + FileMapWriteIntArray(NameFileMap0, StartByte, aiOutArray, ArraySize(aiOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aiOutArray[i] + ", ";
      else sComment = sComment + aiOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà INT: (" + FileMapReadIntArray(NameFileMap0, StartByte, aiIncArray, ArraySize(aiIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aiIncArray[i] + ", ";
      else sComment = sComment + aiIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà FLOAT: (" + FileMapWriteFloatArray(NameFileMap0, StartByte, afOutArray, ArraySize(afOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + afOutArray[i] + ", ";
      else sComment = sComment + afOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà FLOAT: (" + FileMapReadFloatArray(NameFileMap0, StartByte, afIncArray, ArraySize(afIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + afIncArray[i] + ", ";
      else sComment = sComment + afIncArray[i] + "}\n";
     }
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà DOUBLE: (" + FileMapWriteDoubleArray(NameFileMap0, StartByte, adOutArray, ArraySize(adOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + adOutArray[i] + ", ";
      else sComment = sComment + adOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ìàññèâ òèïà DOUBLE: (" + FileMapReadDoubleArray(NameFileMap0, StartByte, adIncArray, ArraySize(adIncArray)) + ")        {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + adIncArray[i] + ", ";
      else sComment = sComment + adIncArray[i] + "}\n\n";
     }
    Comment(sComment);  
    //==== Êîíòðîëü çàêðûòèÿ äåñêðèïòîðîâ. ==========================================================================================================================================
    sComment = sComment + "Äåñêðèïòîð çàêðûò: (" + FileMapCloseHandle(hMapping) + ")\n";
    Comment(sComment);
    sComment = sComment + "Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå \"" + NameFileMap0 + "\" . Äåñêðèïòîð: " + FileMapOpen(NameFileMap0) + "\n\n"; // Îòêðûâàåòñÿ îêíî ñ ñîîáùåíèåì.
    Comment(sComment);
    // Çàêðûòèå åäèíñòâåííîãî äåñêðèïòîðà ïðèâåëî ê çàêðûòèþ ôàéëîâîãî îòîáðàæåíèÿ. Ôóíêöèÿ îòêðûòèÿ íå ìîæåò îòêðûòü íåñóùåñòâóþùåå ôàéëîâîå îòîáðàæåíèå.
   }
  //xxxx Ïèøåì îäèí ðàç. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  if (CheckWrite)
   {//==== Êîíòðîëü ñîçäàíèÿ ôàéëîâîãî îòîáðàæåíèÿ äëÿ ðàáîòû àäðåñíîì ïðîñòðàíñòâå òåêóùåãî ïðîöåññà. ==============================================================================
    nAddress = FileMapCreateViewOfFile(NULL, NameFileMap0, MemorySize);
    sComment = sComment + "Îòîáðàæåíèå \"" + NameFileMap0 + "\" ñîçäàíî. Àäðåñ: " + nAddress + "\n";
    Comment(sComment);
    //==== Êîíòðîëü ôóíêöèé çàïèñè íèçêîãî óðîâíÿ. ==================================================================================================================================
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà BOOL: ("           + FileMapSimpleWriteBool(nAddress, 0, bValue) + ")  " + bValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà CHAR: ("           + FileMapSimpleWriteChar(nAddress, 1, cValue) + ")  " + cValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà UNSIGNED CHAR: ("  + FileMapSimpleWriteUnsChar(nAddress, 2, ucValue) + ")  " + ucValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà SHORT: ("          + FileMapSimpleWriteShort(nAddress, 3, shValue) + ")  " + shValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà UNSIGNED SHORT: (" + FileMapSimpleWriteUnsShort(nAddress, 5, ushValue) + ")  " + ushValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà INT: ("            + FileMapSimpleWriteInt(nAddress, 7, nValue) + ")  " + nValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà FLOAT: ("          + FileMapSimpleWriteFloat(nAddress, 11, fValue) + ")  " + fValue + "\n";
    sComment = sComment + "Çàïèñûâàåì ÷èñëî òèïà DOUBLE: ("         + FileMapSimpleWriteDouble(nAddress, 15, dValue) + ")  " + dValue + "\n";
    sComment = sComment + "Î÷èùàåì ïåðåä çàïèñüþ ñòðîêè: ("         + FileMapSimpleWriteString(nAddress, 23, sBufferClaer50) + ")\n";
    sBuffer50 = sValue0; // Ïåðåêëàäûâàåì ïåðìåííóþ â áóôåð. Èíà÷å áóäóò ïðîáëåìû ïðè ÷òåíèè ñòðîêè (ñòðîêà áóäåò íàêëàäûâàòüñÿ íà ïîñëåäóþùèå äàííûå).
                         // Íî ïðîáëåìû âñ¸ ðàâíî áóäóò. Íåèíèöèàëèçèðîâàííûé áóôåð ïîñëå ñòðîêè áóäåò çàïîëíåí ìóñîðîì. Áóôåð ìîæíî äîïîëíÿòü ïðîáåëàìè.
    sComment = sComment + "Çàïèñûâàåì ñòðîêó òèïà STRING: ("        + FileMapSimpleWriteString(nAddress, 23, sBuffer50) + ")  \"" + sValue0 + "\"\n";
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà BOOL: (" + FileMapSimpleWriteBoolArray(nAddress, 23 + 50, abOutArray, ArraySize(abOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + abOutArray[i] + ", ";
      else sComment = sComment + abOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà CHAR: (" + FileMapSimpleWriteCharArray(nAddress, 73 + 50, acOutArray, ArraySize(acOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + acOutArray[i] + ", ";
      else sComment = sComment + acOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà UNSIGNED CHAR: (" + FileMapSimpleWriteUnsCharArray(nAddress, 123 + 50, aucOutArray, ArraySize(aucOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aucOutArray[i] + ", ";
      else sComment = sComment + aucOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà SHORT: (" + FileMapSimpleWriteShortArray(nAddress, 173 + 50, ashOutArray, ArraySize(ashOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + ashOutArray[i] + ", ";
      else sComment = sComment + ashOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà UNSIGNED SHORT: (" + FileMapSimpleWriteUnsShortArray(nAddress, 223 + 50, aushOutArray, ArraySize(aushOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aushOutArray[i] + ", ";
      else sComment = sComment + aushOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà INT: (" + FileMapSimpleWriteIntArray(nAddress, 273 + 50, aiOutArray, ArraySize(aiOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + aiOutArray[i] + ", ";
      else sComment = sComment + aiOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà FLOAT: (" + FileMapSimpleWriteFloatArray(nAddress, 323 + 50, afOutArray, ArraySize(afOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + afOutArray[i] + ", ";
      else sComment = sComment + afOutArray[i];
     }
    sComment = sComment + "}\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "Çàïèñûâàåì ìàññèâ òèïà DOUBLE: (" + FileMapSimpleWriteDoubleArray(nAddress, 373 + 50, adOutArray, ArraySize(adOutArray)) + ")  {";
    for (i = 0; i < 10; i++)
     {
      if (i < 9) sComment = sComment + adOutArray[i] + ", ";
      else sComment = sComment + adOutArray[i];
     }
    sComment = sComment + "}\n\n";
    Comment(sComment);
    //==== Îòìåíà ïðåäñòàâëåíèÿ ïðîåöèðóåìîãî ôàéëà è çàêðûòèå äåñêðèïòîðîâ. ========================================================================================================
    sComment = sComment + "Îòìåíÿåì ïðåäñòàâëåíèå ïðîåöèðóåìîãî ôàéëà: (" + FileMapUnViewOfFile(nAddress) + ")\n"; // 
    Comment(sComment);
   }
  //xxxx ×èòàåì â öèêëå. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  if (CheckRead)
   {//==== Ñîçäàíèå ôàéëîâîãî îòîáðàæåíèÿ. ==========================================================================================================================================
    hMapping = FileMapCreate(NULL, NameFileMap0, MemorySize); // Ñîçäà¸ì îòîáðàæåíèå. Ìîæíî íå ñîçäàâàòü, à îòêðûòü. Íî òîãäà íåëüçÿ çàïóñòèòü ÷òåíèå ïåðåä çàïèñüþ.
    sComment = "Îòîáðàæåíèå \"" + NameFileMap0 + "\" ñîçäàíî. Äåñêðèïòîð: " + hMapping + "\n\n";
    Comment(sComment);
    Sleep(3000);
    while (CheckRead && !IsStopped())
     {//==== Èíèöèàëèçèðóåì ìàññèâû äëÿ ïðè¸ìà äàííûõ. ==============================================================================================================================
      ArrayInitialize(abIncArray, 0);
      ArrayInitialize(acIncArray, 0);
      ArrayInitialize(aucIncArray, 0);
      ArrayInitialize(ashIncArray, 0);
      ArrayInitialize(aushIncArray, 0);
      ArrayInitialize(aiIncArray, 0);
      ArrayInitialize(afIncArray, 0);
      ArrayInitialize(adIncArray, 0);
      //==== Îòîáðàæàåì ïðåäñòàâëåíèå ïðîåöèðóåìîãî ôàéëà â àäðåñíîå ïðîñòðàíñòâî âûçûâàþùåãî ïðîöåññà. =============================================================================
      nAddress = FileMapViewOfFile(hMapping);
      sComment = sComment + "Îòîáðàæàåì â òåêóùèé ïðîöåññ ôàéëîâîå îòîáðàæåíèå \"" + NameFileMap0 + "\". Àäðåñ: " + nAddress + "\n\n";
      Comment(sComment);
      //==== Êîíòðîëü ôóíêöèé ÷òåíèÿ â àäðñåíîì ïðîñòðàíñòâå òåêóùåãî ïðîöåññà. =====================================================================================================
      sComment = sComment + "×èòàåì ÷èñëî òèïà BOOL: "           + FileMapSimpleReadBool(nAddress, 0) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà CHAR: "           + FileMapSimpleReadChar(nAddress, 1) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà UNSIGNED CHAR: "  + FileMapSimpleReadUnsChar(nAddress, 2) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà SHORT: "          + FileMapSimpleReadShort(nAddress, 3) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà UNSIGNED SHORT: " + FileMapSimpleReadUnsShort(nAddress, 5) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà INT: "            + FileMapSimpleReadInt(nAddress, 7) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà FLOAT: "          + FileMapSimpleReadFloat(nAddress, 11) + "\n";
      sComment = sComment + "×èòàåì ÷èñëî òèïà DOUBLE: "         + FileMapSimpleReadDouble(nAddress, 15) + "\n";
      sComment = sComment + "×èòàåì ñòðîêó òèïà STRING: \""      + FileMapSimpleReadString(nAddress, 23) + "\"\n";
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà BOOL: (" + FileMapSimpleReadBoolArray(nAddress, 23 + 50, abIncArray, ArraySize(abIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + abIncArray[i] + ", ";
        else sComment = sComment + abIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà CHAR: (" + FileMapSimpleReadCharArray(nAddress, 73 + 50, acIncArray, ArraySize(acIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + acIncArray[i] + ", ";
        else sComment = sComment + acIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà UNSIGNED CHAR: (" + FileMapSimpleReadUnsCharArray(nAddress, 123 + 50, aucIncArray, ArraySize(aucIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + aucIncArray[i] + ", ";
        else sComment = sComment + aucIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà SHORT: (" + FileMapSimpleReadShortArray(nAddress, 173 + 50, ashIncArray, ArraySize(ashIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + ashIncArray[i] + ", ";
        else sComment = sComment + ashIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà UNSIGNED SHORT: (" + FileMapSimpleReadUnsShortArray(nAddress, 223 + 50, aushIncArray, ArraySize(aushIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + aushIncArray[i] + ", ";
        else sComment = sComment + aushIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà INT: (" + FileMapSimpleReadIntArray(nAddress, 273 + 50, aiIncArray, ArraySize(aiIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + aiIncArray[i] + ", ";
        else sComment = sComment + aiIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà FLOAT: (" + FileMapSimpleReadFloatArray(nAddress, 323 + 50, afIncArray, ArraySize(afIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + afIncArray[i] + ", ";
        else sComment = sComment + afIncArray[i];
       }
      sComment = sComment + "}\n";
      Comment(sComment);
      //-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      sComment = sComment + "×èòàåì ìàññèâ òèïà DOUBLE: (" + FileMapSimpleReadDoubleArray(nAddress, 373 + 50, adIncArray, ArraySize(adIncArray)) + ")  {";
      for (i = 0; i < 10; i++)
       {
        if (i < 9) sComment = sComment + adIncArray[i] + ", ";
        else sComment = sComment + adIncArray[i];
       }
      sComment = sComment + "}\n\n";
      Comment(sComment);
      //==== Îòìåíà ïðåäñòàâëåíèÿ ïðîåöèðóåìîãî ôàéëà è çàêðûòèå äåñêðèïòîðîâ. ======================================================================================================
      sComment = sComment + "Îòìåíÿåì ïðåäñòàâëåíèå ïðîåöèðóåìîãî ôàéëà: (" + FileMapUnViewOfFile(nAddress) + ")\n"; // 
      Comment(sComment);
      Sleep(5000);
      sComment = "";
     }
    sComment = sComment + "Çàêðûòî ïî èìåíè ôàéëîâîãî îòîáðàæåíèÿ: (" + FileMapCloseName(NameFileMap0 + "Simple") + ")\n";
    Comment(sComment);
    sComment = sComment + "Êîíòðîëü çàòêðûòèÿ. Àäðåñ: " + FileMapOpenViewOfFile(NameFileMap0 + "Simple") + "\n\n";
    Comment(sComment);
   }
  //xxxx Êîíòðîëü îñíîâíûõ ôóíêöèé. xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  if (CheckGeneral)
   {//==== Êîíòðîëü çàêðûòèÿ âñåõ äåñêðèïòîðîâ. =====================================================================================================================================
    Comment(sComment);
    sComment = sComment + "1. Îòîáðàæåíèå 1 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0 + "_1", MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "2. Îòîáðàæåíèå 2 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0 + "_2", MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "1. Îòîáðàæåíèå 1 îòêðûòî. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_1") + "\n";
    Comment(sComment);
    sComment = sComment + "2. Îòîáðàæåíèå 2 îòêðûòî. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_2") + "\n";
    Comment(sComment);
    sComment = sComment + "Âñå äåñêðèïòîðû çàêðûòû: (" + FileMapCloseAll("") + ")\n";
    Comment(sComment);
    sComment = sComment + "1. Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå 1. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_1") + "\n";
    Comment(sComment);
    sComment = sComment + "2. Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå 2. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_2") + "\n\n";
    Comment(sComment);
    //==== Êîíòðîëü çàêðûòèÿ ïî äåñêðèïòîðó ïîëüçîâàòåëüñêîãî ôàéëà. ================================================================================================================
    sComment = sComment + "1.Îòîáðàæåíèå 1 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0 + "_1", MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "2.Îòîáðàæåíèå 2 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0 + "_2", MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "Çàêðûòî ïî äåñêðèïòîðó ïîëüçîâàòåëüñêîãî ôàéëà: (" + FileMapCloseHandleFile(NULL) + ")\n";
    Comment(sComment);
    sComment = sComment + "1. Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå 1. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_1") + "\n";
    Comment(sComment);
    sComment = sComment + "2. Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå 2. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0 + "_2") + "\n\n";
    Comment(sComment);
    //==== Êîíòðîëü çàêðûòèÿ ïî èìåíè ôàéëîâîãî îòîáðàæåíèÿ. ========================================================================================================================
    sComment = sComment + "1.Îòîáðàæåíèå 1 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0, MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "2.Îòîáðàæåíèå 2 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0, MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "Çàêðûòî ïî èìåíè ôàéëîâîãî îòîáðàæåíèÿ: (" + FileMapCloseName(NameFileMap0) + ")\n";
    Comment(sComment);
    sComment = sComment + "Êîíòðîëü çàêðûòèÿ. Ïîïûòêà îòêðûòü îòîáðàæåíèå. Äåñêðèïòîð: " + FileMapOpen(NameFileMap0) + "\n\n";
    Comment(sComment);
    //==== Êîíòðîëü çàêðûòèÿ ïî ïðåôèêñó. ===========================================================================================================================================
    sComment = sComment + "1.Îòîáðàæåíèå 1 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap1, MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "2.Îòîáðàæåíèå 2 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap2, MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "3.Îòîáðàæåíèå 3 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap3, MemorySize) + "\n";
    Comment(sComment);
    sComment = sComment + "4.Îòîáðàæåíèå 4 ñîçäàíî. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap4, MemorySize) + "\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "1. Çàïèñûâàåì ñòðîêó 1 òèïà STRING: (" + FileMapWriteString(NameFileMap1, StartByte, sValue1) + ")  \"" + sValue1 + "\"\n";
    Comment(sComment);
    sComment = sComment + "2. Çàïèñûâàåì ñòðîêó 2 òèïà STRING: (" + FileMapWriteString(NameFileMap2, StartByte, sValue2) + ")  \"" + sValue2 + "\"\n";
    Comment(sComment);
    sComment = sComment + "3. Çàïèñûâàåì ñòðîêó 3 òèïà STRING: (" + FileMapWriteString(NameFileMap3, StartByte, sValue3) + ")  \"" + sValue3 + "\"\n";
    Comment(sComment);
    sComment = sComment + "4. Çàïèñûâàåì ñòðîêó 4 òèïà STRING: (" + FileMapWriteString(NameFileMap4, StartByte, sValue4) + ")  \"" + sValue4 + "\"\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "1. ×èòàåì ñòðîêó 1 òèïà STRING: \"" + FileMapReadString(NameFileMap1, StartByte, sBuffer25, StringLen(sValue1)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "2. ×èòàåì ñòðîêó 2 òèïà STRING: \"" + FileMapReadString(NameFileMap2, StartByte, sBuffer25, StringLen(sValue2)) + "\"\n"; //  áóôåðå sBuffer25 îñòàþòñÿ äàííûå îò ñòàðîé çàïèñè.
    Comment(sComment);
    sComment = sComment + "3. ×èòàåì ñòðîêó 3 òèïà STRING: \"" + FileMapReadString(NameFileMap3, StartByte, sBuffer25, StringLen(sValue3)) + "\"\n"; //  áóôåðå sBuffer25 îñòàþòñÿ äàííûå îò ñòàðîé çàïèñè.
    Comment(sComment);
    sComment = sComment + "4. ×èòàåì ñòðîêó 4 òèïà STRING: \"" + FileMapReadString(NameFileMap4, StartByte, sBuffer25, StringLen(sValue4)) + "\"\n"; //  áóôåðå sBuffer25 îñòàþòñÿ äàííûå îò ñòàðîé çàïèñè.
    Comment(sComment);
    sComment = sComment + "Çàêðûâàåì ïî ïðåôèêñó èìåíè (" + NamePrefix + ") ôàéëîâîãî îòîáðàæåíèÿ: (" + FileMapCloseAll(NamePrefix) + ")\n";
    Comment(sComment);
    //-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    sComment = sComment + "1. Êîíòðîëü çàêðûòèÿ. ×èòàåì ñòðîêó 1 òèïà STRING: \"" + FileMapReadString(NameFileMap1, StartByte, sBuffer25, StringLen(sValue1)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "2. Êîíòðîëü çàêðûòèÿ. ×èòàåì ñòðîêó 2 òèïà STRING: \"" + FileMapReadString(NameFileMap2, StartByte, sBuffer25, StringLen(sValue2)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "3. Êîíòðîëü çàêðûòèÿ. ×èòàåì ñòðîêó 3 òèïà STRING: \"" + FileMapReadString(NameFileMap3, StartByte, sBuffer25, StringLen(sValue3)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "4. Êîíòðîëü çàêðûòèÿ. ×èòàåì ñòðîêó 4 òèïà STRING: \"" + FileMapReadString(NameFileMap4, StartByte, sBuffer25, StringLen(sValue4)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "Çàêðûâàåì âñ¸: (" + FileMapCloseAll("") + ")\n\n";
    Comment(sComment);
    //==== Êîíòðîëü ïåðåâûäåëåíèÿ ïàìÿòè. ===========================================================================================================================================
    sComment = sComment + "Ñîçäà¸ì îòîáðàæåíèå. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0, 10) + "\n";
    Comment(sComment);
    sComment = sComment + "Çàïèñûâàåì ñòðîêó òèïà STRING: (" + FileMapWriteString(NameFileMap0, StartByte, sValue0) + ")  \"" + sValue0 + "\"\n";
    Comment(sComment);
    // ×èòàåì òàì ãäå íå âûäåëÿëè ïàìÿòü è íå ïèñàëè. Îòêðûâàåòñÿ îêíî ñ ñîîáùåíèåì î íå äîñòàòî÷íîé ïàìÿòè.
    sComment = sComment + "×èòàåì ñòðîêó òèïà STRING:             \"" + FileMapReadString(NameFileMap0, StartByte + 20, sBuffer50, StringLen(sValue0)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "Óâåëè÷èâàåì âûäåëåííóþ ïàìÿòü: (" + FileMapResize(NameFileMap0, 50) + ")\n";
    Comment(sComment);
    // Çàïèñûâàåì ïðîñòî òàê. Ìîæíî áûëî íå ïèñàòü, à ïðî÷èòàòü ïóñòóþ ñòðîêó.
    sComment = sComment + "Çàïèñûâàåì ñòðîêó òèïà STRING: (" + FileMapWriteString(NameFileMap0, StartByte + 20, sValue0) + ")  \"" + sValue0 + "\"\n";
    Comment(sComment);
    // Ëþáîå óäà÷íîå çàâåðøåíèå ÷òåíèÿ ãîâîðèò î âûäåëåííîé äîïîëíèòåëüíîé ïàìÿòè.
    sComment = sComment + "×èòàåì ñòðîêó òèïà STRING:             \"" + FileMapReadString(NameFileMap0, StartByte, sBuffer50, StringLen(sValue0)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "Çàêðûâàåì âñå äåñêðèïòîðû: (" + FileMapCloseAll("") + ")\n\n";
    Comment(sComment);
    //==== Êîíòðîëü î÷èùåíèÿ ïàìÿòè. ================================================================================================================================================
    sComment = sComment + "Ñîçäà¸ì îòîáðàæåíèå. Äåñêðèïòîð: " + FileMapCreate(NULL, NameFileMap0, 1000) + "\n";
    Comment(sComment);
    sComment = sComment + "Çàïèñûâàåì ñòðîêó òèïà STRING: (" + FileMapWriteString(NameFileMap0, StartByte, sValue0) + ")  \"" + sValue0 + "\"\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ñòðîêó òèïà STRING:             \"" + FileMapReadString(NameFileMap0, StartByte, sBuffer50, StringLen(sValue0)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "Î÷èùàåì âûäåëåííóþ ïàìÿòü: (" + FileMapClear(NameFileMap0) + ")\n";
    Comment(sComment);
    sComment = sComment + "×èòàåì ñòðîêó òèïà STRING:             \"" + FileMapReadString(NameFileMap0, StartByte, sBuffer50, StringLen(sValue0)) + "\"\n";
    Comment(sComment);
    sComment = sComment + "Çàêðûâàåì âñå äåñêðèïòîðû: (" + FileMapCloseAll("") + ")\n\n";
    Comment(sComment);
   }
 }
//æææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææææ

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---