Advertisement

RAS API under win9x

Started by June 03, 2001 11:52 AM
3 comments, last by Xeno 23 years, 8 months ago
i wrote a program that disconnect all the dial up connections after a defined time with the RAS API , now , under my win2k system it works great , but it seem that under Win98 and winME it just wont work , heres the code for the disconnect routine:
  
void DisconnectNow(void)
{
	DWORD dwSize;
	DWORD number;
	DWORD error;
	RASCONN rasconn[MAX_CONNECTIONS];
	rasconn[0].dwSize = sizeof(RASCONN);
	dwSize = sizeof(rasconn);
	error = RasEnumConnections(rasconn,&dwSize,&number);

	if(!error)
	{
		int loop;
		for(loop = 0;loop < number;loop++)
		{
			RasHangUp(rasconn[loop].hrasconn);
		}
	}

}

   
why it works on win2k, and on win9x it wont work?

"Thats who you are. Thats what you could." ------------------------------ - Goblineye Entertainment ------------------------------ Edited by - xeno on June 3, 2001 12:56:01 PM Edited by - xeno on June 3, 2001 12:57:09 PM

------------------------------- Goblineye Entertainment------------------------------

check this out!
hope it will help you

Arkon
[QSoft Systems]
Advertisement
nope , tnx anyway , well , i know exactly what is the problem , the problem is that RasEnumConnections() fails , and the error code is ERROR_BUFFER_INVALID , i have no idea why its happenning , does anyone had this problem before? why its work on win2k and fails on win98?

tnx

------------------------------- Goblineye Entertainment------------------------------

The entire behavior of the RAS sub-system is different on NT vs. 9x kernels. I wouldn''t be surprised if it just doesn''t work on 9x.

You could try zeroing the rasconn data out first...

Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
I tried it , but i dont understand , on MSDN they say it should work on win95 and later , so , what should i do?


"Thats who you are. Thats what you could."
------------------------------
- Goblineye Entertainment
------------------------------

------------------------------- Goblineye Entertainment------------------------------

This topic is closed to new replies.

Advertisement