Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Serial.cpp for 64bit
Re: Serial.cpp for 64bit [message #37151 is a reply to message #37139] Fri, 31 August 2012 06:27 Go to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
First step.

After time searching found this:
http://stackoverflow.com/questions/3783842/converting-a-stri ng-to-lpcwstr-for-createfile-to-address-a-serial-port

With that example this portion of the code works OK on Win7 64bit in U++.
	    std::wstring comID = L"\\\\.\\COM11";
	    HANDLE hSerial;
	    hSerial = CreateFileW(comID.c_str(),
		GENERIC_READ | GENERIC_WRITE,
                ...


using namespace System::IO::Ports; is not required

I don't know about c_str(), LPCWSTR, or value (pointer to const wchar_t). There may be an easier way if/when included in U++.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DropList events
Next Topic: uppsrc/web directory
Goto Forum:
  


Current Time: Fri Jul 18 11:49:45 CEST 2025

Total time taken to generate the page: 0.04730 seconds