Beispielprogramm zur Verwendung der DLL logtext.dll - logtextexample
Dieses Beispiel zeigt, wie die Bibliothek in eigene Applikationen implementiert
und aufgerufen wird.
logtextexample.cgehe zur Dokumentation dieser Datei00001 #include <stdio.h>
00002 #include "logtext.h"
00003
00004 #define APPNAME "MyApplication"
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 int main (int argc, char *argv[], char *envp[])
00023 {
00024
00025
00026
00027
00028
00029
00030 if (!LoadAndInitializeLogText (".\\logtext.dll"))
00031 {
00032
00033
00034
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);
00049 return 0;
00050 }
00051
|