Bonjour,

J'ai une erreur après compilation du code suivant :

ERREUR : [Warning] `__stdcall__' attribute only applies to function types

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 
 
#include <windows.h>
#include <Winbase.h>
#include <stdio.h>
#include <stdlib.h>
 
int main (void)
{
 
    FILE *STREAM=fopen("out.txt","w");
 
    UINT WINAPI ReturnedCode = ReturnedCode=GetDriveType( "E:\\" );
 
    switch ( ReturnedCode )
           {
 
                 case DRIVE_UNKNOWN    :
                                             fprintf( STREAM, "The drive type cannot be determined." );
                                             break; 
 
                 case DRIVE_NO_ROOT_DIR:
                                              fprintf( STREAM, "The root path is invalid; for example, there is no volume mounted at the specified path." );
                                              break; 
 
                 case DRIVE_REMOVABLE  :
                                              fprintf( STREAM, "The drive has removable media; for example, a floppy drive, thumb drive, or flash card reader." );
                                              break; 
 
                 case DRIVE_FIXED      :
                                              fprintf( STREAM, "The drive has fixed media; for example, a hard drive or flash drive." );
                                              break; 
 
                 case DRIVE_REMOTE     :
                                              fprintf( STREAM, "The drive is a remote (network) drive." );
                                              break; 
 
                 case DRIVE_CDROM      :
                                              fprintf( STREAM, "The drive is a CD-ROM drive." );
                                              break; 
 
                 case DRIVE_RAMDISK    :
                                              fprintf( STREAM, "The drive is a RAM disk." );
                                              break; 
 
                 default               :
                                              fprintf( STREAM, "Unexpected error" );
                                              break; 
 
         }
 
}
Lien msdn de la fonction : http://msdn.microsoft.com/en-us/libr...39(VS.85).aspx

Merci d'avance.