|
Hi Luc,
I will check that out thanks
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hei every one,
I want to open cash drawer(cash bases) with programming C#. I've cash drawer [^]
do u have any idea?
Thanks
Syed Shahid Hussain
|
|
|
|
|
There are two options:
1) Contact the manufacturer (Cash bases?)
or
2) Design hardware to locate the key, move it to the correct position, insert it in the lock, turn in the correct direction with the correct degree of force and rotation, and then pull the draw open. Program it in C#
On balance, (1) may be the simpler option...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
For me the second option is too much more intriguing
|
|
|
|
|
It's lot more fun - but it may be too long in development for the suits to appreciate!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
yes.
I would look for the manufacturer's documentation.
and/or search CodeProject.
a fast search for "cash drawer" yielded this[^] for example.
|
|
|
|
|
Ones I've seen were connected with a serial cable; it's probably as simple as setting one pin high. Should be easy enough.
|
|
|
|
|
|
what is it?
Syed Shahid Hussain
|
|
|
|
|
It is a not-polite way of saying that you should do basic research: it is a acronym for "Read The F*cking Manual"
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Check with the manufacturer / supplier and ask them for some documentation.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
It's been several years since I worked on a DOS-based POS application, written in Clipper. IIRC, the control code for opening the cash drawer, which was a serial device, was a form feed. As already mentioned in this thread, that may vary from one manufacturer to another.
|
|
|
|
|
I built a brand new WCF Service which has 11 methods. Added the data layer (linq to sql) and added a test project.
I have the service defined for basicHTTP and SecurityMode=None.
When I do a Service Reference in the test project, I get all of my data object but no client for my service.
I've looked over everything and can find nothing wrong with the coding of the service.
I've looked over the web.config and can find nother wrong with that either.
I'm coding the service under VS2010, C#, I've done a VIew in Browser and the service displays properly and the WSDL displays properly.
Yet no matter what I do I cannot get client code (CentralServicesClient) to appear in the class.
Has anyone expereinced this with VS2010???
I swear all Microsoft does is take something that is easy to do and works and then they break it and make it hard to deploy!!!
|
|
|
|
|
I don't know; I didn't do it that way.
|
|
|
|
|
You can try adding the reference using SvcUtil.
To be honest, I dont think VS2010 has anything to do with this.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
The project I am working on has a memory leak and will throw OutOfMemory exception when left running long enough. I believe the source of this problem is an object which multiple instances are created and never properly freed. After I am done with the object I would like to manually call Dispose().
The object is defined as such and is contained within a struct implementing IDisposable.
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CamAcquisition : IDisposable
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 82944)]
public ushort[] frameData;
...
}
I do not know how to properly implement Dispose() to free this object.
How can I manually free an instance of this object?
|
|
|
|
|
Hi,
whatever is marked [MarshalAs(UnmanagedType.ByValArray, SizeConst = 82944)] inside a struct, becomes an integral part of that struct, and cannot be deleted/removed/disposed at all. The whole attribute is intended to mimic an unmanaged array inside a struct, that is why its size has to be constant and known at build time. The entire struct is a value type, so it gets allocated on the stack and lives as long as your surrounding method is alive.
Furthermore, I'm not sure how you are using your struct and why you would want to make it implement IDisposable. It would take more explaining I guess. The only use I see for struct.Dispose() is when it also allocates and holds on to unmanaged resources.
|
|
|
|
|
hi all,
I have used win xp an this code runnig normally but when I started to use win7 it is not working what is it my problem
thanks..
foreach (ServiceController service in services)
{
if (service.ServiceName == "SistemServisleri")
{
string argu = @"/C sc delete SistemServisleri";
System.Diagnostics.Process.Start(@"c:\Windows\system32\cmd.exe", argu);// for win7 I used it but not working
System.Diagnostics.Process.Start("cmd", argu);// for winxp I used it and working
}
}
|
|
|
|
|
Have you debugged it? Does the service exist? What do you mean it doesn't work? Does it not run? Does it through an exception?
Please format any code you post using the pre tags, i.e. the "code block" link in the edit menu.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I want to delete this servis with this code but it can't be deleted
|
|
|
|
|
Is it a UAC (user account control) problem? Even if you are a member of the admin group, you must run that program "as administrator" explicitly.
|
|
|
|
|
for administrator I use
System.Diagnostics.Process.Start(@"c:\Windows\system32\cmd.exe", argu);
|
|
|
|
|
YOur code has to run as an administrator. Under Vista and 7, even an admin account doesn't run as an admin account until the privilege requires it and you get the UAC box. To get around that UAC box, you have to create a manifest file in your project that specifies the app needs admin level permissions to run.
Here's[^] a quick'n'dirty on what you need to do.
|
|
|
|
|
Have u tried it to using WMI?
|
|
|
|