|
Zilo(svk) wrote: uses processor ID for license purposes
That's not really a good idea. I know in all of my machines around here, the ProcId is turned off. It returns 0 in all cases. Can your licensing scheme handle that possibility?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
After some research on this topic, i've changed my mind and instead of processorID , I'm using manufacturer and processor type specifications, which are not unique, but on combination with some other id's create "enough" unique identifier . I hope
thanx for reply
|
|
|
|
|
That's the trick. You have to grab a bunch of data from all over the place and combine it to get a uniqueness that you can use. Each piece, in and of itself, might not be unique for a certain sampling of machines, but bits and pieces from all over a machine can't be the same everywhere, statistically anyway.
You have to look at all kinds of stuff like Processor type, RAM data, hard drive and serial numbers, network card MAC's, volume serial numbers, machine SID's, admin account SID's, ..., the list goes on and one.
But, the problem you run into is that your algorithm must be able to withstand changes in the hardware and still return a valid ID.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Sorry, I as a customer do not like that; my machines evolve, and I want to know
beforehand whether my next change will break some of my programs. And anyhow,
I want to continue to use the software I bought on one machine, whatever
happens to that machine; even after a full replacement. Without hassle.
If you have fixed the roof, then added a room to your house, would you like your front door to suddenly remain shut when you repaint the kitchen ?
The one software protection scheme that seems acceptable to me is a hardware
key (today that would be a USB device, plus a backup) that can hold a large
number of keys, so you pass the device's serial numbers to the SW vendors,
and get personalized keys in return.
|
|
|
|
|
Luc Pattyn wrote: Sorry, I as a customer do not like that; my machines evolve, and I want to know
beforehand whether my next change will break some of my programs. And anyhow,
I want to continue to use the software I bought on one machine, whatever
happens to that machine; even after a full replacement. Without hassle.
You're preaching to the choir here! I can't stand Microsoft's little scheme any more than you, and I did mention the drawbacks in my post. It's up to him to figure out a way to do it without screwing the customer if they make a change to the machine.
I really hate protection schemes to begin with. Granted, we need to protect our income, but it's a blurry line between the cost of protection and the margin of profit.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hello forum, well here i m in problem of generating table of content(which is msword feature to generate indexes).
What i have done till know is i generated 2 styles in c# code and apply to word document generated.
Now whats my problem is i have to add these styles to my table of contents ADD method, which requires parameter "ADDEDSTYLE' if new style is to be applied.
i m attaching the code for addingStyle
Word.TableOfContents sty;
object StyleMain = "Main";
object StyleSubMain = "SubMain";
short lev1 = 1;
short lev2 = 2;
sty.HeadingStyles.Add(ref StyleMain, lev1);
sty.HeadingStyles.Add(ref StyleSubMain, lev2);
object stylee = sty;
myWordDoc.TablesOfContents.Add(myWordApp.Selection.Range, ref missing, ref missing, ref missing, ref missing, ref missing, ref RightAlignPageNumbers, ref missing, ref stylee, ref UseHyperlinks, ref missing, ref UseOutlineLevels);
-- modified at 5:41 Friday 20th April, 2007
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
Hi all
I have problem, what seems like a bug in C#
I need to bind an property of COM object with enum type to ComboBox.
examp:
<br />
<br />
public class CBItem<br />
{<br />
public CBItem(ComLib.TypeEnum Type, string Name)<br />
{<br />
_type = Type;<br />
_name = Name;<br />
}<br />
<br />
ComLib.TypeEnum _type;<br />
string _name;<br />
<br />
<br />
public ComLib.TypeEnum Type { get { return _type; } }<br />
<br />
public string Name { get { return _name; } }<br />
}<br />
<br />
...............................<br />
<br />
this.comboBox1.DataSource = new List<CBItem>(new CBItem[] {<br />
new CBItem(ComLib.TypeEnum.enOne, "One"), <br />
new CBItem(ComLib.TypeEnum.enTwo, "Two")<br />
});<br />
<br />
this.comboBox1.DisplayedMember = "Name";<br />
this.comboBox1.ValueMember = "Type";<br />
<br />
<br />
this.comboBox1.DataBindings.Add("SelectedValue", myComObject , "Type");<br />
<br />
this.comboBox1.DataBindings.Add("SelectedValue", myComObject , "Name");<br />
<br />
<br />
I have a way to avoid this problem by wrapping of COM object like this:
<br />
<br />
public class ComWrap<br />
{<br />
public ComWrap(ComLib.ComObj ComObj)<br />
{<br />
_comObj = ComObj;<br />
}<br />
<br />
public ComLib.TypeEnum Type { get {return comObj.Type }}<br />
<br />
ComObj _comObj;<br />
<br />
}<br />
<br />
................<br />
<br />
ComWrap cw = new ComWrap(myComObject);<br />
this.comboBox1.DataBindings.Add("SelectedValue", cw, "Type");<br />
<br />
<br />
<br />
There is more elegant way to awoid this pertrub (with out using of auxiliar wrapper)?
and may be someone can point out why this occur.
THANK
|
|
|
|
|
hello all currently iam working on the project robotic arm and iam using hitec servo-422 and atmel 8051 microtroller and max 232 and i want to program it in C# to control the robotic arm to pick one object and put it another iam new in C# and i dont have any idea wht do to do please help any one ..could any one provide with any open source,links ..it will be really great and thnx in advance and also i need help wht design pattern i should use.
|
|
|
|
|
faysie wrote: iam new in C#
Why are you expecting the control of a robot to be an appropriate first project ? If you have experience in another language, you should use that, and if you don't, then you probably don't have much hope.
faysie wrote: also i need help wht design pattern i should use.
I doubt there's a pattern which is going to provide a panacea to your task. It's not typical for a pattern ( unless it's MVC, which is not a GoF pattern ), to define the nature of an entire project.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hey thnx for the reply but new ..means with hardware.. iam in website development already more doesnt mean i dont knw .. ..well its more like this but have to code in C# http://www.mavrinac.com/projects/robot/[^] regards therz always hope
|
|
|
|
|
Oh, OK. Well, you need to work out how to communicate with your hardware. If the robot uses the serial port. C# 2005 has classes to communicate with that port, so once you work out what you need to send, it shouldn't be too hard.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
yes it does work on a serial port ok ....iam getting it but its all kinda mixed up i mean wht will be to exact proecdure to follow to program microcontroller in c# or to program servo motors ..? iam usin rs232 which i serial..can u help me with the exact steps..
|
|
|
|
|
I doubt you can program the microcontroller in C#. I'd imagine that would be C or C++.
C# would likely be useful only for writing code on the PC end.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ok now i get it .......so i will be using c++ or c for serial progromming for communicating with the hardware ......u mean microcontroller .with tht servo motors .......is there any ..open source or link which can help
|
|
|
|
|
I mean, if you need to program the device, it will probably be C. For a Windows program that controls the robot from the PC, C# will work fine.
No, I've never done this. What about the article you linked to ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
ok tht article i was asking about any article on serial programming is it avaliabe ...anywhere which can be help full tutorial i mean ...cuz tht previous website i mailed the process was exactly like tht ..progammable robotic arm site..
|
|
|
|
|
i did some work using an OOPIC controller which connected to my PC via rs232.
Essentially the code was built in 2 parts. there was a stack of code written in OOPIC language and deployed on the controller board. This took care of things like making sure the servos didn't turn too far and the rates at which they moved when commanded. It also had a list of actions that it should carry out and some messages it could send back to the PC.
A winforms app sat on the desktop and sent messages down the wire to the controller.
The user might select straight on from a list of options in a combobox and select 50% on a slider to determine the speed.
The app then sent a message of 1 128 down the serial cable.
The program on the controller knew that 1 meant left and right motors equal and used the next number to be the speed in this case 128/255 of full power.
I guess that's a pattern of a sort. Keep the hardware logic on the controller at the hardware end and the more abstract concepts(go forward, turn slowly, spin on spot) on the computer.
I think serial things have improved in 2k5, i remember 2003 was a bit of a pain for serial coms.
Russell
|
|
|
|
|
can u tell me more about the deployment of code which was burn to the controller tht part i need really help ...how to do?
|
|
|
|
|
the controller came with a small but effective IDE for writing code to run on the controller board. I would assume that the manufacturers of your controller will provide either an IDE or a set of libraries for you to use to develop the code that runs on it.
Russell
|
|
|
|
|
Hi all
I read about interesting feature in MyNamepsace coming from Microsoft.VisualBasic.dll
I added a reference to Microsoft.VisualBasic.dll in my C# project, but I cannot see any classes of MyNamespaces.
Do I have to make further settings?
regards
ManuStone
|
|
|
|
|
No, the 'My' namespace is just a little bit of hand holding for the VBers, it adds literally nothing to the language, it's just a shortcut to a bunch of commonly used stuff through the framework.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It's more like training wheels for your car in case you miss the ones on your first bicycle too much.
|
|
|
|
|
Or perhaps it's more like steering wheel, pedal and seat covers, so that your new BMW 330 feels just like your old Renault 5...
---
single minded; short sighted; long gone;
|
|
|
|
|
Hey! I enjoyed my Renault 5, two cars before my first BMW, but I know exactly what you mean.
|
|
|
|
|
The following is a support file we use in Instant C#. Some of the 'My' namespace is reproduced there and other parts are converted in-line by Instant C#:
//----------------------------------------------------------------------------------------
// Copyright © 2005 - 2007 Tangible Software Solutions Inc.
//
// This file provides classes to reproduce most of the My.Computer and My.User
// functionality in VB. Calls to My.Computer.Clipboard, My.Computer.FileSystem,
// and My.Computer.Registry have been converted where they were referenced.
//
// Note: My.Settings is converted elsewhere to the standard C# Properties.Settings.
// Note: My.Resources is converted elsewhere to the standard C# Properties.Resources.
// Note: My.Application calls are redirected to the converted My.MyApplication.
//----------------------------------------------------------------------------------------
using Microsoft.VisualBasic.ApplicationServices;
using Microsoft.VisualBasic.Devices;
using System.Security.Principal;
using System.Windows.Forms;
namespace My
{
internal static class Computer
{
//Instant C# Notes:
//Calls to My.Computer.Clipboard have been redirected to System.Windows.Forms.Clipboard
//Calls to My.Computer.FileSystem have been redirected to Microsoft.VisualBasic.FileIO.FileSystem
//Calls to My.Computer.Registry have been redirected to Microsoft.Win32.Registry
internal readonly static Audio Audio;
internal readonly static Clock Clock;
internal readonly static ComputerInfo Info;
internal readonly static Keyboard Keyboard;
internal readonly static Mouse Mouse;
internal readonly static string Name;
internal readonly static Network Network;
internal readonly static Ports Ports;
internal readonly static Screen Screen;
static Computer()
{
Audio = new Audio();
Clock = new Clock();
Info = new ComputerInfo();
Keyboard = new Keyboard();
Mouse = new Mouse();
Network = new Network();
Ports = new Ports();
Screen = Screen.PrimaryScreen;
ServerComputer ThisServerComputer = new ServerComputer();
Name = ThisServerComputer.Name;
}
}
internal static class User
{
private static Microsoft.VisualBasic.ApplicationServices.User ThisUser = new Microsoft.VisualBasic.ApplicationServices.User();
internal static IPrincipal CurrentPrincipal
{
get
{
return ThisUser.CurrentPrincipal;
}
}
internal static bool IsAuthenticated
{
get
{
return ThisUser.IsAuthenticated;
}
}
internal static string Name
{
get
{
return ThisUser.Name;
}
}
internal static void InitializeWithWindowsUser()
{
ThisUser.InitializeWithWindowsUser();
}
internal static bool IsInRole(BuiltInRole ThisRole)
{
return ThisUser.IsInRole(ThisRole);
}
internal static bool IsInRole(string ThisRole)
{
return ThisUser.IsInRole(ThisRole);
}
}
}
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter, VB to C++ converter
Instant Python: C# to Python converter, VB to Python converter
|
|
|
|