Logtext - Dokumentation
Heimseite - Download - Dokumentation - Forum - Fehler melden - Impressum - Lizenzvereinbarung - Externe Verweise
 
 
Beispielprogramm zur Verwendung der DLL logtext.dll - logtextexample
 
Dieses Beispiel zeigt, wie die Bibliothek in eigene Applikationen implementiert und aufgerufen wird.
 
 
 
 

logtextexample.c

gehe zur Dokumentation dieser Datei
00001 #include <stdio.h>
00002 #include "logtext.h"
00003 
00004 #define APPNAME "MyApplication"
00005 
00006 /*
00007         Use this to store the log file in a sub folder 'Logs':
00008         #define APPNAME "Logs\\MyApplication"
00009         Don't forget to adjust logtext.ini accordingly by
00010         changing the section name:
00011         [Logs\MyApplication]
00012 
00013         Here are some of the other examples the example logtext.ini
00014         is configured for:
00015 
00016         #define APPNAME "MaxSizeExample"
00017         #define APPNAME "MaxLinesExample"
00018         #define APPNAME "WeeklyLogging"
00019 */
00020 
00021 
00022 int main (int argc, char *argv[], char *envp[])
00023 {
00024         /*
00025         Use this for standard DLL search:
00026         if (!LoadAndInitializeLogText (NULL))
00027 
00028         Use this to search for the DLL in the current directory:
00029         */
00030         if (!LoadAndInitializeLogText (".\\logtext.dll"))
00031         {       /*
00032                 Look at
00033                 http://msdn2.microsoft.com/en-us/library/ms682586.aspx
00034                 to see where 'logtext.dll' should be located.
00035                 */
00036                 fputs ("Error loading 'logtext.dll'.\n"
00037                         "\nCheck\n"
00038                         "http://msdn2.microsoft.com/en-us/library/ms682586.aspx"
00039                         "\nto see where it should be located.\n", stderr);
00040                 return 1;
00041         }
00042         (lpLogTextExQ) (APPNAME, "This is our text to log", NULL);
00043         (lpLogTextExQ) (APPNAME, "That's the second event to log", NULL);
00044         (lpLogTextExQ) (APPNAME, "That's the third event to log", NULL);
00045         (lpLogTextExQ) (APPNAME, "Here's some binary data:", NULL);
00046         (lpLogTextExQ) (APPNAME, "\1\2\3\4\5\6\7ABCDEFGHI", NULL);
00047         (lpLogTextExQ) (APPNAME, "Finished.", NULL);
00048         (lpLogTextExQ) (APPNAME, "", NULL); /* Store an empty line. */
00049         return 0;
00050 }
00051 
 
 
 
 
 
 
 
 

Heimseite - Download - Dokumentation - Forum - Fehler melden - Impressum - Lizenzvereinbarung - Externe Verweise