Ver Mensaje Individual
  #17  
Antiguo 05-06-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.561
Reputación: 25
egostar Va camino a la fama
Cita:
Empezado por dec
Hola,

De ahí parto Román... o es la intención: como "ShFileOperation" retorna "no cero"... busco el error con "GetLastError", pero, no parece estar ahí.
Según Microsoft no debes de usar "GetLastError" para esta función

Cita:
Empezado por msdn2.microsoft.com
Return Value


Returns zero if successful; otherwise nonzero. Applications normally should simply check for zero or nonzero.

It is good practice to examine the value of the fAnyOperationsAborted member of the SHFILEOPSTRUCT. SHFileOperation can return 0 for success if the user cancels the operation. If you do not check fAnyOperationsAborted as well as the return value, you cannot know that the function accomplished the full task you asked of it and you might proceed under incorrect assumptions.


Do not use GetLastError with the return values of this function.
Aquí el artículo completo.

Salud OS.
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita