Results 1 to 3 of 3

Thread: Really a problem? Windows Service with VB

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2004
    Posts
    1

    Really a problem? Windows Service with VB

    Hi,

    I'm trying to create a Windows Service with Visual Basic 5.0.
    This program should be able to use an ODBC-connection to a database on another computer.

    I've read a lot of tutorials which used the ntsrv.ocx to create the service. And I wanted to use it too, until I read the Microsoft Knowledge Base Article - 175948 about problems occurring when using VB to create a service. Now I don't know what to do.

    Does anyone have experiences with the ntsrv.ocx - especially with ODBC?

    Ben

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    I came accross some code here at the forums the showed an
    example of creating a NT Service from the ground up using APIs.
    I have sucessfully created my own program for creating services,
    so it can be done. Search for CreateService, OpenSCManager,
    StartService, for starters. No 3rd party controls needed.

    To control/create a service...service status

    Search on the others and you will come accross the code for
    creating the service executable to be bound when you use the
    CreateService API.

    Found it...
    Service executable to be registered as an service using the first link above.

    HTH
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width