PORTS Forum

Ports and Interfaces => USB => Topic started by: sudocoda on July 18, 2012, 09:14:19 am

Title: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 18, 2012, 09:14:19 am
I managed to find a HID API on Github. I got it to recognize USB input. But I have no idea where to go from there.

I have three weeks to do this. I'm completely new USB programming. I'm kind of panicking at the moment even though I didn't really panic when I was completely new to web design and agreed to re-design my company's website (I didn't have a deadline though).

Do you have any resources to recommend that would enable me to learn and code this in 3 weeks? Would it be easier to use a language other than C++? Java or Python maybe? I've been feeling like waving the white flag and saying up front that I can't contribute to the project given the constraints, namely time left and the speed of my learning, but I still feel up to the challenge (maybe it's my ignorance as to how complicated this will be and if it's possible for me to learn and code this at the same time in 3 weeks).

Thank you very very much if you can help or have any advice.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 18, 2012, 09:46:39 am
I got HID API Test GUI to compile. That's a start. I feel like my progress has been hampered by not having something tangible to mark my progress.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 18, 2012, 10:56:41 am
Okay, now I just need to re-direct to COM output.

I'm trying to think in ...pseudocode...

#Include some RS232 or COM library
#Initialize x and y vars
    x = getInputReport(x)
    y = getInputRepotr(y)
#Initialize COM port object
#Store x and y vars into COM port object
#Output COM port

Am I thinking about this problem in the right way?
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: Jan Axelson on July 18, 2012, 12:23:11 pm
You have a HID-class device that attaches to a PC via USB, and the PC also has an RS-232 connection to another PC or device? And you want the PC to pass the HID data to the serial port?

If the above is correct, your idea can work.

If it's Windows, .NET is an option. See my HID and Serial Port pages for example code.

If it's Linux, see:

http://www.lvr.com/beagleboard.htm

(for embedded hosts but should also be useful for Linux PCs.)

Jan
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 19, 2012, 08:23:57 am
Correct. It will go from the serial port on the computer to a radio.

I'm stuck on figuring out how to parse the data into x and y variables to output as serial. Is there some sort of scanner or reader class for HID in C++? I'm using Visual Studio 2008.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: Jan Axelson on July 19, 2012, 10:23:05 am
My example code sends and receives generic (vendor-defined) data:

http://www.lvr.com/hidpage.htm#MyExampleCode

Jan
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 08:52:46 am
When I try to compile I get:

Code: [Select]
1>------ Build started: Project: usbhidioc, Configuration: Debug Win32 ------
1>Compiling...
1>StdAfx.cpp
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afx.h(18) : warning C4005: '_AFXDLL' : macro redefinition
1>        command-line arguments :  see previous definition of '_AFXDLL'
1> WINVER not defined. Defaulting to 0x0600 (Windows Vista)
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(141) : error C2146: syntax error : missing ';' before identifier 'HwndMSWheel'
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(141) : error C2433: 'HWND' : 'inline' not permitted on data declarations
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(141) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(142) : error C2065: 'PUINT' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(142) : error C2146: syntax error : missing ')' before identifier 'puiMsh_MsgMouseWheel'
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(142) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(147) : error C2059: syntax error : ')'
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(148) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft sdks\windows\v7.0\include\zmouse.h(148) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\microsoft sdks\windows\v7.0\include\prsht.h(97) : error C2065: 'CALLBACK' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v7.0\include\prsht.h(97) : error C2065: 'LPFNPSPCALLBACKA' : undeclared identifier
1>c:\program files\microsoft sdks\windows\v7.0\include\prsht.h(97) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\microsoft sdks\windows\v7.0\include\prsht.h(97) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 9.00.21022
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>BSCMAKE: error BK1506 : cannot open file '.\Debug\usbhidioc.sbr': No such file or directory
1>Build log was saved at "file://c:\Users\mcs\cpp\usbhidio_vc6\Debug\BuildLog.htm"
1>usbhidioc - 14 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 09:43:15 am
In my C/C++ General I'm including "C:\WinDDK\7600.16385.1\inc";"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include".

In my Linker General I have ".\Debug/usbhidioc.exe" as the output file.

For my Linker Additional Dependencies I have "hid.lib setupapi.lib".

Thank you very much for any help in advance.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 10:28:36 am
Okay, down to:

Code: [Select]
1>c:\users\mcs\cpp\usbhidio_vc6\usbhidioc.cpp(66) : warning C4996: 'CWinApp::Enable3dControls': CWinApp::Enable3dControls is no longer needed. You should remove this call.
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afxwin.h(4825) : see declaration of 'CWinApp::Enable3dControls'
1>usbhidiocDlg.cpp
1>c:\users\mcs\cpp\usbhidio_vc6\usbhidiocdlg.cpp(1371) : error C3861: 'HidD_GetInputReport': identifier not found
1>c:\users\mcs\cpp\usbhidio_vc6\usbhidiocdlg.cpp(1704) : error C3861: 'HidD_SetOutputReport': identifier not found

I got rid of the compile errors related to hidpi.h, hidsdi.h, and hidusage.h. I hope I have the right source files for them.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: Jan Axelson on July 25, 2012, 02:43:41 pm
See:

http://www.cygnal.org/ubb/Forum4/HTML/000860.html

Jan
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 03:02:30 pm
Okay, I was thinking I could just use the 7600.16385.1 DDK, but I need that specific one, don't I?
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 03:07:23 pm
Never mind, found the right directories in my DDK also.
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 03:14:43 pm
Code: [Select]
>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(41) : error C2146: syntax error : missing ';' before identifier 'fpos_t'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(41) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(42) : error C2143: syntax error : missing ';' before 'const'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(42) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(42) : error C2734: 'std::_BADOFF' : const object must be initialized if not extern
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C2144: syntax error : 'int' should be preceded by ';'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(295) : see reference to class template instantiation 'std::char_traits<_Elem>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : error C2061: syntax error : identifier '_Elem'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(208) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(209) : error C2143: syntax error : missing ')' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(209) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(212) : warning C4183: 'copy': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(214) : error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(214) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(214) : error C2086: 'int std::char_traits<_Elem>::_Elem' : redefinition
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : see declaration of 'std::char_traits<_Elem>::_Elem'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(214) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(214) : error C2061: syntax error : identifier '_Elem'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(215) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(216) : error C2143: syntax error : missing ')' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(216) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(224) : warning C4183: '_Copy_s': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(226) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(226) : error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(226) : error C2373: 'std::char_traits<_Elem>::_Elem' : redefinition; different type modifiers
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(207) : see declaration of 'std::char_traits<_Elem>::_Elem'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(226) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(226) : error C2143: syntax error : missing ',' before '*'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(228) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(234) : warning C4183: 'find': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(237) : error C2144: syntax error : 'int' should be preceded by ';'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(237) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(237) : error C2143: syntax error : missing ';' before '*'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\iosfwd(237) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 25, 2012, 04:26:58 pm
Code: [Select]
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\afx.h(18) : warning C4005: '_AFXDLL' : macro redefinition
1>        command-line arguments :  see previous definition of '_AFXDLL'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2065: '_S1max' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2065: '_N' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C3861: '_Out_bytecap_post_bytecount_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2144: syntax error : 'void' should be preceded by ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2448: 'memcpy_s' : function-style initializer appears to be a function definition
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2146: syntax error : missing ';' before identifier 'size_t'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2065: '_N' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2143: syntax error : missing ';' before 'const'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2059: syntax error : 'const'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlalloc.h(227) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(112) : error C2065: '_Inout_' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(112) : error C2146: syntax error : missing ')' before identifier '_Deref_post_opt_cap_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(112) : error C2182: 'AtlConvAllocMemory' : illegal use of type 'void'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(112) : error C2433: 'AtlConvAllocMemory' : 'inline' not permitted on data declarations
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(112) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(155) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(155) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(174) : error C2061: syntax error : identifier '_In_opt_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(217) : see reference to class template instantiation 'ATL::CW2WEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(179) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(179) : error C2535: 'ATL::CW2WEX<t_nBufferLength>::CW2WEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(174) : see declaration of 'ATL::CW2WEX<t_nBufferLength>::CW2WEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(197) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(224) : error C2061: syntax error : identifier '_In_opt_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(266) : see reference to class template instantiation 'ATL::CA2AEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(229) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(229) : error C2535: 'ATL::CA2AEX<t_nBufferLength>::CA2AEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(224) : see declaration of 'ATL::CA2AEX<t_nBufferLength>::CA2AEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(247) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(273) : error C2061: syntax error : identifier '_In_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(297) : see reference to class template instantiation 'ATL::CA2CAEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(277) : error C2061: syntax error : identifier '_In_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(277) : error C2535: 'ATL::CA2CAEX<t_nBufferLength>::CA2CAEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(273) : see declaration of 'ATL::CA2CAEX<t_nBufferLength>::CA2CAEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(304) : error C2061: syntax error : identifier '_In_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(328) : see reference to class template instantiation 'ATL::CW2CWEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(308) : error C2061: syntax error : identifier '_In_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(308) : error C2535: 'ATL::CW2CWEX<t_nBufferLength>::CW2CWEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(304) : see declaration of 'ATL::CW2CWEX<t_nBufferLength>::CW2CWEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(335) : error C2061: syntax error : identifier '_In_opt_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(391) : see reference to class template instantiation 'ATL::CA2WEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(340) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(340) : error C2535: 'ATL::CA2WEX<t_nBufferLength>::CA2WEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(335) : see declaration of 'ATL::CA2WEX<t_nBufferLength>::CA2WEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(356) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(398) : error C2061: syntax error : identifier '_In_opt_'
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(454) : see reference to class template instantiation 'ATL::CW2AEX<t_nBufferLength>' being compiled
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(403) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(403) : error C2535: 'ATL::CW2AEX<t_nBufferLength>::CW2AEX(void) throw(...)' : member function already defined or declared
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(398) : see declaration of 'ATL::CW2AEX<t_nBufferLength>::CW2AEX'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(419) : error C2061: syntax error : identifier '_In_opt_'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2065: '_Inout_' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2146: syntax error : missing ')' before identifier 'LPDEVMODEA'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2495: 'AtlDevModeW2A' : '__declspec(nothrow)' can only be applied to function declarations or definitions
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(530) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2143: syntax error : missing ';' before '__stdcall'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C3861: '_Out_z_cap_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2146: syntax error : missing ')' before identifier 'LPWSTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(536) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2143: syntax error : missing ';' before '__stdcall'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C3861: '_Out_z_cap_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2146: syntax error : missing ')' before identifier 'LPSTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(555) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2143: syntax error : missing ';' before '__stdcall'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C3861: '_Out_z_cap_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2146: syntax error : missing ')' before identifier 'LPWSTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2374: 'AtlA2WHelper' : redefinition; multiple initialization
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(535) : see declaration of 'AtlA2WHelper'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(572) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(573) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2448: '_Ret_opt_z_cap_' : function-style initializer appears to be a function definition
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2143: syntax error : missing ';' before '__stdcall'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2065: 'nChars' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C3861: '_Out_z_cap_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2146: syntax error : missing ')' before identifier 'LPSTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2374: 'AtlW2AHelper' : redefinition; multiple initialization
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(554) : see declaration of 'AtlW2AHelper'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(577) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(578) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2065: '_In_z_' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2146: syntax error : missing ')' before identifier 'LPCOLESTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2433: 'ocslen' : 'inline' not permitted on data declarations
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(689) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(691) : error C2065: 'maxSize' : undeclared identifier
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(691) : error C3861: '_Out_z_cap_': identifier not found
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(691) : error C2146: syntax error : missing ')' before identifier 'LPOLESTR'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(691) : error C2433: 'ocscpy_s' : 'inline' not permitted on data declarations
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(691) : error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(692) : error C2143: syntax error : missing ';' before '{'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\atlmfc\include\atlconv.h(692) : error C2447: '{' : missing function header (old-style formal list?)
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: Jan Axelson on July 25, 2012, 05:46:24 pm
This might help:

http://social.msdn.microsoft.com/Forums/en/vcgeneral/thread/0311e02f-daf0-4865-9f09-5d8740d61710

or search the web on the first error you get. That's how I found the post above.

Jan
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 26, 2012, 11:09:14 am
I feel like I have to uninstall everything VS related and install again. I'm always going to be wondering if my errors are caused by having VS 2012 RC installed previously  :-\
Title: Re: Program that reads, parses USB, then outputs RS232. Feeling lost and frustrated.
Post by: sudocoda on July 26, 2012, 11:10:16 am
I'll try harder.

I think I have to uninstall everything VS related. I'm always going to be wondering if my errors are caused by having VS 2012 RC installed before, and I don't remember what was included in which version  :-\