Click here to Skip to main content
15,881,413 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can generate service from exe? Pin
Le@rner16-Jan-10 0:43
Le@rner16-Jan-10 0:43 
GeneralRe: How can generate service from exe? Pin
JudyL_MD16-Jan-10 2:55
JudyL_MD16-Jan-10 2:55 
AnswerRe: How can generate service from exe? Pin
loyal ginger16-Jan-10 2:28
loyal ginger16-Jan-10 2:28 
QuestionCButton GetState , how to read the press and hold state of a button? Pin
timbk15-Jan-10 11:45
timbk15-Jan-10 11:45 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Hamid_RT15-Jan-10 20:26
Hamid_RT15-Jan-10 20:26 
GeneralRe: CButton GetState , how to read the press and hold state of a button? Pin
timbk16-Jan-10 11:18
timbk16-Jan-10 11:18 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Rozis16-Jan-10 10:17
Rozis16-Jan-10 10:17 
Questionsystem call too small Pin
2buck5615-Jan-10 10:36
2buck5615-Jan-10 10:36 
I have an application I am trying to move from VC6++ to VC++ 2008. It is an MFC application based on Jan Axelson's USB code.

The application that was built with VC6 runs fine with no problems or errors. I am upgrading it to VC++ 2008 a couple of functions at a time. When I run my VC++ 2008 application I see the following messages:

Endpoint 0 found The data area passed to a system call is too small
HidD_GetAttributes: The data area passed to a system call is too small
Master Cell PIC24 found
CreateFile: The data area passed to a system call is too small
Handle to Endpoint Out found

The message identifiers (Endpoint 0, HidD_GetAttributes, CreateFile:, Handle) are messages that I created. However, the message "The data area passed to a system call is too small" is coming from a system call to GetLastError.

I do not get the warning messages with the VC6++ version of the application. The 2008 version appears to be connecting to my USB device (I will know for sure after I add a few more functions) and it runs with no errors. However I am concerned about the too small warning.

Here is one of the calls that gives me the message:
DeviceHandle=CreateFile
    (detailData->DevicePath,
    0,
    FILE_SHARE_READ|FILE_SHARE_WRITE,
    (LPSECURITY_ATTRIBUTES)NULL,
    OPEN_EXISTING,
    0,
    NULL);

if(!DeviceHandle)
{
    DisplayLastError((CString)"Endpoint 0 not found");
}
else
{
    DisplayLastError((CString)"Endpoint 0 found");
}


As you can see by the "Endpoint 0 found" message in the list of messages, the CreateFile call finds the handle to the device. However, DisplayLastError returns the "too small" warning. The function DisplayLastError performs a system call to GetLastError and does some other small tasks.

Does anyone know what I must do to eliminate the message from GetLastError?
AnswerRe: system call too small Pin
CPallini15-Jan-10 10:44
mveCPallini15-Jan-10 10:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 11:36
2buck5615-Jan-10 11:36 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 11:44
LunaticFringe15-Jan-10 11:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 12:26
2buck5615-Jan-10 12:26 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 12:49
professionalGarth J Lancaster15-Jan-10 12:49 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 13:01
LunaticFringe15-Jan-10 13:01 
GeneralRe: system call too small Pin
2buck5615-Jan-10 13:51
2buck5615-Jan-10 13:51 
GeneralRe: system call too small [modified] Pin
LunaticFringe15-Jan-10 14:31
LunaticFringe15-Jan-10 14:31 
GeneralRe: system call too small Pin
2buck5615-Jan-10 15:02
2buck5615-Jan-10 15:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:02
mveCPallini15-Jan-10 22:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:11
mveCPallini15-Jan-10 22:11 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 22:41
professionalGarth J Lancaster15-Jan-10 22:41 
GeneralRe: system call too small Pin
CPallini15-Jan-10 22:43
mveCPallini15-Jan-10 22:43 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 22:59
professionalGarth J Lancaster15-Jan-10 22:59 
GeneralRe: system call too small Pin
CPallini15-Jan-10 23:10
mveCPallini15-Jan-10 23:10 
GeneralRe: system call too small Pin
Bram van Kampen17-Jan-10 6:18
Bram van Kampen17-Jan-10 6:18 
AnswerRe: system call too small Pin
Richard MacCutchan15-Jan-10 23:55
mveRichard MacCutchan15-Jan-10 23:55 

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.