|
Hi,
I have a really weird problem when deploying a couple of my C# libraries (using VS 2005). One of my libraries exposes events that are consumed by a VB6 application. Everything works great on my development computer.
When I deploy the C# assemplies on another computer (the assembles are registered properly with regasm /codebase) the VB6 application works fine EXCEPT that C# events are not triggered in the VB6 application.
So since the code works perfectly on the development computer, there must be something different about the way the DLL is registered. So do any of you know of a switch (or something) for regasm that needs to be specified in order for the events to be triggered?
Thanks.
|
|
|
|
|
I have written an application that limits how much time my teenage children are on the internet each day. It prompts them for a password. When the password box is up, they can go to the task manager (applications tab) and just kill my process. How can I protect may app from being killed that way?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
I think you should create a a new user for ur children and give minimum rights to it. It would be better to make it a guest account. You can also apply policy using Microsoft Management Console and prevent them from opening Task Manager.
But it has proved that today's children are more clever than parents.
There is a saying in URDU which translates as "The children of today are so much clever as they are trying to evaluate the Night-Fly in the day."
Mujtaba
|
|
|
|
|
I don't know about any easy way how to achieve that.
Personally I would prefer to find a non-software solution, but if you insist I would:
1. limit the account the kids are running under (if not done already). If they are admins, you can do nothing they are not able to overcome.
2. Write a service that is optionally attached to the WTSRegisterSessionNotification (WinXP+). This helps you to use their windows logon to measure the time they spend on the computer in total. Also can help to detect who is trying to overcome the security mechanism.
3. Set the service as autorestarted for any case (service settings).
4. Disable the network connectivity on the service startup (e.g. disable the ethernet card).
5. Write the communication application that is on one side communicating with the service, on other side asks for the specific username/password allowing to start the internet session.
6. The application will pass the credentials to the service.
7. Service will enable the ethernet card for use for valid credentials.
8. Logoff from the windows or from the communication application will cause the eth card to be disabled.
9. In cause the service is killed somehow, windows will restart it. Because of 4. the internet connection is disabled.
This all will pops-up some questions:
1. what is a Internet spending time - I can download a bunch of pages at all in a few seconds, then read it for a week (offline browsing)? On the other side I can download e.g. a large iso image of my school project from slow school server physically not being at the computer - meanwhile helping at home with some other tasks .
2. How to manage the software solution that someone will not simply bring in a notebook, disconnect the original computer and browse from that notebook?
3. above solution is quite difficult to manage with user-switching (although not impossible, but can be overcomed by another software running on background in suspended account waiting for the connection to be enabled from another account)
Another possibilities (solves 2):
- custom proxy - measure the time on other computer used as an authenticated proxy server. Set your network that the internet is not accessible in any other way without using this proxy. Lock proxy in secure place.
|
|
|
|
|
Hi
how can i stick an image to mouse pointer (win app)?
thanks
|
|
|
|
|
I found it myself , it was easy .
|
|
|
|
|
Anyone knows where I can start about starting to write an application that would help in diagramming?
Got a coding problem? Hand it to the CodeDevil! Its the idiot who stops learning and the wise that keep asking you questions!!!!
|
|
|
|
|
Hello,
I'm still a beginner, and i need some help.
I wish someone can tell me,
1- How can I Copy a file in the Hard-Disk from a place to another, using a C# Code?
2- How can I encrypt my Source code in deployment?
Thanks in advance
Bagie
|
|
|
|
|
Bagie wrote: 1- How can I Copy a file in the Hard-Disk from a place to another, using a C# Code?
Using File.Copy() method.
Bagie wrote: 2- How can I encrypt my Source code in deployment?
If you mean to prevent -to some extent- decompiling your exe, use Dotfuscator[^].
Regards
|
|
|
|
|
|
Is there anyway when using the beginrecieve method for a socket bounded to listen on a udp port to find out who is sending the data (remote ip address)?
|
|
|
|
|
Use
BeginReceiveFrom
specify the remoteEP parameter as new IPEndPoint(IPAddress.Any, 0) . This will allow you to receive from any sending peer (or you can limit it here to receive only from specific address or port).
Then use EndReceiveFrom to find who's sent the packet. (details in documentation)
|
|
|
|
|
i was googling and found some thing interesting
it require adobe reader installed on our system
then go to tool box right click -> choose items
in com components go for adobe acro....
put hat on your form on the loading event of form just type
<br />
axAcroPDF1.LoadFile("your file name goes here");<br />
yeah i know you can make it sofisticated (using open file dialog box etc)
then what are you waiting for
|
|
|
|
|
Hello everybody in this great forum , it has been long time since i posted my last question. so here it goes .
i need to know how can i manupliate the current installed codecs for video capturing on the computer and then choose one from them to compress the video and then know how to use it to decompress and display the video image back to its original case ????
is there anyone can help me in this please.
Human knowledge belongs to the world.
|
|
|
|
|
I've been looking through my samples of code and my book but I can't find what I need.
I'm mainly wondering if I can convert string to int somehow...?
string tempValue;
string tempValue2;
string upc;
tempValue = upc.Substring(0, 1);
tempValue2 = upc.Substring(2, 1);
txtTempValue.Text = tempValue + tempValue2; //instead of displaying in 13 string format, I need 1 + 3 = 4, but below it must be in string format so that I can make sure the user entered it in a specific format: mmmppp-c
//Validate UPC format.
if (upc.Length != 8
|| upc.Substring(6, 1) != "-")
{
MessageBox.Show("UPC format is required in mmmppp-c format.",
Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
txtUpc.Focus();
return;
}
Whenever I try to convert string to int I keep recieving the message, cannot implicitly convert to string to int.
What I've tried that seemed like it should work::::
txtTempValue.Text = (decimal) tempValue + (decimal) tempValue2; //didn't work at all
Any help at all would be appreciated
|
|
|
|
|
decimal n = Convert.ToDecimal( tempValue);
led mike
|
|
|
|
|
Bobbydoo8 wrote: Whenever I try to convert string to int I keep recieving the message, cannot implicitly convert to string to int.
You can't implicitly convert a string to an int, so you have to do it explicitly:
int value = int.Parse(upc.SubString(0, 1));
What I've tried that seemed like it should work::::
txtTempValue.Text = (decimal) tempValue + (decimal) tempValue2; //didn't work at all
What you tried was a cast. Some data types can be cast to others, like casting an int to a double, but that is only allowed where the conversion is a simple. Parsing a string can be quite complicated, so that requires an explicit conversion.
---
b { font-weight: normal; }
|
|
|
|
|
Thank you very much for the advice got them both to work correctly now with int value = int.Parse(upc.SubString(0, 1)); and decimal n = Convert.ToDecimal( tempValue);
You guys are awesome thank you very much, maybe now I can get my homework done.
|
|
|
|
|
Is there a way to do this? I havent been able to figgure it out? i would appreciate any help.
|
|
|
|
|
DataSet.ReadXml
led mike
|
|
|
|
|
I tried that, but it wont read the data file i have.
|
|
|
|
|
never mind....I forgot to initialize the dataset Variable. doh!
|
|
|
|
|
I'm sure I'm overlooking something embarrasingly obvious here, but...
In my VS 2003 projects, each file was wrapped in a common namespace. I typically derive a base page class from the system ui page, and then derive all my pages from it so that I can use it for common page code. No problemo.
However, I just discovered that VS 2005 doesn't wrap namespace code around all the pages. Consequently, when deriving my pages from my base page class, the compiler complains that it can't find a class or namespace matching the name the base page class I've created.
It was my understanding that everything was a member of the implicit global namespace, so I don't know why the class name isn't recognized. I put it in it's own .cs file & added to the project.
Anyway, I'm sure it's some glaring little thing I'm overlooking, but if someone could set me straight I'd be most grateful.
Thanks!
|
|
|
|
|
The "Web Site" project in VS05 is a fundamental shift in architecture from the web projects in VS03. The web site projects are operate less like applications and more like content managed web sites. Web pages get indivually compiled into their own dlls by default and as such, don't belong to a namespace. You could manually add namespaces and configure the project to compile to a single dll, however, I would recommend that you install the "Web Application" project, which didn't ship with VS05 but is available for download from:
http://msdn2.microsoft.com/en-us/asp.net/aa336618.aspx[^]
The Web Application project is more consistent with the VS03 web projects and is easier to manage as a complex application.
|
|
|
|
|
Thanks, Jim. That's useful info about web sites versus applications.
As it turns out, moving the .cs file to the App_Code folder makes it globally accessible. Not particularly intuitive, but kinda nice from a file management perspective.
|
|
|
|