Click here to Skip to main content
15,846,860 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How can generate service from exe? Pin
Le@rner16-Jan-10 1:43
Le@rner16-Jan-10 1:43 
GeneralRe: How can generate service from exe? Pin
JudyL_MD16-Jan-10 3:55
JudyL_MD16-Jan-10 3:55 
AnswerRe: How can generate service from exe? Pin
loyal ginger16-Jan-10 3:28
loyal ginger16-Jan-10 3:28 
QuestionCButton GetState , how to read the press and hold state of a button? Pin
timbk15-Jan-10 12:45
timbk15-Jan-10 12:45 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Hamid_RT15-Jan-10 21:26
Hamid_RT15-Jan-10 21:26 
GeneralRe: CButton GetState , how to read the press and hold state of a button? Pin
timbk16-Jan-10 12:18
timbk16-Jan-10 12:18 
AnswerRe: CButton GetState , how to read the press and hold state of a button? Pin
Rozis16-Jan-10 11:17
Rozis16-Jan-10 11:17 
Questionsystem call too small Pin
2buck5615-Jan-10 11:36
2buck5615-Jan-10 11: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 11:44
mveCPallini15-Jan-10 11:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 12:36
2buck5615-Jan-10 12:36 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 12:44
LunaticFringe15-Jan-10 12:44 
GeneralRe: system call too small Pin
2buck5615-Jan-10 13:26
2buck5615-Jan-10 13:26 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 13:49
professionalGarth J Lancaster15-Jan-10 13:49 
GeneralRe: system call too small Pin
LunaticFringe15-Jan-10 14:01
LunaticFringe15-Jan-10 14:01 
GeneralRe: system call too small Pin
2buck5615-Jan-10 14:51
2buck5615-Jan-10 14:51 
GeneralRe: system call too small [modified] Pin
LunaticFringe15-Jan-10 15:31
LunaticFringe15-Jan-10 15:31 
GeneralRe: system call too small Pin
2buck5615-Jan-10 16:02
2buck5615-Jan-10 16:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 23:02
mveCPallini15-Jan-10 23:02 
GeneralRe: system call too small Pin
CPallini15-Jan-10 23:11
mveCPallini15-Jan-10 23:11 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 23:41
professionalGarth J Lancaster15-Jan-10 23:41 
GeneralRe: system call too small Pin
CPallini15-Jan-10 23:43
mveCPallini15-Jan-10 23:43 
GeneralRe: system call too small Pin
Garth J Lancaster15-Jan-10 23:59
professionalGarth J Lancaster15-Jan-10 23:59 
GeneralRe: system call too small Pin
CPallini16-Jan-10 0:10
mveCPallini16-Jan-10 0:10 
GeneralRe: system call too small Pin
Bram van Kampen17-Jan-10 7:18
Bram van Kampen17-Jan-10 7:18 
AnswerRe: system call too small Pin
Richard MacCutchan16-Jan-10 0:55
mveRichard MacCutchan16-Jan-10 0: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.