|
it is the "vertical bar" twice, on my QWERTY keyboard vertical bar is on the backslash key.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
try this.
Assuming windows XP.
Start->RUN->Type "charmap" select font "arial" you will find "|" pipe character in 5th row, 11th column, then you can select that character and copy to clipboard.
or Start->All Programs->Accessories->System Tools-> "Character map" in general on other OS.
HTH
|
|
|
|
|
i have made a simple hardware interface consisting of an ADC and am trying to connect it to my labtop through usb,,i searched the net and i found that to access usb i need to have a driver for the device and this is done in kernel mode , unfortunately ,i dunt know how to write a driver although am familiar to c++ and vb codes
if any body can help me to write this driver ,, I need it to allow me to send and recieve bits from the ADC (in serial of course)
|
|
|
|
|
Maybe what you need is WDK[^]
I think you can also create a virtual COM port "towards" USB devices somehow and then you can reduce the communication with your device to reading/writing the COM port which is probably easier than writing a driver.> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
how can i create this virtual com port plz ?
|
|
|
|
|
Sadly i don't know, sorry, try google... > The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
How does your device handle the USB?If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i was trying to handle the usb directly through the data+ , data- , Vcc and Gnd pins
i dun know if this is possible ,however, if not , "FT232BL "USB UART (USB to Serial) IC is the only available and i dun know how to configure it even , if u can help me to do so i will appreciate ..
|
|
|
|
|
ammeer_a wrote: i was trying to handle the usb directly through the data+ , data- , Vcc and Gnd pins
i dun know if this is possible
I suppose it is possible but also a daunting task.
ammeer_a wrote: "FT232BL "USB UART (USB to Serial) IC is the only available and i dun know how to configure it even
I would recommend a USB<->RS232 converter, and, as far as I know, the FTDI ones work well. FTDI provides (for the PC side) the software to handle to USB as virtual COM .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thnx , but does the FT232BL IC , which i mentioned before ,can works with this ?
|
|
|
|
|
Yes, according to the documentation [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
See the Windows Driver Kit[^] pages for reference. However, if it is a simple serial USB device, I think you can access it from user space. MVP 2010 - are they mad?
|
|
|
|
|
I'm assuming you are not a hard core hardware developer from your question, so I can not recommend http://www.ftdichip.com/[^] highly enough.
Simple electronic interface, and they provide good drivers already - you can just tweak the IDs if you want to make it look like your own device. AND they provide DLLs for interfacing with their device drivers, or you can use them like virtual com ports.
They were helpful when I gave them some semi-daft questions. And they're British!
I'd start here: http://www.ftdichip.com/Products/FTEvaluationKits.htm[^]
You can get eval kits that look like a large IC for your development board.
And no, I have no association with them at all, except as a happy customer.
Good luck,
Iain.I have now moved to Sweden for love (awwww).
|
|
|
|
|
ammeer_a wrote: i have made a simple hardware interface consisting of an ADC
If your hardware interface has USB calbility, that is for sure it should have some kind of USB control chip. Usually very USB chip has a default USB driver for free. You can add your USB cability basing on your the default driver.
|
|
|
|
|
hi all,how to make a bitmap image file is saved as icon?Thank you!!!
|
|
|
|
|
|
hi,Richard ,thank you for your attention,but i can't find a way which create or save as an icon
|
|
|
|
|
If you do not have Visual Studio then you need to use Google to search for a free program, or code your own. MVP 2010 - are they mad?
|
|
|
|
|
|
Tested by the sample code below, the result:
1. write is much slower than the other two
2. fwrite is twice as fast as ofstream.write
I know write is not buffered, so it is much slower,
I think the performance of the other two should be close, but why not?
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <tchar.h>
#include <io.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <assert.h>
#include <fstream>
#include <windows.h>
#pragma warning(disable : 4996)
int _tmain(int argc, _TCHAR* argv[])
{
const int buf_size = 1<<20;
char * buf = new char[buf_size];
FILE * f1 = fopen("d:/test1", "w");
assert(f1);
int f2 = open("d:/test2", _O_BINARY | _O_CREAT | _O_TRUNC | _O_WRONLY, _S_IWRITE);
assert(f2!=-1);
DWORD t;
t = GetTickCount();
for (size_t i=0; i<buf_size; ++i)
fwrite(buf+i, 1, 1, f1);
fclose(f1);
printf("count of ticks used: %d bytes\n", GetTickCount()-t);
t = GetTickCount();
for (int i=0; i<buf_size; ++i)
write(f2, buf+i, 1);
close(f2);
printf("count of ticks used: %d\n", GetTickCount()-t);
t = GetTickCount();
std::ofstream ofs("d:/test3", std::ios_base::out | std::ios_base::binary | std::ios_base::trunc);
for (int i=0; i<buf_size; ++i)
ofs.write(buf+i, 1);
ofs.close();
printf("count of ticks used: %d", GetTickCount()-t);
delete buf;
getchar();
return 0;
}
|
|
|
|
|
I don't know enough about fstream - though it looks as though it's performance may vary between implementations.
Just ran your code through MinGW 3.4.5, and I see a very different picture to the one you describe.
Over here, your code timings are:
fstream: 78
fwrite: 109
write: 3391
I know iostream & fstream increase program size considerably, (read several 100k) and would have expected
fstream to be second, in terms of performance, though this clearly appears not to be the case.
|
|
|
|
|
Hi All
How can i change tab control color?I try to change through OnCtlColor function but no change in control.
|
|
|
|
|
Member 6864839 wrote: Hi All
How can i change tab control color ?I try to change through OnCtlColor function but no change in control
Gee, I dunno - It's a long shot, but you could always try submitting the text in red to google and clicking on the second link. It's here, provided for your laziness convenience.
How To Change the Background Color of a Tab Control[^]
|
|
|
|
|
In the two forms of vector::erase:
iterator erase(iterator position);
iterator erase(iterator first, iterator last);
can the 'iterator' mentioned be a vector::const_iterator, vector::reverse_iterator, or vector::const_reverse_iterator as well as a vector::iterator ?Edward Diener
|
|
|
|
|
No - iterator and only iterator . Remember that the type iterator isn't a template parameter - this isn't an algorithm, it's a method of vector .Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
CodeProject MVP for 2010 - who'd'a thunk it!
|
|
|
|