|
Interesting Article on this E-mail-monitoring-may-contravene-European-laws[].
From what I have read, here in Europe, where I am an app on the PC monitoring and reporting internet usage would be in breach of European human rights legislation unless there was a company policy previously in place and enforced stating that the internet cannot be used from company machines for personal use, and that all traffic will be monitored to log business usage (which is lawful).
So, what is the purpose of a monitoring application, to enforce the company policy or to check what people are viewing? Enforcing policy would be better done by regulating site access on the proxy server, and checking usage is also best done there even when illegal.
So my read on this is that anyone installing software (or writing software for installation) on an end user PC for the purpose of reporting on their internet usage is very likely acting in breach of European law, if that is where the software is used. Seeing as we had a high profile case of a British Hacker being extradited to the U.S. for contravening their laws (not British law where he lived) there is no way I would get involved in something like this, and I would advise anyone else to stay well away. You just don't know where the software will end up with your name on it.
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Thanks for reply
After consulting with cliet, when i told him that this is against human rights. he said to me that he wants to know only domain names not full URL with query data. he wants to know the domain names like songs.pk, mp3pk.com, yahoo.com, youtube.com etc
atcually he told his employees not to use unnecessary sites at working time because it effects the work.
after long waiting he decide to get such application that could tell him about the domain names opened on particular system.
when he check out at the server he get all the url requested and found that employee open youtube.com and watch the vedio at working time. so he wants to stop that particular employee.
thats why he wants to get this application.
|
|
|
|
|
you can use monitoring sofwares like keylogger.
If you can think then I Can.
|
|
|
|
|
A key logger does nothing in this case. Sure, you can get a URL, but you cannot use the content of a site and classify it.
|
|
|
|
|
Hello to All,
How can i secure my application to Reflector or Dissembler. How can i Protect my applications Code to Decompilers.
Your help is needed.
Thanks
If you can think then I Can.
|
|
|
|
|
We work with the .NET Reactor[^] which works pretty fine for me...
|
|
|
|
|
Actually i wanna help without purchasing any application.
I am not customer.
If you can think then I Can.
|
|
|
|
|
Check out dotfuscator[^]. A free community edition of this shipped with Visual Studio 7.1
If you have knowledge, let others light their candles at it.
Margaret Fuller (1810 - 1850)
www.JacksonSoft.co.uk
|
|
|
|
|
Thank u sir
If you can think then I Can.
|
|
|
|
|
Though, anyone with Reflector will still be able to open the assembly and see code. It's just going to be harder to follow.
There are no free solutions to this little problem.
|
|
|
|
|
This free tool will obfuscate the code and prevent Reflector from viewing it. The IL can still be viewed with ildasm though.
http://www.lukesw.net/apps/ProtectorLite.aspx[^]
Have you tried the Krypton Toolkit? http://www.componentfactory.com/free-windows-forms-controls.php
|
|
|
|
|
Pretty nice. Never heard of it until now.
|
|
|
|
|
Thank you sir. This is really very good.
Thank u very much
If you can think then I Can.
|
|
|
|
|
But it's dengrous for development site. that means .Net Framework compiler is works very basic compilation of code or .Net application is not fully protected.
Whether C++,MFC application are not doing that.
If you can think then I Can.
|
|
|
|
|
Original error-free code is this:
If .resoi.Fields.Item("rtype").Value = "M" Then
x = .sio.Fields.Item("rpop").Value * .itemsi.Fields.Item("ireptime").Value * wage * .iri.Fields.Item("trqtyrqrd").Value
.siro.Fields.Item("alaborcost").Value = .siro.Fields.Item("alaborcost").Value + x
.sro.Fields.Item("arescost").Value = .sro.Fields.Item("arescost").Value + x
.siro.Fields.Item("alaborhrs").Value = .siro.Fields.Item("alaborhrs").Value + .sio.Fields.Item("rpop").Value * .itemsi.Fields.Item("ireptime").Value * .iri.Fields.Item("trqtyrqrd").Value
End If
Goal: lower-case “m” RTYPES are ignored. Better if converted to upper-case. This older VB program was converted to VB 2008, and uses an MS ACCESS 2002 db for i/o (relevant?). Attempts to revise code generate the error message (shown here at bottom), which points NOT to the IF statement, but to the italicized line 2 lines later. Any ideas? Thank you. Dave
Attempted fix #1: adding “.ToUpper()” to IF statement creates “no current record” error message, shown below.
If .resoi.Fields.Item("rtype").Value.ToUpper() = "M" Then
Attempted fix #2: changed IF statement to read:
... = (“m” OR “M”) THEN
Attempted fix #3: changed IF statement to read:
... = IF(... = “M”) OR (... = “m”) THEN
Attempted fix #4: changed IF statement to read:
... = IF(... = “M”) OR (... = “m”) THEN
Attempted fix #5: removed IF statement and END IF statements altogether - STILL got the error.
Error message:
COMExeption was unhandled (in heading)
No current record (suggests i/o problem)
Check the ErrorCode property of the exception to determine the HRESULT returned by the COM object.
Get general help for this exeption.
|
|
|
|
|
Please tell me you're not using the old ADODB objects you used in VB6? Scrap it and rewrite using ADO.NET instead.
VB 123 wrote: If .resoi.Fields.Item("rtype").Value = "M" Then
x = .sio.Fields.Item("rpop").Value * .itemsi.Fields.Item("ireptime").Value * wage * .iri.Fields.Item("trqtyrqrd").Value
.siro.Fields.Item("alaborcost").Value = .siro.Fields.Item("alaborcost").Value + x
.sro.Fields.Item("arescost").Value = .sro.Fields.Item("arescost").Value + x
.siro.Fields.Item("alaborhrs").Value = .siro.Fields.Item("alaborhrs").Value + .sio.Fields.Item("rpop").Value * .itemsi.Fields.Item("ireptime").Value * .iri.Fields.Item("trqtyrqrd").Value
End If
I wouldn't call this "error-free code". It may run as expected, but it makes a LOT of assumptions about the data and relies heavily on VBs implicit conversions. That is not good practice. I'd start by opening up the project properties and turning on Option Strict. You'll then have to rewrite the code to explicitly do conversions to known data types, but only after checking the fields for convertible data. For example, you can't convert a DbNull to an Integer.
|
|
|
|
|
OK. Looks like this is a "tip of the iceberg" problem from converting VB6 to VB 2008 .net. I'll get started. Thanks!
|
|
|
|
|
Yeah, I pretty much recommend just scrapping an old VB6 project and rewriting from scratch.
You CAN use the upgrade wizard to convert a project, but no converter does a perfect job and rewrite is inevitable. You just gain the advantange of being able to rewrite modules of the code when possible instead of having to rewrite the entire solution all at once. But, in the end, you'll still be rewriting the whole thing.
|
|
|
|
|
This program IS a wizard-converted VB6. Re-writing modules of code might not help - I would have re-written the code to look just like it does, which doesn't work. Your original point is the key, to set the options to strict data conversions, and re-write the db I/O parts. Thanks again.
|
|
|
|
|
Hi.
I have a rather perplexing problem when printing a file.
My application reads a file in from a folder, lists it in a ListView control and then sends it to the printer.The problem I'm having is that when I send it to a printer the text is preceded by half a page of block characters before the actual text starts. As a sanity check, I went back and tried printing from a textbox on my form and it worked perfectly.
Does anyone have any ideas on how I can look at the bytes coming in from the file and going out to the printer or what may be wrong?
Here is my print code:
Private Sub PrtTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrtTest.Click
Try
Dim _fs As FileStream
_fs = New FileStream("C:\Components\Test-Page1.txt", FileMode.Open, FileAccess.Read)
_Printstream = New StreamReader(_fs)
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Me.pd_PrintPage
pd.PrinterSettings.PrinterName = _printername
PrintPreviewDialog2.Document = pd
PrintPreviewDialog2.ShowDialog()
If pd.PrinterSettings.IsValid Then
pd.Print()
Else
MessageBox.Show("Printer is invalid.")
End If
Catch ex As Exception
MessageBox.Show("An error occurred while printing", _
ex.ToString())
End Try
End Sub
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
Dim numChars As Integer
Dim numLines As Integer
Dim stringForPage As String
Dim strFormat As New StringFormat
Dim PrintFont As New Font("Arial", 10, FontStyle.Regular)
Dim PrintString As String = _Printstream.ReadToEnd
Dim rectDraw As New RectangleF( _
ev.MarginBounds.Left, ev.MarginBounds.Top, _
ev.MarginBounds.Width, ev.MarginBounds.Height)
Dim sizeMeasure As New SizeF(ev.MarginBounds.Width, _
ev.MarginBounds.Height - PrintFont.GetHeight(ev.Graphics))
'PrintString = _Printstream.ReadToEnd()
strFormat.Trimming = StringTrimming.Word
ev.Graphics.MeasureString(PrintString, PrintFont, _
sizeMeasure, strFormat, numChars, numLines)
stringForPage = PrintString.Substring(0, numChars)
ev.Graphics.DrawString(stringForPage, PrintFont, _
Brushes.Black, rectDraw, strFormat)
If numChars < PrintString.Length Then
PrintString = PrintString.Substring(numChars)
ev.HasMorePages = True
Else
ev.HasMorePages = False
End If
End Sub
|
|
|
|
|
The text you are reading in from the file will have non printable control charachters.
You will maybe want to read the file into a buffer and then strip out the non printables. Look up an ASCII table to see the the codes at the start of the table.
There are probably some methods in the encoding classes that can do this for you, but don't know off the top of my head.
|
|
|
|
|
Thanks for the reply Dave. I was thinking that the problem may be something like that. I assume (yes, that can be dangerous)that I could use the standard ASCII class regular expression [\x00-\x1F\x7F] to filter out the control characters(I believe ASCII and UTF-8 chars are the same in this range). I'm wondering whether I would need a buffered stream in place of the StreamReader that would wrap around the filestream or do I still need the StreamReader. Also, will I need to reformat the stream before sending it out to the printer? I'll have to consider how much overhead this will add to my app.
Let me know if you have any advice on this. Thanks again.
Randy
|
|
|
|
|
Hi there,
wonder if you can help...
I have a piece of VB code which uploads 2 large XMLs to SQL and then more code which allows the manipulation of the data to provide various bits of info which is then presented to Excel..
I was initially uploading each test XML file which were about 40K lines which made 16K Rows in each SQL table. I could then compare the two tables.
The implementation requires XMLs of around 660K lines which, after uploading, become 144763 and 146741 rows in each table in SQL.
My problem is that the statement I was using to compare these two tables, which worked with test data fails (no error is given)
here is the code:
<br />
SQLStr = "Select * into Temp_Delete_Oldest from " & First & " Select * into Temp_Delete_Newest from " & Second & " <br />
DELETE Temp_Delete_Oldest FROM Temp_Delete_Oldest INNER JOIN Temp_Delete_Newest ON Temp_Delete_Newest.Fullpath = Temp_Delete_Oldest.Fullpath"<br />
This works in SQL when it is entered as a New Query but fails when implemnted from the VB code.
So, does anybody know why this fails and what I can do to stop it failing, bearing in mind it works with smaller SQL tables....
Cheers
nhsal69
|
|
|
|
|
Why don't you catch the exception and read what it tells you... That may help?
|
|
|
|
|
The error generated is:
A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Which is not really of any help, as this is the standard error when anything goes wrong when working with SQL from VB....
|
|
|
|