|
How can you tell it's not because of an exception?? Your code is eating all the exceptions and not doing anything with them.
After looking at the code, you should be asking yourself what happens when the code enpties the queue and tries the dequeue an item from empty queue? Your not checking any parameters nor return values/objects to see if they really exist before using them, nor do you do anything with any exceptions that are thrown.
|
|
|
|
|
Thank you for your reply.
The program is eating all the exception to prevent it quit the procedure, but it will write some Error Log in a XML File (I did not post that part of code because it return no error before it stop, Sorry for my lazy).
And you talk about the checking of dequeue an item from empty queue, am I wrong using Do Unit ClientRequestQueue.Count = 0 ???? And I am think it will not enqueuing nothing to the equeue because I have some checking before Enqueuing the ClientRequest Object but I will try your suggestion to check it once more.
BTW, maybe I should describe more how can I seem this issue.
When I start this program, I have another testing program to send requests to it endlessly.
My testing program only send 2 Requests, suppose they are Occupy and Release. Means the testing program will keeping occupy some empty slot and release it in 2 second. (E.g. Occupy => Sleep(1000) => Release => Sleep => So On)
It is fine at the beginning about 3 mins but it stopped after it.
I hope you can read my poor english. Thank you very much for your attention and help
|
|
|
|
|
How can i create a application for hiding Process from Task Manager.
If you any idea Please help.
Thanks
Anubhava Dimri
|
|
|
|
|
Me.ShowInTaskbar = False ?
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Me.ShowinTaskbar = False hides only Application Name from Windows Task manager.But i want to hide the Process of that application.
Anubhava Dimri
|
|
|
|
|
Ahh I see, I dont think it is possible to hide a process from the process tab of task manager.
Lloyd J. Atkinson
"Logic will get you from A to B, but imagination will take you everywhere" - ALbert Einstein
I look at Microsoft, and turn to my poster on the wall saying: "Bang head here in case of stress".
|
|
|
|
|
Not possible. Every process the system is running, including high-security processes internal to Windows, is shown in the Task Manager.
You also couldn't have any valid reason for doing this unless your intent was malicious.
|
|
|
|
|
Dave Kreskowiak wrote: You also couldn't have any valid reason for doing this unless your intent was malicious.
When seeing this type of inquiry, that's first thing that comes to mind
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
You can hide process and you can also make unkillable.
Search in rootkit.com for rootkit code that hides process and makes them invincible.
ZwQuerySystemInformation
and
ZwTerminteProcess hook to manipulate the response, you have to make driver module.
|
|
|
|
|
AFAIK you can't and there's no reason to.
The need to optimize rises from a bad design
|
|
|
|
|
Mika Wendelius wrote: there's no reason to.
Perhaps only for malicious reasons.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Yap, that seems the only possible (and the worst) reason.
The need to optimize rises from a bad design
|
|
|
|
|
Certainly.
System.Diagnostics.Process.GetCurrentProcess().Kill()
There is no way to hide it from the Process tab in Task Manager other than killing the process. This is a security measure, and you should not be trying to circumvent it
|
|
|
|
|
If it's that critical, just rename your 'process' to something less conspicuous. Use a little imagination.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
|
|
|
|
|
hi guys, I have a problem, how can I load the picture from file and attach into my datareport,
the problem is, I used Vb6 and ms access 2003 for my backend. In my database barangayClearance, table name is brgyResident and i have a field url for picture path. And in my form that url I named it sFile for variableName. How can i load the picture using the sFile Variable. here is my code
Private Sub btnRequestClearance_Click()
Dim sFile As String
sFile = lblFilePath.Text 'getting image path
Dim cn As New ADODB.Connection
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.JET.OLEDB.4.0;Data Source=" & App.Path & "\barangayClearance.mdb;Persist Security Info=False;"
On Error Resume Next
Dim RS As New ADODB.Recordset
Set RS = Nothing
Set RS = New ADODB.Recordset
RS.Open "Select * From brgyResident Where ID = " & ListView1.SelectedItem.Text & "", cn, adOpenStatic, adLockOptimistic
Set DataReport2.DataSource = RS
Set DataReport2.Sections("section1").Controls("Image2").Picture = LoadPicture("sFile" & DataEnvironment1.rscmdSample.Fields(17).Value)
DataReport2.Show vbModal
End Sub
I used DataEnvironment1, connection is cmdSample and DataReport2.
I need to place the Picture in Section1, Image2
anyone who knows, plz help me...
hbaluyot@gmail.com
|
|
|
|
|
I have integrated a feature of plesk 'download backup' which returns the HTTPWebResponse Type Object and i am unable to download the file which it points to . Please help urgently with some code sample.
Thanks in Advance
|
|
|
|
|
I'm hoping to discover what is causing the following security error when I try to automate excel and open a new workbook:
Security Exception was unhandled
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I am using the following code (which I have used before with no errors):
Dim oXL As Excel.Application
Dim oWB As Excel.Workbook
Dim oSheet As Excel.Worksheet
'Dim oRng As Excel.Range
Try
'Grab a running instance of Excel.
oXL = Marshal.GetActiveObject("Excel.Application")
Catch ex As Exception
'If no instance exist then create a new one.
oXL = New Excel.Application
End Try
'Start Excel and get Application object.
If oXL Is Nothing Then
Throw New Exception("The Excel libarary could not be loaded. " & _
"You may have an incorrect version of Excel installed. " & _
"Please consult your system administrator. The instantiation " & _
"failed without an exception.")
End If
oXL.Visible = True
'Get a new workbook.
oWB = oXL.Workbooks.Add
oSheet = oWB.ActiveSheet
Anyone have any ideas what I am doing wrong here?
Thanks,
Craig
"That rug really tied the room together."
|
|
|
|
|
Hello everybody,
I want to repair bitmaps where the major part of the picture is shifted to the left by 12 pixels.
So basically I have to shift all the pixels to the right first. To re-complete the picture, the pixels that 'fell over the right edge' (when shifting) have to be 'glued' to the left side. I hope this expression is good enough to explain.
Could someone please give me some leads
a) if this is possible in general (with VB Express)?
b) which techniques / methods I should focus on?
Maybe someone of you has a good idea how to solve that - or at least knows some links that I could examine.
Thank you
Michael
|
|
|
|
|
you can use a function like this:
Function fshiftimage(ByVal sImage As String) As Bitmap
Const nShiftPicels As Integer = 0
Dim iOldImage As Bitmap = Image.FromFile(sImage)
Dim iNewImage As New Bitmap(iOldImage.Width, iOldImage.Height)
Dim cColor As Color
For nX As Integer = 0 To iOldImage.Width - 1
For nY As Integer = 0 To iOldImage.Height - 1
cColor = iOldImage.GetPixel(nX, nY)
iNewImage.SetPixel((nX + nShiftPicels) Mod iNewImage.Width, nY, cColor)
Next
Next
Return iNewImage
End Function
|
|
|
|
|
WOW - Thank you Jan, that sounds promising!
Sorry for another question (I'm pretty new to VB): Do I understand it right that I replace the value of the constant nShiftPicels (in your example 0) with the number of pixels that I want the image to be shifted?
|
|
|
|
|
With an 8MB bitmap the above function throws an "out of memory exception" at the second line (Dim iOldImage As Bitmap = Image.FromFile(sImage)).
The reason for this must be that it is a DPX Bitmap - the function works fine with standard formats as JPG. Searching for details I found that only a few bitmap formats are supported by GDI+.
Is it possible to expand the GDI possibilities or do I have to drop the idea to use the function?
Thank you in advance
Michael
modified on Monday, September 29, 2008 9:32 AM
|
|
|
|
|
Sorry, nut here I cant help. I think closing all other apps will maybe help. It seems that the complete picture must fit into memory.
Maybe someone else has an idee
|
|
|
|
|
Yes the const means the sift in pixels
You can even adapt the function and make it a parameter
Jan
|
|
|
|
|
Thanks for looking again, Jan.
Your function (slightly adapted) works fine with JPG, BMP etc., while i tried to open and modify a DPX bitmap. Meanwhile I found out from the help files GDI-Grafikformate that GDI+ does only support a limited number of standard formats (like JPG, BMP etc.). So the error messages neither had to do with my memory nor with your function.
|
|
|
|
|
I have a small VB app that is supposed to pull a set of records from an IBM DB2 Database and populate them into my vbapp. I know my DB2 connection works because I have several other reports that can access it. I am creating the connection string on the fly... but something is getting confused in the connection string. I've tried moving my connection strings around, but nothing is seeming to work.
When I run the app... I get the following message.
...Drivers SQLSetConnectAttr failed...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim startdate As String = DateTimePicker1.Text
Dim enddate As String = DateTimePicker2.Text
Dim statement As String = "SELECT DICT_NAME FROM DS004T01 WHERE SYSTEM_PREFIX = 'VL' and TYPE_DATE >= '" + startdate + "' and type_date <= '" + enddate + "'"
Dim cmd As Odbc.OdbcCommand
Dim hl7reader As Odbc.OdbcDataReader
Dim sql As String
Dim tmp1 As String
Dim conn As Odbc.OdbcConnection = New Odbc.OdbcConnection("driver={IBM DB2 ODBC DRIVER};Database=xxxx;hostname=xxx.xxx.xxx.xxx;port=xxxx;protocol=TCPIP; uid=xxxxxxx; pwd=xxxxxx")
Try
conn.Open()
sql = statement
cmd = New Odbc.OdbcCommand(sql, conn)
hl7reader = cmd.ExecuteReader
Do While hl7reader.Read
tmp1 = hl7reader("dict_name")
ComboBox1.Items.Add(tmp1)
Loop
Catch ex As Exception
MsgBox("Error" & ex.Message)
End Try
End Sub
|
|
|
|