|
No, it's not. You can either use VS2010 or the command line compilers without Visual Studio.
|
|
|
|
|
fct2004 wrote: Does anyone know if it's possible program with .net 4.0 from Visual Studio 2008?
Nope.
You cannot run Silverlight 4 either.
|
|
|
|
|
And you only get the new version of GACUTIL by installing VS 2010.
|
|
|
|
|
Hi, I've been trying to figure out how to send commands for a printer installed in a USB port. Previously I could do this with the LPT1 port by calling kernel32.dll CreateFile method (DLLImport) and sending the commands this way. But with USB ports this doesn't work.
So does anybody know how to do that? Or at least have any article on that matter, I couldn't find anything (sorry if its easy to find, I just suck at finding stuff).
So my requirement is, cycle through USB ports to check if there is any device attached. If there is a device attached, send a command to ask the device to identify itself.
So basically I'll need two things, learn to dynamically cycle through USB port, send commands to it and read the responses.
All of that using C# and .Net Framework 2.0.
Any ideas?
Thanks in advance for any help. Regards,
Fábio
modified on Saturday, April 24, 2010 9:44 AM
|
|
|
|
|
|
That's great!!! For now you solved my needs. But soon I will also need to read from it. Hopefully I'll figure out on my own, studying the code and the spooler usage. Anyway, thanks a lot.
And thank for clearing it about the fact that USB port is not really a port. 5!
|
|
|
|
|
Reading from a printer? That's not going to happen by studying that code I kinked to.
Then again, you haven't said WHAT you think your going to read or why you need it.
|
|
|
|
|
Sorry for that. Let me clear it out. I need to talk to the printer because it's a Zebra printer with RFID capability. What I will do is send ZPL commands to the port and read the response. Zebra receives ASCII commands and responds with ASCII too.
There are several uses for the printer's responses, including telling the success of a RFID TAG write operation.
Perhaps I will need another alternative to the spooler API to acomplish that.
Thanks again for your help.
|
|
|
|
|
Yep. The spooler will not return anything to you. This kind of printer should have an SDK available from the manufacturer, making all of the code you just got moot.
|
|
|
|
|
Yeah, I wish it did. I contacted Zebra and they don't have anything for .Net yet. They should have in the near future, but couldn't give any dates. And I need it now. That's why I was asking for a way to talk to the BUS, no matter the device. And if I get that, I'll also be able to use to talk to the fingerprint reader from Microsoft on another project of mine, which seems there is no SDK either, just the drivers.
Thanks for your help
|
|
|
|
|
Fabio Franco wrote: That's why I was asking for a way to talk to the BUS, no matter the device.
There's no such thing on USB. You have no choice but to talk to the DEVICE on the bus. You cannot treat the USB port like it was a serial or parallel port. That's like trying to communicate to a card inserted into an expansion slot on the motherboard by talking to the slot it's plugged into. You can't do it.
If they don't have a .NET specific library, you've going to have to make do with either normal C-style library and P/Invoke the functions or, hopefully, they have a COM-based library that you can use. Just because they don't support .NET directly does not mean that your out of luck. It's just going to take more work.
|
|
|
|
|
I think I may have put the wrong words. What I really meant is talk to the device "through" the bus. There must be a way to choose a specific BUS to talk to a device. I mean, even if I develop something specific to the device, I need to know where it is connected to.
I think about it in two ways:
1 - Make use of the device driver so it carries the messages for me.
2 - Find the device (in which "slot" its plugged in) and send the message myself.
I will do the talking to the device myself, thats for sure. I just need to know how to FIND it!
I know I don't talk to the USB, but I know I must use it to talk to the device, messages can't magically find it's way to the device. The USB must have an address I can find and talk through. That's where I'm stuck. How could I cycle through the USB slots on a computer, and send/receive messages through it?
There must be a standard way to make use of the USB slots, how the device will understand my commands is not the problem, this I know how to do it already (as I said, done this in LPT1). Windows must have some Win32 APIs available to acomplish what I want. Or maybe the drivers of the USB to do it. This is where I'm lost. In your experience what do you think? Am I looking at it the wrong way?
Thanks again
|
|
|
|
|
Fabio Franco wrote: I think I may have put the wrong words. What I really meant is talk to the device "through" the bus. There must be a way to choose a specific BUS to talk to a device. I mean, even if I develop something specific to the device, I need to know where it is connected to.
I think about it in two ways:
1 - Make use of the device driver so it carries the messages for me.
2 - Find the device (in which "slot" its plugged in) and send the message myself.
I will do the talking to the device myself, thats for sure. I just need to know how to FIND it!
That's what the SDK is for. Or, you can start with this article[^].
Fabio Franco wrote: I know I don't talk to the USB, but I know I must use it to talk to the device, messages can't magically find it's way to the device. The USB must have an address I can find and talk through. That's where I'm stuck. How could I cycle through the USB slots on a computer, and send/receive messages through it?
Fabio Franco wrote: how the device will understand my commands is not the problem, this I know how to do it already (as I said, done this in LPT1
Yeah, but do you know what you're "saying"?? What messages? How are they built? What is the structure for each command?? Without the SDK, you're talking complete gibberish. You're not sending the same messages you send over LPT1. These are Device commands, not escape codes your sending.
|
|
|
|
|
Dave Kreskowiak wrote: Yeah, but do you know what you're "saying"?? What messages? How are they built? What is the structure for each command?? Without the SDK, you're talking complete gibberish. You're not sending the same messages you send over LPT1. These are Device commands, not escape codes your sending.
I think you're not understanding what I'm saying. I'm completely aware of what to send the device. The printer understands ZPL Language[^]. In fact it understands it as plain text (8 byte character ASCII text) and it understands commands like *IDN? -> The standard for a device to identify itself, either sending it as plain text or bytecode.
So no, I'm not talking gibberish, I'm talking the device's language. For the case of the fingerprint reader, I'll have to understand it's language and the way to communicate (text, byte, etc). But it will work the same way.
I've programmed to several devices including, OTDRs through GPIB interface, printers through LPT1 port and other personal projects (my own designed circuit boards) through serial port. The only thing I couldn't do so far is talk to a device through USB.
I don't need an SDK. It would make my life easier, but I don't need it.
Thanks
|
|
|
|
|
Fabio Franco wrote: I think you're not understanding what I'm saying. I'm completely aware of what to send the device. The printer understands ZPL Language[^]. In fact it understands it as plain text (8 byte character ASCII text) and it understands commands like *IDN? -> The standard for a device to identify itself, either sending it as plain text or bytecode.
Trust me, it's the other way around. The language your send to the printer is ZPL. The message format you need to send using DeviceIo is not. It's a carrier of ZPL or whatever other data your sending to the printer.
How about this. You're calling a friend oversees and want to have a conversion in Enlgish. You both know English, but do you know how to the sounds of English are transmitted over the wire? What "language" is being used for that? It isn't English...
|
|
|
|
|
I understand what you say, but beeing this way it's probably the same for all devices using USB. So somebody should've done it already, there should be plenty of COM objects available if the carrier is the same.
|
|
|
|
|
Fabio Franco wrote: I don't need an SDK. It would make my life easier, but I don't need it.
Good luck...
|
|
|
|
|
Thank you, the SDK for the device I don't need really. I just need a boat to carry my letters to my friend in europe
|
|
|
|
|
Hi,
We are storing the WAV file into a database table as VARBINARY(MAX). We want to play the WAV file directly in a web page. We want to use PLAY, PAUSE and STOP for these WAV files.
We want the user to have a Control on the page to play the WAV file.
Here we DO NOT want to store the FILE in the Web Server's file structure. It is againt the SECURITY policy.
We tried different ways. Nothing is working. We used SoundPlayer class. Using this, we can only PLAY and STOP but can not PAUSE the WAV file.
Please help. Thanks in advance for any help.
Take care
B
|
|
|
|
|
You need to have a physical to stream in order to do this. I'm not sure SQL Server FILESTREAM would work
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Can you please explain what you mean by "physical"?
File physically residing inside the server? This is not acceptable as there is potential for compromising the WAV file as web server is inside the DMZ.
|
|
|
|
|
bynagari wrote: This is not acceptable
I'm sorry no one asked if this technology was acceptable to you or not.
If you don't like it then start coding your own streaming service.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I don't what you are talking about... this is my first time posting on this site... I never said, "This is not acceptable" ... that is non-sense.... I do not know why you got that????
|
|
|
|
|
I got that because that is what you said. Since you're new here I guess you don't understand the "Quote Selected Text" button and didn't see the "bynagari wrote:" text.
There is no way to do what you are asking. SoundPlayer requires either a path to the file or a stream. If the blob is in the database it obviously isn't a physical resource with a valid path. Neither is it a stream. Unless, as I said, SQL Server FILESTREAM will work for this.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Just out of interest: why .wav files? these things are HUGE!
|
|
|
|