🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2559

Re: Indy 9 SysLog in a DLL

#2559
From: Paul
Date: Mon, 27 Mar 2006 08:41
50 lines
3026 bytes
The DLL purpose is to allow the application (BCB or VC++) to create one or 
more instances of a syslog thread.  The reason, my company seems to have 
various logging systems, bespoke for each development, and it would seem a 
good idea to standardise it using a known standard.

I've made some assumptions with the design of the DLL, and one of those is 
that the TIdSysLog can be handled in a TThread, thus not blocking the main 
application (it appeared to work in a test application).

The DLL has three functions:

// create/start thread for handling TIdSysLog, a thread Q
IMPORT_EXPORT unsigned long   __stdcall TheSysLogTaskStart ( const char * 
In_ProcessName,
                                                             const unsigned 
long In_ProcessID,
                                                             const char * 
In_ServerAddress,
                                                             const unsigned 
long In_ServerPort,
                                                             void** 
Out_ClientHandle );

// terminate/destroy thread for handling TIdSysLog
IMPORT_EXPORT unsigned long   __stdcall TheSysLogTaskStop ( void** 
In_ClientHandle );

// create and add a syslog message to the Thread's input Q
IMPORT_EXPORT unsigned long   __stdcall TheSysLogTaskSend ( const void** 
In_ClientHandle,
                                                            const unsigned 
long In_Severity,
                                                            const unsigned 
long In_Facility,
                                                            const char * 
In_Message );

I must admit, I don't know what to put into DllEntryPoint() function, or 
DllMain(..).  I've read the help system and can't make much sense of it 
(still much to learn about DLLs I suspect).

Paul


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4427065d$3@newsgroups.borland.com...
> What exactly is your DLL code actually doing, particularly in its
> DllEntryPoint() function?
>
> Gambit
Technical Details
Message-ID: <4427972a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.volia.net!news.germany.com!newsfeed.freenet.de!newsfeed.inode.at!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <442645a5@newsgroups.borland.com> <4427065d$3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a7a7e5cdcf8a0abf
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Paul" <plmacca@clara.co.uk>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <442645a5@newsgroups.borland.com> <4427065d$3@newsgroups.borland.com>
Subject: Re: Indy 9 SysLog in a DLL
Date: Mon, 27 Mar 2006 08:41:47 -0000
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 86.133.176.199
Message-ID: <4427972a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1143445290 86.133.176.199 (26 Mar 2006 23:41:30 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news2.volia.net!news.germany.com!newsfeed.freenet.de!newsfeed.inode.at!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail