Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good afternoon, I have here a problem, but sorry to say so exhausted all my resources and do not know what else I have the following code:

#include <windows.h>
#include <tchar.h>
#include <stdio.h>

typedef int (*WpeutilFunction)( 
	HINSTANCE hInst, 
	HINSTANCE hPrev, 
	LPTSTR lpszCmdLine, 
	int nCmdShow 
	);

int __cdecl _tmain( int argc, TCHAR *argv[] )
{
    HMODULE         hWpeutil          = NULL;
    WpeutilFunction InitializeNetwork = NULL;
    int             result            = 0;
    TCHAR           szCmdLine[]       = _T("");

    hWpeutil = LoadLibrary( _T("wpeutil") );

    if( NULL == hWpeutil )
    {
        _tprintf( _T("Unable to load wpeutil.dll\n") );
        return GetLastError();
    }

    InitializeNetwork = (WpeutilFunction)GetProcAddress( 
		hWpeutil, 
		"InitializeNetworkW" 
		);

    if( NULL == InitializeNetwork )
    {
        FreeLibrary( hWpeutil );
        return GetLastError();
    }

    result = InitializeNetwork( NULL, NULL, szCmdLine, SW_SHOW );

    if( ERROR_SUCCESS == result )
    {
        _tprintf( _T("Network initialized.\n") );
    }
    else
    {
        _tprintf( _T("Initialize failed: 0x%08x"), result );
    }

    FreeLibrary( hWpeutil );
    return result;
}

This helps me lift the WinPE network services, but when I send a ping any machine in the domain that I get that does not reach the machine, then rises and network services, but as I can do to locate or can get the domain or at least be able to access the machines or not missing something or include in the compilation of the boot WinPE ISO touches add a network driver or what may be the solution?

We would greatly appreciate an answer or a light, I do not see anything. Thank you.

At. DiegoV
Posted
Updated 29-Aug-11 8:40am
v3
Comments
Emilio Garavaglia 31-Aug-11 5:28am    
...when I send a ping any machine in the domain that I get that does not reach the machine, then rises and network services, but as I can do to locate or can get the domain....

Sorry, but ... I'm totally lost in your wording!
Can you reword and use better punctuation, making your question more comprehensible?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900