|
And in the meantime in a multi-user / multi-threaded environment another process has picked up the file that was "protected" before your process can get in there and change it back.
|
|
|
|
|
There were no requirements given in the original post. Not all solutions apply in all situations. It's up to the poster to determine what is appropriate - not you.
|
|
|
|
|
The JZ wrote: There were no requirements given in the original post
Actually, there was. The OP wrote "For example y need intercept when the user or other program try modify or delete or open a file and after ALLOW or NO ALLOW these actios".
The OP clearly states the need to "intercept" and "allow" or "no[t] allow" the operations. Your solution did not do that. It did monitor the action and correct it after the fact. That is not the same as the OP was asking - He didn't want the action to happen in the first place.
|
|
|
|
|
There were no requirements pertaining to multi-users or multi-threading, as you posted. The question was to intercept file operations. There were no requirements as to how to that - user requirements, environment requirements, and so on. The only requirement that can be assumed is that VB must be used since this is a VB forum.
I felt I had an idea to share. If you did not like my idea, I do not care. But if I feel I can provide an idea, I will continue to do so.
|
|
|
|
|
The JZ wrote: There were no requirements pertaining to multi-users or multi-threading, as you posted.
Yes, there was. It is running on Windows therefore the requirement exists by default. Just by booting windows you have many processes and services starting up - each of these has at least one thread, and they all run in many user accounts. A user is not necessarily a physical person.
The JZ wrote: The question was to intercept file operations.
Yes, and that file operation would have to be made on some other thread somewhere otherwise what's to intecept. So that accounts for the multi-threaded part. And since threads can have different user security contexts that accounts for the multi-user part.
The JZ wrote: If you did not like my idea, I do not care
You are arguing - therefore you care.
|
|
|
|
|
SO.....in resume ?
can i do it with VB or not?
i think that people have diferents ideas, but is good all Replys.
i want only controll with my application:
for example:
when a program try open "c:example.txt", my application notify to me
"heeey program JON DOE(any example) want modify this FILE" and I clic
ACEPT or DENY.
LIKE Windows Vista is other good example. When you execute a program
Vista ask you..."really, you want execute this program?" and you clic ACEPT or CANCEL
|
|
|
|
|
|
This is not a right place to post what you just posted
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Where is the right place then?
Kevin
|
|
|
|
|
|
Well, as this is a VB forum I thought it would be more appropriate to mention it in a VB forum! It does say "Visual Basic / VB.NET discussions" after all.
Plus I thought that posting it here would avoid the usual hysterical anti-VB rants that you get elsewhere in Code Project.
Kevin
|
|
|
|
|
You are Right but in the VB Forum we expect only coding or Technical Questions and for more info about vb or any languages that you have to share,then General Discussions Forum will be appropriate for it. we do go to Discussions Forum and we will get the info there
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Hi,all
iam facing problem that how i assign value to columnspan property of tablecell.
i have two values start_cell_number and end_cell_number
for suppose cell number 4 to 8 i want merge these cells i mean it will be one cell
how i do that .
please give me hint or any suggestion.
any help or hint ?
Regards
Rameez
|
|
|
|
|
I'm trying to figure out what you are talking about until I realised you cross posted from the ASP forum. Where this belongs.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for your reply ,
its actually asp.net question sorry for posting here . iam using table server control for displaying data from database visullay
Again sorry for mistake .
Regards
Rameez
|
|
|
|
|
Hi
I am developing a software and i am using a exe in my programe. and i want to change the exe Icon using my software. how i do this.
Please suggest.
Thanx
~Khatri Mitesh
|
|
|
|
|
In the Project's properties.
|
|
|
|
|
I want to change the exe icon from other exe.
Thanx
~Khatri Mitesh
|
|
|
|
|
~Khatri Mitesh~ wrote: I want to change the exe icon from other exe
Can you really do this?
|
|
|
|
|
Just use another program to do it. I'm sure you can do it in code but I don't know how. A search[^] will help.
|
|
|
|
|
Ive seen a program that was written in Visual Basic 3 Profesional (old or what?) that can read all the icons in a exe/dll file.
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".
|
|
|
|
|
Can u Provide me that code of vb that change the exe icon.
Thanx
~Khatri Mitesh
|
|
|
|
|
Hiya!
I eventually found something similar to the original:
API:
Private Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Int32, ByRef phiconLarge As IntPtr, ByRef phiconSmall As IntPtr, ByVal nIcons As Int32) As Int32
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim FileName As String = "%SystemRoot%\system32\shell32.dll"
Dim Index As Integer = 1 'Change number here for the icon.
Dim icoLarge As IntPtr
Dim icoSmall As IntPtr
ExtractIconEx(FileName, Index, icoLarge, icoSmall, 1) 'This number (from what I can undrstand) will give you an alternative icon for the specified index.
If Not icoLarge.Equals(IntPtr.Zero) Then
Dim i As Icon = System.Drawing.Icon.FromHandle(icoLarge)
PictureBox1.Image = i.ToBitmap
End If
If Not icoSmall.Equals(IntPtr.Zero) Then
Dim i As Icon = System.Drawing.Icon.FromHandle(icoSmall)
PictureBox2.Image = i.ToBitmap
End If
End Sub
Hope that helps, you could set the Index to the number of a NumericUpDown component!
Lloyd A.
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".
|
|
|
|
|
please help...
i have a problem when exporting excel from crystal report 2008.
i got this error: "Invalid export DLL or export format."
previously my crytal report was CR10 then i upgraded it to CR 2008.
but when i make a new project it works properly...
thanks a lot...
jyn
|
|
|
|
|
Have you tried contacting Crystal Reports support?
"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
|
|
|
|