Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all articles
Browse latest Browse all 1512

PicServer as Service

$
0
0
PicServer has been made into a service. It is quite a bit more complex than the original, and is called PicSvc.

PicSvc requires the use of NTSVC.ocx. To allow some trouble shooting in the IDE, PicSvc can be run as a Desktop application as well. To create the service, change the IsService flag to true and compile as PicSvc.exe. Although PicSvc.exe can be installed/unistalled by running with a command line extension of /I or /U, you will need to setup some parameters. To accomplish this, a seoond program is required called PicSvcCtrl (prjInterface.vbp), which allows you to install, uninstall, setup, and start the service. The password maintenance portion is not functional yet. The thing to remember is that registry values for any service are automatically deleted when a service is uninstalled, and that the service must be stopped before it can be uninstalled. Also, PicSvc.exe must be in the same directory as PicSvCtrl.

After installing the service, run Setup. The second time around, the default settings will be borrowed from the Desktop version, but will get recreated for the service version.

Errors, connects, disconnects, and file access are logged to a daily logfile. When operating as a service, you will need a directory to serve as a location for the logfiles. A service needs a directory that is accessible to all users, and that is relegated to the "\Windows\System32\LogFiles\service" directory.

One important thing to remember about a service is that there can be no output to the screen, as it operates in session 0 with system privileges, and continues to operate even if you are logged off.

J.A. Coutts
Attached Files

Viewing all articles
Browse latest Browse all 1512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>