WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Sponsors
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
Personal menu
Welcome Guest
User:
Pass:
Register!
Resend Validation Email
 
Forum
 

WinNT Service Error, StartServiceCtrlDispatcher returning Zero always

vulPeCula
Quote Post


Extremely Active Member
******

Group: Members
Posts: 190
Member No.: 16362
Joined: 16-December 08


Hello Masters,
I am trying the beepserv.asm code and when I am running the code it is always returning zero anyways when I am installing the service it's successfully getting installed, but not performing what it is coded to.


CODE
;Register Service With SCM
 mov sTable.lpServiceProc,offset ServiceMain
 LOAD sTable.lpServiceName,offset SERVICE_NAME
 
invoke StartServiceCtrlDispatcher,addr sTable
  .if(eax == 0)
   invoke MessageBox,NULL,addr SSCD,addr SSCD,MB_ICONERROR
  .endif
 
 invoke ExitProcess,eax


P.S I am trying to Get a Message Box or a Message Beep after every 10 secs.

PMEmail PosterMSN
Top
Gunner
Quote Post


Extremely Active Member
******

Group: Admins
Posts: 210
Member No.: 27608
Joined: 11-October 09


You can't show a standard messaebox from a service (well you can but you will run into problems) instead, use an "Interactive Service" http://msdn.microsoft.com/en-us/library/ms683502(VS.85).aspx
PMEmail PosterUsers Website
Top
vulPeCula
Quote Post


Extremely Active Member
******

Group: Members
Posts: 190
Member No.: 16362
Joined: 16-December 08


Thanks Gunner biggrin.gif , heard form you after a long time.

anyway my real purpose is not to interact but to test the service, can you suggest any other way I can test that service installed and started is running properly in background ??

and surely I will take a look at "Interactive Services" but my main motive is silent work not user interaction, the message box or message beep was just to test the service.
PMEmail PosterMSN
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian
Google