Solved

RAS Server Error

Posted on 1998-08-24
4
225 Views
Last Modified: 2011-08-18
I have a program which at a certain time per day get initiated. All this program does is Shuts down the FTP, WWW and RAS Services, copies and appends all the IIS logs to one file, performs some logic to the log files and then starts the RAS, WWW and FTP service ( in that order).
Lately, once a week at random intervals, I get a RASSRV.EXE - Application Error on the NT Server 4.0 with option pack 3
The message further reads "The instruction at 0x77f88ob referenced memory at 0x00000018. The memory cannot be read.

I am using StopService() API  to Stop all services and StartService() API to start all the services. Ofcourse. a lot of other initialization is done before these API's are called.

Is this a known defect on NT Server RAS Services or is my program doing something wrong. This message usually appears when I am tryng to Start the RAS service. My Console program  is still in the wait loop for the RAS to start.

Appreciate all the help.
0
Comment
Question by:rian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
gasim earned 50 total points
ID: 1171090
I have ran into similar problems stoping the RAS service and I finally gave up and used another approach to stop it and since you are running a console application then it will work for you as well.
You can Use CreateProcess API to execute the (net stop) and (net start) CMD commands. I have tried it and it works with no problems.
If you are interested in doing so below is the code for using (net stop):

#include <windows.h>

main()
{
      STARTUPINFO STARTUP_INFO;
      PROCESS_INFORMATION process_info;
      GetStartupInfo(&STARTUP_INFO);
      CreateProcess(0,"net stop \"ras server\"",0,0,FALSE,CREATE_NEW_CONSOLE,0,0,&STARTUP_INFO,&process_info);
      return;
}

0
 

Author Comment

by:rian
ID: 1171091
Thanks a lot. That worked.

0
 
LVL 1

Expert Comment

by:gasim
ID: 1171092
I'm gladd that it did.
Thank you
0
 
LVL 1

Expert Comment

by:gasim
ID: 1171093
I'm gladd that it did.
Thank you
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lambda for random numbers problem 7 120
What is sub-make ? 2 88
Need some help with mailto 16 33
How to increment counter variables in ANSI  C (Not C# or C++). 9 41
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question