|
Hey guys... I'm in a bit of a pickle
[backgroundInfo]
The program in question is used to communicate with an external device(fingerprint scanner). Im using the manufacturers SDK to achieve this. What basically happens in the code is a connection is established to the device via serial, lan or *modem. After the connection has been successfully established methods are called for retrieving data etc, etc.
*modem communication is my problem
[/backgroundInfo]
Now the serial and network work perfectly, the modem does not. The method to establish connection via modem is not documented in any way and the more i try and explain to the manufacturers(who cant speak engwish velly goot) to send me code examples of how to establish a modem connection to their hardware using their SDK, the more they send me manuals to create a new dial-up network connection in windows manually
Now the only "workaround" i can think of right now is to create a connection between the two GSM modems via a GSM wrapper that i found here on CP somewhere, and SOMEHOW emulate that connection to a serial port... That way i can just use the SDK's serial connection method which looks like this.
if (ZKclass.Connect_Com(comPort, deviceNumber, baudeRate))
{
}
I'm totally lost, im not even sure if this approach is possible.
Any thoughts and/or ideas are appreciated
Thank you
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Harvey Saayman wrote: Now the serial and network work perfectly, the modem does not.
...
the more they send me manuals to create a new dial-up network connection in windows manually
IMO when you success using LAN, the only thing you must do is establishing connection by modem and use same method with LAN does, but may be using TCP or HTTP or other methods that must be supplied by your manufacturer.
hope it helps
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
how to play a song using MCI ?(C#)
|
|
|
|
|
|
don't know whether this link solves your purpose, please specify which file format you want to play?
and please google first, before posting
http://www.codeproject.com/KB/audio-video/moemeka7.aspx[^]
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
How to create Round(Circle Shape)Button in C#?
|
|
|
|
|
|
// This method will change the square button to a circular button by
// creating a new circle-shaped GraphicsPath object and setting it
// to the RoundButton objects region.
private void roundButton_Paint(object sender,
System.Windows.Forms.PaintEventArgs e)
{
System.Drawing.Drawing2D.GraphicsPath buttonPath =
new System.Drawing.Drawing2D.GraphicsPath();
// Set a new rectangle to the same size as the button's
// ClientRectangle property.
System.Drawing.Rectangle newRectangle = roundButton.ClientRectangle;
// Decrease the size of the rectangle.
newRectangle.Inflate(-10, -10);
// Draw the button's border.
e.Graphics.DrawEllipse(System.Drawing.Pens.Black, newRectangle);
// Increase the size of the rectangle to include the border.
newRectangle.Inflate( 1, 1);
// Create a circle within the new rectangle.
buttonPath.AddEllipse(newRectangle);
// Set the button's Region property to the newly created
// circle region.
roundButton.Region = new System.Drawing.Region(buttonPath);
}
|
|
|
|
|
Is it possible to get an approximate sum of S defined as 1/2 + 1/4 + 1/8 to a certain number of counts? Say up to 1/16?
If so how does one write such a code in c# to achieve this?
Thanks
|
|
|
|
|
Angelinna wrote: If so how does one write such a code in c# to achieve this?
Personally speaking, I'd use a loop. It's the simplest way.
|
|
|
|
|
Just how does a loop get applied in this case.
|
|
|
|
|
You could use a Fraction/Rational number class or find the GCD of all the numbers, multiply them by the GCD, sum them all, then divide by the GCD.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
You can get much better than an approximation, you can get the exact value.
The sum of (1/2 + 1/4 + 1/8 + ... + 1/n) is (1 - 1/n).
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Would this operate as a recursive function? If not, how best can one
implement the summation recursively.
|
|
|
|
|
Why would you do that as a recursive function? It's a very simple calculation. There is no looping required of any kind.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Good point. I should have thought of that. I've been out of school way too long.
|
|
|
|
|
|
Thanks all for your guidance. I am trying to have it all programmed in c#.
|
|
|
|
|
Hi everybody,
I uses Interop.Excell.dll to modify excel file then it worked fine if I chosen the computer's region was English. But the problem happened when i changed to another different with English; Some of function could not work. For Example :
I used this function to change the condition of cellItem
cellitem.FormatConditions[1].Modify(XlFormatConditionType.xlExpression, XlFormatConditionOperator.xlEqual, "=AND($X$" + position + ">2,MOD($X$" + position + ",2)=0)", "");
-With the region is English it still ok.
-With the region is Germany I had error exception:
{"The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"}
OS: Window XP professional.
I think that:"The reason is some functions of that dll can not work with the difference formats(currency, datetime, number...) doesn't like English format." I try to find the correct dll using in Germany location but untill now I do not find out it or find out another solution.
Have anyone ever done in this situation and solved it! Please help me.
Thanks,
|
|
|
|
|
if i use varchar(max) instead of varchar(50), and use "chandra" only , then will both give the same performance.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: then will both give the same performance.
Same performance of what? Actually what is this doing in the C# forum? It should be in SQL...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
i am creating tables on runtime, after reading from a text file but i don't know the datatype size, so if i use varchar(max) will that okay.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Again, please use the SQL forum, NOT C#!!
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
It won't make any significant difference to the performance of your C# code.
|
|
|
|
|
Hi,
I made a custom control inherited from 'Button' control.
I made a custom event 'Action' in this userControl I made a access specifier 'public'.
like this :
public delegate void ActionEventHandler(object sender,ActionEventArgs e);
public event ActionEventHandler Action;
protected void OnAction( object sender, ActionEventArgs e)
{
if ( Action != null)
{
Action(sender,e);
}
}
but when I drop this control to a form it doesn't show 'Action' event
in property window.
plz help how to do this...
|
|
|
|