Bonjour

Je possède Visual C++ 2005 Express avec Platefrom SDK 2003 RC et tout semble bien fonctionné.
J'ai essai de créer un service windows or je me suis confronté à un gros problème.

Je possède plusieurs exemples et aucun fonctionne !Pourtant ils sont simple et je pense réellement quemon Visual C++ a un problème ?!

Voilà ce que j'ai fais jusqu'à présent.
J'ai fais un nouveau Win32 Console Application avec en type "Console application" et précompiled header (sans MFC la case est grisé).
J'ai collé l'ensemble de l'exemple de ce lien :http://msdn.microsoft.com/library/de...n_function.asp

A noté que j'ai gardé #include <stdafx.h> initialement présent dans la page cpp par défaut.
Et je compile !Voici la liste des erreurs ci dessous.

Merci d'avance !



Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
1>------ Build started: Project: Service_install, Configuration: Debug Win32 ------
1>Compiling...
1>Service_install.cpp
1>Linking...
1>Service_install.obj : error LNK2019: unresolved external symbol __imp__StartServiceCtrlDispatcherA@4 referenced in function _main
1>Service_install.obj : error LNK2019: unresolved external symbol "void __cdecl MyServiceStart(unsigned long,char * *)" (?MyServiceStart@@YAXKPAPAD@Z) referenced in function _main
1>Service_install.obj : error LNK2019: unresolved external symbol __imp__wsprintfA referenced in function "void __cdecl SvcDebugOut(char *,unsigned long)" (?SvcDebugOut@@YAXPADK@Z)
1>N:\Visual Studio 2005\Projects\Service_install\Debug\Service_install.exe : fatal error LNK1120: 3 unresolved externals
1>Build log was saved at "file://n:\Visual Studio 2005\Projects\Service_install\Service_install\Debug\BuildLog.htm"
1>Service_install - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========