[C/C++] ShellApi.h !!!

ShellApi.h !!! [C/C++] - C++ - Programmation

Marsh Posté le 20-04-2002 à 16:22:01    

J'aimerai pouvoir lancé un éxecutable en c En cherchant sur le forum j'ai trouver ça:
 
#include "ShellApi.h"  
 
ShellExecute(this->Handle,"open","blabla.exe",0,0,SW_NORMAL);  
 
tout heureux que j'étais je fais un petit programme mais quand je le compile il me fait plein d'erreur sur le shellapi.h
 
Pour le plaisir je vous offre un extrait :
d:\c\DevStudio\VC\INCLUDE\ShellApi.h(33) : error C2065: 'HDROP' : undeclared identifier
d:\c\DevStudio\VC\INCLUDE\ShellApi.h(33) : error C2501: 'DECLARE_HANDLE' : missing decl-specifiers
d:\c\DevStudio\VC\INCLUDE\ShellApi.h(35) : error C2501: 'DECLSPEC_IMPORT' : missing decl-specifiers
d:\c\DevStudio\VC\INCLUDE\ShellApi.h(35) : error C2239: unexpected token 'identifier' following declaration of 'DECLSPEC_IMPORT'
d:\c\DevStudio\VC\INCLUDE\ShellApi.h(35) : error C2061: syntax error : identifier 'UINT'
 
Voila si kkun pouvait m'expliquer je serai de nouveau heureux
Merci

Reply

Marsh Posté le 20-04-2002 à 16:22:01   

Reply

Marsh Posté le 20-04-2002 à 16:27:23    

tu as essaye en prenant  windows.h ?
 
Les erreurs proviennent de type d'objet inconnu en mettant la librairie windows.h (pas besoin sellapi.h car elle est defini dans windows.h) les problèmes devraient disparaitre.

 

[jfdsdjhfuetppo]--Message édité par nico23--[/jfdsdjhfuetppo]

Reply

Marsh Posté le 20-04-2002 à 16:36:48    

ça marche mieux mais j'ai des erreurs  de link maintenant  :fou:

Reply

Marsh Posté le 20-04-2002 à 16:38:47    

Faut linker avec shell32.lib, il me semble.


---------------
"Dieu a exploité tous nos complexes d'infériorité, en commençant par notre incapacité de croire à notre propre divinité." - Emil Michel Cioran
Reply

Marsh Posté le 20-04-2002 à 16:40:57    

mais vc ne le fait pas tout seul? et si non comment on fait ?

 

[jfdsdjhfuetppo]--Message édité par 1234--[/jfdsdjhfuetppo]

Reply

Marsh Posté le 20-04-2002 à 17:03:46    

CCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA MAAAAAAAAARRRRRRRRCCCCCCCCHHHHEEEEEE
[:yaisse1]
 
Merci

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed