The Wayback Machine - https://web.archive.org/web/20090216122807/http://www.codeproject.com:80/script/Forums/View.aspx?fid=186301
Click here to Skip to main content
5,892,890 members and growing! (18,293 online)
Announcements
* Bold indicates new messages since 2:28 16 Feb '09




BullFrog Power
Advanced Search
Sitemap

Hardware & Devices


Home > Forums > Hardware & Devices

 Msgs 1 to 25 of 209 (Total in Forum: 3,225) (Refresh)FirstPrevNext
QuestionWEPOS Solutionmemberctrlnick8:07 13 Feb '09  
Hi ,

This is a new and strange situation.. .I need correct direction if possible.

I have a KIOSK(Win XPe loaded on it)
To the KIOSK , there are attached peripheral devices like
1) Credit Card Reader
2) Cash Acceptor
3) Receipt Printer

My Task... I need to read the information from the peripheral device and expose the information in the best form to the KIOSK application

For example
1) The application on the KIOSK will have a provision to tell the customer , how much cash is input from the cash acceptor
2) Building the application is not my task.
3) I need to read the Cash Acceptor's input and provide the information to the application on the KIOSK

There is much more I have to do.. But what I provided is just the tip of the iceberg.
Questions + Concerns + Situation
1) I dont have any communication from my Development PC to the KIOSK Machine, Except for remote Login
I dont know how to use the XPe OS
What is the best solution for the situation I provided above, Do I need to build a Windows Service, Web Service... I dont Know.. any guidance on this?
I know that a previous developer 2 years ago built a similar solution on JavaPOS ... (Now I dont know anything what he did or where the solution is)
Since I heard the term JavaPOS from my manager , I started digging into WinPOS ... .NET POS.
What is this .NETPOS, What do I do with it?
How do I program a solution for XPe based machine
How do kick start this project in a very planned and succesfull manner?

The hardware info of this KIOSK machine is HP Compaq t5710 XPe 1.2GHz

Its a total confusion... Someone please guide me in the correct direction , and give me as many resources as you can

Thank You

Happy Programming!

Regards,
ctrlnick !

QuestionReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden6:10 12 Feb '09  
I have some code reading and writing to a USB Windows CE device (it's actually using the ActiveSync driver). On Windows XP I use CreateFile to open the port and ReadFile and WriteFile to do IO - this works fine. On Vista I can open the port but ReadFile and WriteFile always return this invalid function error (error code 1). Any ideas?
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpLuc Pattyn7:01 12 Feb '09  
Hi,

Vista won't let you:
- write files in certain locations, e.g. C:\Program Files;
- access the device as a whole, e.g. when trying to get the hardware serial number;
unless you are running with administrator rights.

Easiest work-around normally is choose a different folder, one that is not special to Windows.

Smile

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden7:06 12 Feb '09  
This "answer" has no relevance to my question. I am writing to a USB device not a file.
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpLuc Pattyn7:21 12 Feb '09  
Hi Keith,

sorry I misunderstood what your target device was.
I'll try once more: maybe this[^] puts your mind at ease.

Smile

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpDave Kreskowiak8:30 12 Feb '09  
I'm wondering how you're "opening" the USB "port"?? USB is not a port, but a bus. You can't open the bus like a serial port or something and read/write to it. You have to open the device that's connected to that bus.

So, how are you opening that device?


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden1:03 13 Feb '09  
Yes, I'm not actually opening "usb". I look up the name of the device port using SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetail; this returns a port name like "\\?\usb#vid_03f0&pid;_1016#5&12334f9d&0&2#{25dbce51-6c8f-4a72-8a6d-b54c2b4fc835}" and I use this in CreateFile to get a handle to the device. I can then use this in ReadFile and WriteFile - or I can in XP but not in Vista. Vista is happy to open the port but ReadFile/WriteFile just return error 1.
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpDave Kreskowiak3:19 13 Feb '09  
Error 1 is "INVALID_FUNCTION". Security has changed dramatically in Vista so the first thing I'd try is running the app as an admin and see what happens. If it works, you have to see if including a manifest to tell Vista to run the app as an admin is going to work for you. If not, then you have to find another method of talking to the device.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden4:38 13 Feb '09  
I do all my development under admin authority, so it's not that.
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpDave Kreskowiak5:35 13 Feb '09  
The only thing I could find on this error was that ReadFile had to use a buffer with a size evenly divisible by 64. If this doesn't fix the problem, I think you're going to be stuck trying to find another method of talking to the device, or at least using a different file name.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on Vistamemberdan neely5:39 13 Feb '09  
Sanity check the app you're using was explicitly started with "run as admin"?

Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall

GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden6:02 13 Feb '09  
No. My userid has full administrator authority.
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpDave Kreskowiak6:17 13 Feb '09  
Yeah, but it's not running like that all the time. An admin user is run as a normal user until the admin rights are required. If the app you launched doesn't have a manifest saying that it need elevated priv's, then it runs as a normal user, even under an admin account.

Under XP, admin account has admin priv's all the time. Under Vista, they only have admin priv's when needed, on demand. But, this "on demand" only kicks in if the app running requests admin priv's. That's where the application manifest comes in.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamemberKeith Worden6:46 13 Feb '09  
Ok, I've run the app with the "run as admin" function; didn't make any difference.
GeneralRe: ReadFile/WriteFile returning ERROR_INVALID_FUNCTION on USB device on VistamvpLuc Pattyn6:24 13 Feb '09  
Hi,

run as administrator for device access[^]

BTW it is strange your CreateFile succeeds, and Read/WriteFile don't.

Smile

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


Questionneeds some learning on finger-printmemberawoyale3:27 10 Feb '09  
am in need of some learning on how to interface finger-print with a security door.
AnswerRe: needs some learning on finger-printmvpDave Kreskowiak8:45 12 Feb '09  
Well, you need to get with the manufacturer of the door devices and see if you can get some kind of specification as to what to do to get the door to unlock. Then, you have to get with the manufacturer of the finger print scanner to see what you have to do to create a database of fingerprints and how to retrieve the prints from the scanner and loko them up in the database. Then you send an appropriate signal to the door hardware to "pop the lock".


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




QuestionFile System Filter Drivermembermkrelli2:33 6 Feb '09  
Hi.

I'm searching for a relatively easy way to get a Filter Driver working. I need it for some sort of data consistency tool, that I'm planning to write.

I've searched the net for a library simlar to the IFS Kit provided by Microsoft for their Windows DDK. Is there something like this for MinGW?

But the best solution for me would be a complete component that I can use quickly without writing the complete driver. I need no special functionalty. The standard (create/read/write...) methods plus the output of the data read/written are fine for me.
I found some non-free SDKs, but nothing that is opensource.

Does somebody know souch components?

Thanks,
Martin.
QuestionChange BIOS languagememberBlue_Boy7:04 5 Feb '09  
Hi,
I have desktop IBM NetVista and BIOS is in german language,I need to boot it from CDROM but i can't find option in BIOS to boot because language is german.
Is possible to update BIOS language in english or how can I make it to boot from CDROM?


Regards.


I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.


AnswerRe: Change BIOS languagememberdan neely8:10 5 Feb '09  
Unless you see a likely item in the bios to change (look for an option the says Deutsch) you'll need to find an English language BIOS from the manufacturer and follow their flash procedure.

Edit: You could also try feeding all the BIOS text into a translator until you find the option that way...

Today's lesson is brought to you by the word "niggardly". Remember kids, don't attribute to racism what can be explained by Scandinavian language roots.
-- Robert Royall

QuestionPrinters and Vista, program hangs or chrashs.memberst1412:29 3 Feb '09  
Is anyone else having problems with Vista printer drivers and there .Net application? My program hangs when the print preview control is initialised. If I try to catch the problem in a catch{} try block it often fails with a memory error at the next line of code.

I am assuming the users buy a new PC, Vista installed, and then hook up to there trusty network or locally attached 5 year old printers. I can't reproduce these problems at home so I am a bit lost.


I found this link which explains where some of the problems may start:


[^]

Thanks

Stuart
AnswerRe: Printers and Vista, program hangs or chrashs.memberdadashri3:56 4 Feb '09  
new PC, Vista installed, and then hook up to there trusty network or locally attached 5 year old printers. you 2gb ram use
GeneralRe: Printers and Vista, program hangs or chrashs.memberst1410:58 4 Feb '09  
Yes the PC has3.5 gb of ram. The printer causing problems is an HP and the drivers are uptodate.

OS Version: 6.0.6001.65536 Service Pack 1 Workstation x86
.NET Framework version: 2.0.50727.3074 x86
Processor: 2x "AMD Athlon(tm) 64 X2 Dual Core Processor 3800+" @ ~2004MHz (DEP, SSE, SSE2, SSE3)
Physical memory: 3453 MB

I've asked the user to try Paint.Net

Stuart
AnswerRe: Printers and Vista, program hangs or chrashs.mvpJohn Simmons / outlaw programmer7:10 9 Feb '09  
Write a simple program that doesn't do anything but display the print preview form, and send it to the user. If THAT program crashes, it's on the user's end. If it doesn't, you've got faulty code that is probably somehow connected to what you're printing. I assume you know that the same code that prints is also the code used to provide the previewed printout.


"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


GeneralRe: Printers and Vista, program hangs or chrashs.memberst1411:19 9 Feb '09  
Thanks John. Thats a good idea. One user has installed pdfcreator and now can print to pdf and then on to their printer but still can't print directly from my app. I have a smaller app that use an RTF control that supports printing so I'll send them a copy for testing.

The error messages I get when my program crashes point to memory corruption by the driver. Here is one example:

Exception details:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Drawing.SafeNativeMethods.PrintDlg(PRINTDLGX86 lppd)
at System.Drawing.Printing.PrinterSettings.GetOutputPort()
at System.Drawing.Printing.PrinterSettings.FastDeviceCapabilities(Int16 capability, IntPtr pointerToBuffer, Int32 defaultValue, String printerName)
at System.Drawing.Printing.PrinterSettings.Get_PaperSizes()
at System.Drawing.Printing.PageSettings.PaperSizeFromMode(DEVMODE mode)
at System.Drawing.Printing.PageSettings.GetPaperSize(IntPtr modeHandle)
at System.Drawing.Printing.PageSettings.GetBounds(IntPtr modeHandle)
at System.Drawing.Printing.PrintController.CreatePrintPageEvent(PageSettings pageSettings)
at System.Drawing.Printing.PrintController.PrintLoop(PrintDocument document)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at System.Windows.Forms.PrintPreviewControl.ComputePreview()

Here is what happened when I tried to cath the error in a Try Catch block. In the Catch I am trying to display the exception contents in a MessageBox )

Exception details:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.RuntimeTypeHandle.ConstructName(Boolean nameSpace, Boolean fullInst, Boolean assembly)
at System.RuntimeType.RuntimeTypeCache.ConstructName(String& name, Boolean nameSpace, Boolean fullinst, Boolean assembly)
at System.RuntimeType.get_Name()
at System.Diagnostics.StackTrace.ToString(TraceFormat traceFormat)
at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
at System.Exception.get_StackTrace()
at System.Exception.ToString()
at DrawTools.Startup.Main(String[] args)

Thanks

Stuart

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Last Updated 9 Aug 2007
Web18 | Advertise | Privacy
Copyright © CodeProject, 1999-2009
All Rights Reserved. Terms of Use