Board index » delphi » Porting the Winsvc header file to a Delphi 2.0 unit pas file, Need som help

Porting the Winsvc header file to a Delphi 2.0 unit pas file, Need som help

Hello everyone!
I am trying to build a unit for Delphi 2 that defines everything needed to
build a Windows NT service. I am sorry to say it but my experience in
Delphi 2 is not that big. I need help with the following problem. In C it
is possible to make a function prototype looking like

typedef VOID (WINAPI *LPSERVICE_MAIN_FUNCTION) ( DWORD dwNumServicesArgs,
LPSTR *lpServiceArgVectors);

and then use it in a struct like the one below

typedef struct _SERVICE_TABLE_ENTRY {
LPSTR lpServiceName;
LPSERVICE_MAIN_FUNCTION lpServiceProc; } SERVICE_TABLE_ENTRY,
*LPSERVICE_TABLE_ENTRY;

So my question to you Delphi wizards out there, is it possible to do the
same thing in Delphi 2.0 or do i have to make a C DLL to accomplish this
task. That would be a shame to a very good Development tool.

Happy New Year to all of you out there from a cold Stockholm!
Peter

 

Re:Porting the Winsvc header file to a Delphi 2.0 unit pas file, Need som help


On 31 Dec 1996 16:58:38 GMT,  "Peter Merkert" <i...@dataphone.se>
imparted this wisdom in the alt.online-service.delphi msg.
<01bbf731$c98deb40$2f5f17c2@it>:
| Hello everyone!
| I am trying to build a unit for Delphi 2 that defines everything needed to
| build a Windows NT service. I am sorry to say it but my experience in
| Delphi 2 is not that big. I need help with the following problem. In C it
| is possible to make a function prototype looking like
|
| typedef VOID (WINAPI *LPSERVICE_MAIN_FUNCTION) ( DWORD dwNumServicesArgs,
| LPSTR *lpServiceArgVectors);

As a result of the continued problem of numerous inappropriate posts
in the Usenet NewsGroup alt.online-service.delphi, I have set the
Agent follow-up default for this newsgroup to redirect any and all
follow-ups to any of my corrective posts to all of the following
newsgroups:

alt.comp.lang.borland-delphi
alt.lang.delphi
comp.lang.pascal.delphi.advocacy
comp.lang.pascal.delphi.announce
comp.lang.pascal.delphi.components
comp.lang.pascal.delphi.components.misc
comp.lang.pascal.delphi.components.usage
comp.lang.pascal.delphi.components.writing
comp.lang.pascal.delphi.databases
comp.lang.pascal.delphi.misc
comp.sources.delphi

Any of these newsgroups may be helpful to those with questions,
comments & replies about Borland Delphi products.  The newsgroup
alt.online-service.delphi is devoted to the online service and ISP,
Delphi, not to any Borland product.  We, Delphites, netizens of *our*
Delphi, seek the help of all interested parties in getting
inappropriate traffic in our newsgroup routed to the newsgroups where
it actually belongs.

If a newbie uses alt.online-service.delphi by mistake for a Borland
product newsgroup, please, if you reply to them, either in e-mail or
in a post, or both, redirect them to the right places!  This means
that old hands at Borland Delphi product posting need to routinely
check the newsgroups line to insure that the alt.online-service.delphi
problem begins to be solved.  Thank you!

^Posting & E-Mailing Simultaneously

--DonnaB, Forum Assistant, Delphi Soap Community, go ent soa

Re:Porting the Winsvc header file to a Delphi 2.0 unit pas file, Need som help


I think somebody on Compuserve has already done this. If you have an ftp
address I'll find the file on Compuserve and send it to you.

Other Threads