Solved

RAS Server Error

Posted on 1998-08-24
4
218 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
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.

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now