Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WSAEPROVIDERFAILEDINIT returned from socket()

212 views
Skip to first unread message

Dave Wright

unread,
May 15, 2001, 6:44:49 PM5/15/01
to
I have a simple win32 program that creates a socket. When I run the
program from the command line, it works fine. However, I get the error
WSAEPROVIDERFAILEDINIT returned from socket() when the process is
executed by a NT service.

Does WSAEPROVIDERFAILEDINIT somehow mean that the winsock DLL
(wsock32.dll) could not be loaded? The wsock32.dll is definitely in the
path when the command executes. What else can cause
WSAEPROVIDERFAILEDINIT to be returned from socket()?

Thanks,
Dave

Jijo Xavier

unread,
May 15, 2001, 6:59:02 PM5/15/01
to
you might need to set the service privilages to administrator.


"Dave Wright" <dhwr...@mindspring.com> wrote in message
news:3B01B1B1...@mindspring.com...

Phil Frisbie, Jr.

unread,
May 15, 2001, 6:57:47 PM5/15/01
to
A quick news group search shows that this is most likely an NT environment or
security problem. How are you launching your program from the NT service?


Phil Frisbie, Jr.
Lead Developer, Hawk Software
http://www.hawksoft.com

Dave Wright

unread,
May 15, 2001, 8:16:01 PM5/15/01
to
I found the problem was caused by not having the "SystemRoot" environment
variable defined in the environment passed to CreateProcess(). Apparently, this
is required for WinSock applications to execute.

Sorry for wasting your time,
Dave

Douglas Reilly

unread,
May 16, 2001, 9:18:15 AM5/16/01
to
Not a waste of time. I learned something<g>.


"Dave Wright" <dhwr...@mindspring.com> wrote in message

news:3B01C712...@mindspring.com...

Alun Jones

unread,
May 16, 2001, 11:37:53 AM5/16/01
to
In article <3B01C712...@mindspring.com>, Dave Wright
<dhwr...@mindspring.com> wrote:
> I found the problem was caused by not having the "SystemRoot" environment
> variable defined in the environment passed to CreateProcess(). Apparently,
> this
> is required for WinSock applications to execute.

As a quick note of another possible cause of services failing to run with
Winsock, you may need to ensure that your service depends on the successful
start of any networking components that you use.

Alun.
~~~~

[Note that answers to questions in newsgroups are not generally
invitations to contact me personally for help in the future.]
--
Texas Imperial Software | Try WFTPD, the Windows FTP Server. Find us at
1602 Harvest Moon Place | http://www.wftpd.com or email al...@texis.com
Cedar Park TX 78613-1419 | VISA/MC accepted. NT-based sites, be sure to
Fax/Voice +1(512)378-3246 | read details of WFTPD Pro for NT.

0 new messages