Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RAS Server Error

Posted on 1998-08-24
4
Medium Priority
?
243 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
  • 3
4 Comments
 
LVL 1

Accepted Solution

by:
gasim earned 200 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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

926 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