|
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!
|
|
|
|
|
This is a Healthcare app.... we are storing inside the DB for security reasons... Our security policy does not allow us to store in a file structure.....
|
|
|
|
|
OK Thanks. As I said i don't really have a solution to your problem. I suppose that you can't afford to have any lossy compression schemes either.
Thanks for the reply,
|
|
|
|
|
If you need a file that looks like it is in the OS file system but is actually stored in the DB you may want to try (.Net) System.Web.Hosting.VirtualPathProvider.
It's a bit of work but you can create a virtual provider that reads from the database to satisfy file requests. This is what sharepoint does.
e.g. http://support.microsoft.com/kb/910441[^]
I don't know if this will allow streaming, with pausing, though.
...cmk
The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack
|
|
|
|
|
Hi,
I created a form that has an event handler that binds the data to the form at load time, it works perfectly until I add a GroupBox. Once I added the group box, the Form Load event is not firing. I see that VS is still adding the load event.
<br />
this.Controls.Add(this.groupBox2);<br />
this.Controls.Add(this.groupBox1);<br />
this.Controls.Add(this.classmatesBindingNavigator);<br />
this.Name = "ClassReunionPlay";<br />
this.Text = "ClassReunion";<br />
this.Load += new System.EventHandler(this.ClassReunionPlay_Load);<br />
If I comment out the two "this.Controls.Add(this.groupBox) from above the EventHandler once again gets called when the form loads.
Is there something I should be setting in the properties for the form or the GroupBox to get the event to fire?
Thank you,
Glenn
|
|
|
|
|
Not sure what is going on, partly because you only showed a very small part of your code; my guess would be you have now moved your data receiving controls into a groupbox however you did not move your classmatesBindingNavigator .
However, unless your form's constructor throws an uncaught exception, I know of no way to not get a Load event. Are you sure you observed correctly?
|
|
|
|
|
Hi Luc,
Thank you for the reply. Yes this is exactly what I did. I've moved the data receiving controls into a new groupbox. I'm trying to learn how this works. I don't know how or where to move the classmatesBindingNavigator.
Thank you,
Glenn
|
|
|
|
|
I checked BindingNavigator, I now don't think it matters where it sits.
I'm still not convinced about your Load event not firing. Is the event still wired? (does it show a handler in the properties pane? or do you still see the "Load += new EventHandler(...)" bit in the designer file?
Try putting a breakpoint high up in the event handler; alternatively insert a MessageBox.Show() .
|
|
|
|
|
Hi Luc,
Yes, the event is showing in the properties window under "Load", and I do see it wired in. When I set a break point at the entry to the event, I can see that it never hits, the form loads and we never hit the break point.
If I comment out the two GroupBoxes above and change nothing else, rerun the application with the debugger, I stop at the Load Event.
I thought I lost my mind at first, wondering how the load event is not hitting when the form is getting loaded.
I tried creating a simple Hello World form, placed a GroupBox on the form, added a label within the GroupBox, added a MessageBox.Show to the Load Event and it works.
So I then added a MessageBox.Show to my Class Reunion application and it doesn't give me a message box.
Here is the code that setups the form. I eliminated the code for the controls.
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(683, 344);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.classmatesBindingNavigator);
this.Name = "ClassReunionPlay";
this.Text = "ClassReunion";
this.Load += new System.EventHandler(this.ClassReunionPlay_Load);
((System.ComponentModel.ISupportInitialize)(this.classmatesBindingNavigator)).EndInit();
this.classmatesBindingNavigator.ResumeLayout(false);
this.classmatesBindingNavigator.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.classmatesBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.kTReunionDataSet)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picturePictureBox)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
I think you are also right on moving the bindingNavigator because if I call the Load Event, the bindingNavigator shows I have 433 records, when I click the next record button, I do not see any data in the controls.
Thank you,
Glenn
|
|
|
|
|
|
It should be in the .NET Framework SDK
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Yeah, that'd be nice. Where is it?
I see mentions that it might be in the next version of the Windows SDK.
|
|
|
|