crear servicio en windows

Tengo problemas para iniciar mi servicio en mi PC. Mi código se basa en este artículo.http://www.gamedev.net/reference/articles/article1899.asp

Cuando llamo a installService desde mi int main (int argc, char * argv []), se registra correctamente (puedo verlo en msconfig y services.msc). Sin embargo, no ha comenzado. Inicio manualmente el servicio a través de services.msv y aparece el error "Error 2: el sistema no puede encontrar el archivo especificado". ¿Por qué es esto? Hace más de un minuto que registré los servicios, mi disco duro externo todavía está encendido (donde está almacenado actualmente. Voy a mover una versión que no sea de dispositivo a c: / cuando esté lista) ¿Qué estoy haciendo mal? ¿Hay otro tutorial? puede mirar (solo encontré el vinculado a través de google)

#define srvName "MyTestService_01312009"

void installService(char*path)
{
    SC_HANDLE handle = ::OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );
    SC_HANDLE service = ::CreateService(
        handle,
        srvName,
        "MyTestService_01312009b",
        GENERIC_READ | GENERIC_EXECUTE,
        SERVICE_WIN32_OWN_PROCESS,
        SERVICE_AUTO_START,
        SERVICE_ERROR_IGNORE,
        path,
        NULL,
        NULL,
        NULL,
        NULL,
        NULL
    );
}
void uninstallService()
{
    SC_HANDLE handle = ::OpenSCManager( NULL, NULL, SC_MANAGER_ALL_ACCESS );//?
    SC_HANDLE service = ::OpenService( handle, srvName, DELETE );
    if( service != NULL )
    {
        // remove the service!
        ::DeleteService( service );
    }
}

SERVICE_STATUS_HANDLE hStatus;
SERVICE_STATUS status;

/*
if( ::StartServiceCtrlDispatcher( dispatchTable ) == 0 )
{
    // if this fails, it's probably because someone started us from
    // the command line.  Print a message telling them the "usage"
}
*/
void WINAPI ServiceCtrlHandler( DWORD control )
{
    switch( control )
    {
    case SERVICE_CONTROL_SHUTDOWN:
    case SERVICE_CONTROL_STOP:
        // do shutdown stuff here

        status.dwCurrentState = SERVICE_STOPPED;
        status.dwWin32ExitCode = 0;
        status.dwCheckPoint = 0;
        status.dwWaitHint = 0;
        break;
    case SERVICE_CONTROL_INTERROGATE:
        // just set the current state to whatever it is...
        break;
    }

    ::SetServiceStatus( hStatus, &status );
}
void WINAPI ServiceDispatch( DWORD numArgs, char **args )
{
    // we have to initialize the service-specific stuff
    memset( &status, 0, sizeof(SERVICE_STATUS) );
    status.dwServiceType = SERVICE_WIN32;
    status.dwCurrentState = SERVICE_START_PENDING;
    status.dwControlsAccepted = SERVICE_ACCEPT_STOP;

    hStatus = ::RegisterServiceCtrlHandler( srvName, &ServiceCtrlHandler );

    // more initialization stuff here
    FILE *f = fopen("c:/testSrv.bin", "wb");
    ::SetServiceStatus( hStatus, &status );
}
SERVICE_TABLE_ENTRY dispatchTable[] =
{
    { srvName, &ServiceDispatch },
    { NULL, NULL }
};

Respuestas a la pregunta(1)

Su respuesta a la pregunta