home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- //
- // This source code of DLL can be compiled by Borland C++ Compiler 5.5 for Win32
- //
- // Mentioned compiler is free and downloadable from
- // http://www.borland.com/bcppbuilder/freecompiler/
- //
- // If it is installed e.g. in C:\CPP55, for compiling do this steps:
- // * in PATH enviroment variable must by path to the C:\CPP55\BIN directory
- // * own compiling do with this statement:
- // bcc32.exe -tWD -ps -IC:\CPP55\Include -LC:\CPP55\Lib xml.cpp
- //
- // -tWD means destination platform is Windows DLL
- // -ps means stdcall calling convention (and no '_' before function name)
- //
- //
- // File created and edited in rkEdit
- //
- // (c) 1991, 2001 Slßvek Rydval, slavek@rydval.cz
- // http://www.rydval.cz
- // http://www.rydval.cz/rkEdit
- //
- // This is example how to create own dll for rkEdit compiler log parser.
- // For more details see documentation.
- //
-
- #include <windows.h>
- #include <string.h>
- #include <stdlib.h>
- #include "LOGANALYZATORSTYPES.H"
-
-
- //-------------------------------------------------------------GetCapability---
- // This function returns capability of XML.DLL
- //
- extern "C" __declspec(dllexport) TrkEditCapability GetCapability()
- {
- TrkEditCapability pom;
- pom.Version = "rkEdit DLLs 1.0.0.1";
- pom.SupportedFunctionType = spPChar;
- return pom;
- } //GetCapability
-
-
- //---------------------------------------------------------GetXYOfFirstError---
- //
- //
- #define MaxNum 10
-
- extern "C" __declspec(dllexport) int GetXYOfFirstError (const char *Text,
- int *ErrX, int *ErrY, int *LogX, int *LogY)
- {
- char Number [MaxNum];
- int Row = 0;
-
- *ErrX = *ErrY = *LogX = *LogY = -1;
- for (int i = 0; Text [i] != '\0'; i++)
- {
- if (Text [i] == '\r' && Text [i+1] == '\n')
- {
- Number [MaxNum-1] = '\0';
- int j = MaxNum-2;
- int k = i-1;
-
- for (; k>=0; j--, k--)
- {
- if (Text [k] >= '0' && Text [k] <= '9')
- Number [j] = Text [k];
- else
- break;
-
- if (j == 0) break;
- }
- for (; j >= 0; j--) Number [j] = ' ';
-
- if (Row == 0)
- *ErrY = atoi (Number);
- else if (Row == 1)
- *ErrX = atoi (Number);
- else break;
- Row++;
- } //if
- }//for
- return 0;
- } //GetXYOfFirstError
-
- //---------------------------------------------------------------------------
-
- #pragma argsused
-
- int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
- {
- return 1;
- }
- //---------------------------------------------------------------------------
-
-