I NEED SOMEBODY HELP

lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003 - 13 janv. 2003 à 11:23
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 - 13 janv. 2003 à 15:18
Mon programme coupe des fichiers en part egales puis les recompose dans un 2eme temps.

Un peu comme les compresseurs type RZsplit Winrar...

A la compilation j'ai 0 erreurs 0 warnings MAIS une erreur bloque l'execution en me mettant un message :

------------------------------------------------------------------
Microsoft Visual C++ Debug library
Program: C:\decoupage.exe
File:filecore.cpp
line:258
For information on how your program can cause an assertion failure, see the visual c++ doc on asserts.

ABANDONNER RECOMMENCER IGNORER
-------------------------------------------------------------------

filecore.cpp ligne 258

LONG CFile::Seek(LONG lOff, UINT nFrom)
{
ASSERT_VALID(this);

258--> ASSERT(m_hFile != (UINT)hFileNull); //ligne 258
ASSERT(nFrom begin || nFrom end || nFrom == current);ASSERT(begin FILE_BEGIN && end FILE_END && current == FILE_CURRENT);

DWORD dwNew = ::SetFilePointer((HANDLE)m_hFile, lOff, NULL, (DWORD)nFrom);
if (dwNew == (DWORD)-1)
CFileException::ThrowOsError((LONG)::GetLastError());

return dwNew;
}

Toute aide sera la bienvenue. Merci d'avance!

12 réponses

cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 12:18
La méthode Seek() teste par la ligne ASSERT(m_hFile != (UINT)hFileNull) si un fichier est attaché à l'objet courant.
Dans ton cas, c'est non. As-tu spécifié un fichier ? Est-il ouvert ?
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 12:35
Normalement oui! avec la commande

Fichier.Open(Nomfichier,CFile::modeCreate|CFile::modeRead|CFile::modeWrite);

dans le file.cpp de ma Cfile

je passe en parametre Nomfichier ="c:\totototo" dans mon main
donc normalement ca devrait ouvrir le fichier ,et le creer si il est inexistant.

Merci de ton aide...
0
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 12:39
Peut-être que "c:\\totototo" serait plus adapté comme paramètre en nom de fichier.
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 12:48
En effet, merci beaucoup!

Putain! maintenant il veut meme plus compiler ...

Compiling...
main.cpp
Linking...
LINK : fatal error LNK1168: cannot open Debug/decoupe.exe for writing
Error executing link.exe.

alors qu'il existe Debug/decoupe.exe
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 12:50
Tu as une instance de ton programme qui est en cours d'exécution. Fermes-la et tu verras que la compil' se passera beaucoup mieux.
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 14:33
Merci kaid
Et comme t'a l'air d'en etre un (en c).
tu saurais pas ce que c'est que ce message, stp:

Ms Visual c++ - Debug library

Debug error!
program: c:\decoupe.exe
abnormal program termination
Press retry to debug

il apparait pendant l'execution.

je fait retry:

Loaded symbols for 'C:\decoupe.exe'
Loaded 'C:\WINDOWS\system32\ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msctf.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msctfime.ime', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msimtf.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\apphelp.dll', no matching symbolic information found.
The thread 0x340 has exited with code 0 (0x0).
The thread 0x1A4 has exited with code -2147483645 (0x80000003).
The program 'C:\cyril\Decoupage\decoupe\Debug\decoupe.exe' has exited with code -2147483645 (0x80000003).
0
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 14:36
Ben tu lances le programme sous le debugger de Visual C++ et normallement il devrait se placer sur la ligne de code qui le fait planter.
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 14:44
euuuh oui
la ligne c'est:
0040D753 int 3

Mais ca m'aide pas beaucoup, je debute alors le debuggeur..
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 14:45
0040D74B add esp,14h
0040D74E cmp eax,1
0040D751 jne _NMSG_WRITE+74h (0040d754)
-->0040D753 int 3
0040D754 cmp dword ptr [___error_mode (00532b44)],1
0040D75B je _NMSG_WRITE+8Fh (0040d76f)

C de l'assembleur je crois, j'y connais rien
0
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 14:48
Quand tu es quand l'assembleur, fais un click droit et il y a dans le menu quelque chose comme "View code".
0
lerilcy Messages postés 23 Date d'inscription mardi 7 janvier 2003 Statut Membre Dernière intervention 18 février 2003
13 janv. 2003 à 14:58
ouais j'ai "go to source"

Mais ca fait rien qd j'y clique!

et au lancement du debuggeur il me demande un fichier que je n'est pas : crt0msg.c
je fé cancel et c bon.c grave?.
0
cs_Kaid Messages postés 949 Date d'inscription mardi 2 octobre 2001 Statut Membre Dernière intervention 8 juillet 2006 1
13 janv. 2003 à 15:18
Bon avec ca, ca devrait marcher :
Quand ton erreur se produit et que tu te retrouves dans le debbugueur, il y a en bas une fenêtre où il y a écrit "Context" suivie d'une liste déroulante. Tu choisis dans cette liste la première référence à ton programme (la fonction que tu as écris) et normallement tu te trouves sur la ligne où se trouve le problème. Au besoin,"Go to source" si tu es dans le l'asm.
0
Rejoignez-nous