Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1381 connectés 

 


 Mot :   Pseudo :  
 
 Page :   1  2
Page Suivante
Auteur Sujet :

[c++] sauvegarder code source IE dans un fichier...

n°521242
Konar
Posté le 23-09-2003 à 13:48:31  profilanswer
 

Reprise du message précédent :

husiana a écrit :

vi, je fais du C/UNIX, pas du C++/windows :-/!
 
merci


 
toi t'es dans un bahut de merde.

mood
Publicité
Posté le 23-09-2003 à 13:48:31  profilanswer
 

n°521246
husiana
Posté le 23-09-2003 à 13:49:44  profilanswer
 

ohhh que non :P


---------------
http://husiana.myftp.org/phpsysinfo
n°521318
husiana
Posté le 23-09-2003 à 14:08:16  profilanswer
 

Code :
  1. if (bRet == FALSE)
  2.  {
  3.   dwErr = GetLastError();
  4.   fichier_sortie << ">>>>>> " << dwErr << " <<<<<<\n";
  5.   MessageBox(Dlg,"buff pourit","42", MB_OK);
  6.  }


 

Citation :

This function returns the calling threads last-error code value. A remote application interface (RAPI) version of this function exists, and it is named CeGetLastError.
 
DWORD GetLastError( void );
 
Return Values
 
The calling threads last-error code value indicates success. Functions set this value by calling the SetLastError function. The Return Value section of each reference page notes the conditions under which the function sets the last-error code.
 
Remarks
 
You should call the GetLastError function immediately when a functions return value indicates that such a call will return useful data. That is because some functions call SetLastError(0) when they succeed, wiping out the error code set by the most recently failed function.
 
Most functions in the Win32 API that set the threads last error code value set it when they fail; a few functions set it when they succeed. Function failure is typically indicated by a return value error code such as FALSE, NULL, 0xFFFFFFFF, or ?1. Some functions call SetLastError under conditions of success; those cases are noted in each functions reference page.
 
Error codes are 32-bit values (bit 31 is the most significant bit). Bit 29 is reserved for application-defined error codes; no system error code has this bit set. If you are defining an error code for your application, set this bit to one. That indicates that the error code has been defined by an application, and ensures that your error code does not conflict with any error codes defined by the system.
 
To obtain an error string for system error codes, use the FormatMessage function. For a complete list of error codes, see Error Values or the SDK header file WINERROR.H.


 
et moi il me renvoie 6 ! je comprends pas, normalement c'est que c'est bon mais il passe dans ma boucle comme quoi c'est FALSE...
 
vous trouvez ca normal?


---------------
http://husiana.myftp.org/phpsysinfo
n°521340
Konar
Posté le 23-09-2003 à 14:19:40  profilanswer
 

6 : The handle is invalid.
 
t'as bien viré le InternetCloseHandle() de trop ? (celui juste avant le InternetReadFile(), pasque s'il est encore la, ben ca m'etonne pas ke le handle soit invalide)

n°521346
husiana
Posté le 23-09-2003 à 14:22:33  profilanswer
 

Code :
  1. hInternet = ::InternetOpen("BOB", INTERNET_OPEN_TYPE_PRECONFIG , NULL, NULL, 0);
  2.  if(!hInternet)
  3.    MessageBox(Dlg,"Internet open error! Test your system and try again.","42",MB_OK | MB_ICONERROR);
  4.   hHttp = ::InternetOpenUrl(hInternet, "http://www.tomshardware.fr/", NULL, NULL, INTERNET_FLAG_RELOAD, Context);
  5.  if(!hHttp)
  6.   MessageBox(Dlg,"URL open error!","42", MB_OK | MB_ICONERROR );
  7.  if(hInternet)
  8.   InternetCloseHandle(hInternet);
  9.  bRet = ::InternetReadFile(hHttp, buff, 1024, &dwRead);
  10.  if(hInternet)
  11.   InternetCloseHandle(hInternet);
  12.  if (bRet == FALSE)
  13.  {
  14.   dwErr = GetLastError();
  15.   fichier_sortie << ">>>>>> " << dwErr << " <<<<<<\n";
  16.   MessageBox(Dlg,"buff pourit","42", MB_OK);
  17.  }


 
ouais, il est "bien" viré...

n°521353
husiana
Posté le 23-09-2003 à 14:26:51  profilanswer
 

erf le boulet, j'ai trouvé!
 
j'en avais laissé un au milieu du code  :fou:  
juste avant le read file...regarde tu va voir...
j'en ai marre de ces erreur d'attention! Grrr! boulet ambulant detected!
 
merci a tous!
 
bonne journée!
 


---------------
http://husiana.myftp.org/phpsysinfo
mood
Publicité
Posté le   profilanswer
 

 Page :   1  2
Page Suivante

Aller à :
Ajouter une réponse
 

Sujets relatifs
Optimisation d'un code en java (JTextArea>codage>JTextArea)Afficher la source du menu suivant:
graph + fichier [résolu]Imprimer ou copier/coller du code avec les COULEURS
lecture ligne a ligne d'un gros fichier texteEditeur fichier PHP pour modif fichier d'un forum
mime_content_type, recup extention d'un fichier[résolu]Problème de compatibilité IE sur un bout de code
[FLASH] pas urgent -- votre sharedobject et php. et fichier txt.[Win32]Comment retrouver l'icône associée à une extension de fichier ?
Plus de sujets relatifs à : [c++] sauvegarder code source IE dans un fichier...


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR