I mean when the text inside a txt is `12345`, then output in the editbox is `12345;/~/`
so my ask is what is wrong here in this code
.data NamePathBuffer db 265 dup (0) .data? hFile DWORD ? ------- Open_File Proc hWin:DWORD, id_edit:UINT, buf:DWORD, buf_size:DWORD ,nFileSize : DWORD,hMem :DWORD invoke RtlZeroMemory, Addr buf, SIZEOF buf invoke RtlZeroMemory, Addr hMem, SIZEOF hMem invoke RtlZeroMemory, Addr hFile, SIZEOF hFile invoke RtlZeroMemory, Addr nFileSize, SIZEOF nFileSize invoke RtlZeroMemory, Addr NamePathBuffer, SIZEOF NamePathBuffer invoke RtlZeroMemory, Addr buf_size, SIZEOF buf_size invoke GetOpenFileName, Offset OFNstruc .if eax== TRUE invoke CreateFile, addr NamePathBuffer,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,NULL,NULL .if eax == -1 Call GetLastError .if eax == ERROR_FILE_NOT_FOUND invoke MessageBox, NULL, Addr Message, Addr Message, MB_OK .elseif eax == ERROR_ACCESS_DENIED invoke MessageBox, NULL, Addr Message2, Addr Message2, MB_OK .endif .endif mov hFile,eax invoke GetFileSize, hFile, NULL mov nFileSize, eax invoke GlobalAlloc,GPTR, nFileSize mov hMem,eax push NULL mov eax,esp invoke ReadFile,hFile,hMem,nFileSize,eax, NULL pop eax invoke CloseHandle,hFile invoke SetDlgItemText, hWin,id_edit, hMem invoke GlobalFree, hMem .endif invoke RtlZeroMemory, Addr buf, SIZEOF buf ret Open_File endp
This post has been edited by Latias: 11 October 2012 - 11:47 PM

New Topic/Question
Reply



MultiQuote






|