|
Hi,
Try replace Diag.exe with notepad.exe to see, if the 30 seconds are on the calling or called side.
Btw. By default Process.Start makes a call hierarchy with caller becoming a parent of called. This means that parent can't be closed without the child being closed. This might be fine. Otherwise, you can add a ProcessInfo argument that makes Process.Start spawn a process detached from the caller.
Kind Regards,
Keld Ølykke
|
|
|
|
|
I have seen lot of codes but in that codes, no role of public key.
How to implement Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) for verifying the digital signature using public key in C#?
modified 7-Jun-13 6:34am.
|
|
|
|
|
..and what is your question, precisely?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I have seen lot of codes but in that codes, no role of public key.
How to implement Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) for verifying the digital signature using public key in C#?
|
|
|
|
|
Ankur Rawat wrote: no role of public key. It's not always referred to as a "public key". Anything that talks about "certificates" is using a private and a public key.
Ankur Rawat wrote: How to implement Digital Signature Algorithm with Secure Hash Algorithm (DSAwithSHA1) for verifying the digital signature using public key in C#? If you're trying to encrypt data using a certificate, I'd suggest finding a tutorial, or a CodeProject article.
If you're going to go into the depths of the algorithm, you'd need to dive into the MSDN-documentation yourself. FWIW, the validity of a key is usually obtained from a "certificate revocation list". You'd also want to check the date on the certificate.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello to all guys,
I am having a problem in windows application
I have a button through which i can select an image using openfiledialog and thn after the path of the selected image is shown in another textbox but after tht m wanna to save tht save into another fold using savefiledialog but i cant do it
for save an image i use this code
Bitmap bit = new Bitmap(saveFileDialog1.FileName);
bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
but it doesnt work can anyone help in it
|
|
|
|
|
Arun kumar Gautam wrote: but it doesnt work You need to tell us exactly what that means.
However:
Bitmap bit = new Bitmap(saveFileDialog1.FileName);
bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);
Are you sure you want to create the Bitmap from the filename in the SaveFileDialog ?
Use the best guess
|
|
|
|
|
|
Why are you telling me this?
Use the best guess
|
|
|
|
|
Bitmap bit = new Bitmap(openFileDialog1.FileName);
bit.Save(saveFileDialog1.FileName);
and for saving it as jpg you can either add extension while giving it name in save file dialog or you can add filter in property window of save file dialog under filter property add JPeg Image|*.jpg
|
|
|
|
|
//Use picture offline By Copy Picture from googlemap
I Want convert Latitude & Longitude To Pixcel X Y On PictureBox (C# Get Picture from GoogleMap)
by
picturebox Height :550 px
picture Width : 640 px
IF I Have Latitude : 39.827918 & Longitude : -104.938145 (Map center) & Zoom Map : 11
Map By Google:
http://maps.googleapis.com/maps/api/staticmap?center=39.827918,-104.938145&zoom=11&size=640x550&sensor=false
I want mark New At Latitude : 39.839386 & Longitude : -104.965868
Please !!!
Thank
|
|
|
|
|
It's an online service; this specific difficulty has been solved by Google, and they'll return a nice map including the marker if you provide the location in long+lat.
It's not something that's "easy" - you'd have to take in account the size (and resolution!) of the image-map, and adjust that to a real-size world.
zerozaaa wrote: I want mark New At Latitude : 39.839386 & Longitude : -104.965868 Unless you use the Google service, you'll have to calculate the exact position of the marker in the picture yourself, and draw the marker.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I want to make my program so that it is unable to be hacked. It interfaces with the internet. Some of the things I have been considering is breaking up the program into multiple parts with remote access, one way transference of data. No web page, etc.
Can anyone give me suggestions, reading references, etc. on how to handle this. I appreciate any help.
Thanks in advance.
Michael
|
|
|
|
|
MAW30 wrote: Can anyone give me suggestions, reading references, etc. on how to handle this
How to handle what? You haven't said anything other than the VERY generic "unable to be hacked". We have no idea what this app is supposed to do, what data it's transferring over the web, if there's a server component, how much data is being transferred to clients, how many clients, ..., blah, blah, blah, ... nothing.
|
|
|
|
|
MAW30 wrote: Can anyone give me suggestions, reading references, etc. on how to handle this. I appreciate any help. Take a month vacation, learn to hack. If you're feeling adventurous, then hang an old isolated machine with an unsecured Sql Server/MySQL database in there with lots of logging. Be sure to close any outgoing mailports though, you don't want them running a mass-mailer from there.
MAW30 wrote: I want to make my program so that it is unable to be hacked. Stuxnet[^] comes to mind.
The good news is that it's usually not even worth the trouble to hack software. Unless you're releasing a game like WarCraft (and even there, you'll find complete illegal realms), or Google Calendar (which contains spam in my account, even with a "strong" password)
FWIW, first task would be to find the weak spot, or the location where you expect to be attacked. Are you worried about the communication-part? Then use SSL with certificates at both ends, and have a customized authentication-scheme that blocks the user after three consecutive attempts.
MAW30 wrote: breaking up the program into multiple parts with remote access Good one! Non-local code cannot be read, only the result is relayed back.
As soon as a user has local admin rights, he/she might pose a threat. (Something that some virusscanners try to mitigate, in which case you kill the scanner-proces using the debug-command) With Fiddler2 on the machine, and the knowledge to inject .NET code into a process, all documented on the internet.
How hack-proof does it need to be? Are you running a Nuclear Plant?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Rather than trying to make the program "unhackable", you could work on try and setting up a more secure environment for your program.
Use one or two firewall programs and secure your network connection.
|
|
|
|
|
Hello everyone,
I tried to get the input data (wheel, acceleration , break values, etc)from my Logitech G27 steering wheel in a C#.
I read a some articles about joysticks, and controllers (e.g. PS, XBOX), like: Interfacing with a Joystick using C# By M Harris.
I've implemented the following class (like in the example above):
public WeelG27(Control ParentControl)
{
try
{
DeviceList gameControllerList = Manager.GetDevices(DeviceClass.GameControl,
EnumDevicesFlags.AttachedOnly);
if (gameControllerList.Count > 0)
{
foreach (DeviceInstance devInst in gameControllerList)
{
if (devInst.DeviceType == DeviceType.Driving && devInst.ProductName.Contains("Logitech G27 Racing Wheel USB"))
{
Wheel = new Device(devInst.InstanceGuid);
Wheel.SetCooperativeLevel(ParentControl, CooperativeLevelFlags.Background | CooperativeLevelFlags.Exclusive);
Wheel.SetDataFormat(DeviceDataFormat.Joystick);
Wheel.Properties.AxisModeAbsolute = true;
Wheel.Properties.AutoCenter = false;
Wheel.Acquire();
}
}
}
if (Wheel == null)
{
throw new NotImplementedException();
}
}
catch (Exception Ex)
{
MessageBox.Show("WeelG27() Constructor error!\n" + Ex.Message + "\n" + Ex.StackTrace);
}
}
Problems:
- After acquiring the device, the wheel cannot be moved (it is blocked and moves maximum 10 degrees left and right from center).
- Tried to set the Cooperative Level to Foreground (use the wheel only when application is active) but Poll() function throws an error when the tool is still pooling (thread or timer).
Does anyone had this problems? Solved this problems, or know how to solve them?
I would appreciate also some tips (or start points) on how:
- to move the wheel to different positions (from the tool).
- set different wheel properties (e.g. steering wheel maximum rotation angle or combine axes).
- make a mechanism so that I can assign dynamical button functionality (like in most games, you can choose what buttons you use to set different actions e.g. Wheel Button 1 -> Start Motor).
Thank you for help!
Razvan
|
|
|
|
|
I want to draw a rectangle inside webcam application and I have built the camera where should I write the code to insert ROI please help me.
My code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Camera_app
{
public partial class Form1 : Form
{
Camera c;
List<Bitmap> imag = new List<Bitmap>();
public Form1()
{
InitializeComponent();
c = new Camera(cbox1);
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
c.Connect(cbox1, pbox1);
}
private void button3_Click(object sender, EventArgs e)
{
c.Disconnect();
}
private void button2_Click(object sender, EventArgs e)
{
c.Capture(pbox2);
}
private void pbox2_Click(object sender, EventArgs e)
{
}
private void panel3_Paint(object sender, PaintEventArgs e)
{
}
private void panel3_Paint_1(object sender, PaintEventArgs e)
{
}
private void pbox3_Click(object sender, EventArgs e)
{
}
private void panel5_Paint(object sender, PaintEventArgs e)
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Camera_app
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
|
|
|
|
|
You're going to have to be a bit more specific. Draw a rectangle on WHAT?? The Form? On top of a control?? On top of the video??
|
|
|
|
|
I am so sry about this . I want to draw an Roi over videosourceplayer of camera actually...
|
|
|
|
|
Well, that's not going to happen in Windows Forms code. Those pixels are owned by the control that is painting the video image and anything you draw on the control will be overwritten over and over again at the frame rate your video is being drawn at.
You'd have to use something like AForge.NET or OpenCVSharp to do an overlay. Google for them.
|
|
|
|
|
Hi guys,
I just want to know which would be faster or reliable between calling RPG program and using ODBC to query from AS400.?
Any comments and suggestions would be much appriciated.
Thanks so much
|
|
|
|
|
Which to use? It depends.
ODBC is probably simpler (and directly faster), but you bypass any business rules the RPG provides. So this is the first thing you need to decide for your circumstances. For example a well-established AS400 is pretty solid and the buisiness rules have probably evolved to a strong position, so you don't want to re-work those (favour calling RPG). Of course if you are looking to deprecate the RPG code base you would want to migrate it to the .net side (this favours ODBC, but will more than likely cause a lot of work).
To confuse the mix, further, newer versions of RPG are capable of exposing SOAP (and consuming) web services, you should consider those. My memory of these things is hazy (and we used a screenscraper in the end). I think you can also get biztalk to play with the iSeries, this provides a pathway for communication in more complex scenarios.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed” “One of the greatest problems of our time is that many are schooled but few are educated”
Sir Thomas More (1478 – 1535)
|
|
|
|
|
Thanks much Keith
You give me a great idea.
I think i'll use ODBC, it might give me a lot of work but in my case, would be the best option. Thanks again..
|
|
|
|
|
Please Help me to Upload XML file into the SQLServer2008
|
|
|
|