Click here to Skip to main content
15,896,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionActiveX spreadsheet component Pin
sims9741-Mar-10 10:37
sims9741-Mar-10 10:37 
QuestionInvalid access to memory location - in WriteFile - writting to COM port. [modified] Pin
Vaclav_1-Mar-10 7:09
Vaclav_1-Mar-10 7:09 
AnswerRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Avi Berger1-Mar-10 7:43
Avi Berger1-Mar-10 7:43 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Vaclav_1-Mar-10 10:37
Vaclav_1-Mar-10 10:37 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
David Crow1-Mar-10 15:26
David Crow1-Mar-10 15:26 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Vaclav_1-Mar-10 17:05
Vaclav_1-Mar-10 17:05 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Avi Berger1-Mar-10 18:03
Avi Berger1-Mar-10 18:03 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Vaclav_1-Mar-10 18:21
Vaclav_1-Mar-10 18:21 
Avi,
do not apologize, I think you just give me an idea what is going on.

I know it sound crazy, but during troubleshooting this mess I just changed the data to NULL and left the rest intact - just like this:

lResult = WriteFile(m_hFile, NULL /*&pData*/ , iLen, pdwWritten,lpOverlapped);

I know it is a mess , I just keep jumping from one code to another.
Anyway, I think I need to look at the "persistence" of things, as you pointed out. I did noticed that the pdwWritten does not get immediately filled when the WriteFile returns (with correct data of course). Only after the WaitFor... event is done.
And that is the way it should work.

My priority is now on the missing ERROR_IO_PENDING "error " message.
I do not have correct setup between CreateFile and OVERLLAPED structure and even when WriteFile fails ( with 0 return) I get "Operation completed sucessfully" in GetLastError.
The irony of it is - I should be happy, but I am stubborn and want to see ERROR_IO_PENDING.

Good night
Vaclav
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
Iain Clarke, Warrior Programmer2-Mar-10 6:50
Iain Clarke, Warrior Programmer2-Mar-10 6:50 
GeneralRe: Invalid access to memory location - in WriteFile - writting to COM posrt. Pin
David Crow2-Mar-10 3:42
David Crow2-Mar-10 3:42 
QuestionWrapping toolbar label text Pin
David Ferreira1-Mar-10 2:43
David Ferreira1-Mar-10 2:43 
QuestionStrange Issue Pin
john563228-Feb-10 23:35
john563228-Feb-10 23:35 
AnswerRe: Strange Issue Pin
john56321-Mar-10 0:35
john56321-Mar-10 0:35 
AnswerRe: Strange Issue Pin
Code-o-mat1-Mar-10 1:47
Code-o-mat1-Mar-10 1:47 
GeneralRe: Strange Issue Pin
john56321-Mar-10 2:06
john56321-Mar-10 2:06 
GeneralRe: Strange Issue Pin
Code-o-mat1-Mar-10 2:51
Code-o-mat1-Mar-10 2:51 
QuestionAES 128bit encryption using CryptoAPI Pin
Varghese Paul M28-Feb-10 22:13
Varghese Paul M28-Feb-10 22:13 
AnswerRe: AES 128bit encryption using CryptoAPI Pin
Richard MacCutchan28-Feb-10 23:52
mveRichard MacCutchan28-Feb-10 23:52 
GeneralRe: AES 128bit encryption using CryptoAPI Pin
Rajesh R Subramanian1-Mar-10 6:25
professionalRajesh R Subramanian1-Mar-10 6:25 
GeneralRe: AES 128bit encryption using CryptoAPI Pin
Richard MacCutchan1-Mar-10 6:33
mveRichard MacCutchan1-Mar-10 6:33 
QuestionHow to create a form or dailog in MFC-MDI ? Pin
Patrick Tang28-Feb-10 21:31
Patrick Tang28-Feb-10 21:31 
AnswerRe: How to create a form or dailog in MFC-MDI ? Pin
CPallini28-Feb-10 21:40
mveCPallini28-Feb-10 21:40 
AnswerRe: How to create a form or dailog in MFC-MDI ? Pin
Patrick Tang28-Feb-10 22:23
Patrick Tang28-Feb-10 22:23 
GeneralRe: How to create a form or dailog in MFC-MDI ? Pin
Eugen Podsypalnikov28-Feb-10 22:43
Eugen Podsypalnikov28-Feb-10 22:43 
QuestionRe: How to create a form or dailog in MFC-MDI ? Pin
David Crow1-Mar-10 3:14
David Crow1-Mar-10 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.