|
You are the best man.... Thanks many times....
|
|
|
|
|
Does anybody have a tested working example of the ReadProcessMemory API,
written in VB.net that they could kindly post?
Including correct declarations.
Thank You.
|
|
|
|
|
About the best article there is, using ReadProcessMemory, on CP is this[^] one. It's in C#, but the code is convertable to VB.NET.
I've used his code in an application myself, without any problems. I'll be putting an article together fairly soon that uses that very same articles code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:15 Sunday 29th January, 2006
|
|
|
|
|
Thank you for your reply.
I am aware that the internet is full of code examples of ReadProcessMemory in C#, C++ ect, but I can never get the conversions to work, which is why I am looking for a code snippet in VB.net to work out where I have gone wrong.
Thanks again.
PS Is your application in VB.net?
|
|
|
|
|
|
|
Thank you Duncan,
I found your code elsewhere after I posted my original request.
It looks very interesting and hopefully the solution I am looking for.
Thanks all.
I
-- modified at 10:05 Monday 30th January, 2006
|
|
|
|
|
I have tried the following code but get:
An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication2.exe
Additional information: Object reference not set to an instance of an object
<br />
'public static extern int AVIFileCreateStream(int pfile, out IntPtr ppavi, ref AVISTREAMINFOW psi); (C#)<br />
Declare Function AVIFileCreateStream Lib "avifil32" Alias "AVIFileCreateStream" (ByVal pfile As Int32, ByVal ppavi As IntPtr, ByRef lParam As AVISTREAMINFOW) As Int32<br />
<br />
Private _aviFile As Int32 = 0<br />
Private _aviStream As IntPtr<br />
<br />
Dim aviStreamInfo As AVISTREAMINFOW = New AVISTREAMINFOW()<br />
(then set some attributes)<br />
<br />
_result = AviFile.AVIFileCreateStream(_aviFile, _aviStream, aviStreamInfo)<br />
The problem occurs on the last line. This was part of my C# to VB conversion attempt of
http://www.codeproject.com/cs/media/aviFileWrapper.asp[^]
[^]
|
|
|
|
|
hmm, have to remove the stuff after .asp on that link thanks.
|
|
|
|
|
I'd say an out parameter also needs to be byref.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
problem still occurs with this, after changing to by ref, unless u meant change it another way?
<br />
Private _aviFile As Int32 '(or = 0 as well)<br />
Private _aviStream As IntPtr<br />
Dim aviStreamInfo As AVISTREAMINFOW = New AVISTREAMINFOW() '(and fill some vals)<br />
<br />
Declare Function AVIFileCreateStream Lib "avifil32" Alias "AVIFileCreateStream" (ByVal pfile As Int32, ByRef ppavi As IntPtr, ByRef lParam As AVISTREAMINFOW) As Int32<br />
<br />
_result = AviFile.AVIFileCreateStream(_aviFile, _aviStream, aviStreamInfo)<br />
thanks
|
|
|
|
|
I wish to make an object tracking algorithm.
My aim is to identify the finger by a web cam
and control the mouse pointer corresponding
to the movement of the finger.
can you help me to complete this poject?
please inform about the active x control
that can be used for this purpose
thanks for informations
|
|
|
|
|
Georgekutty wrote: please inform about the active x control
that can be used for this purpose
In other words, you hope that someone else has written the code to do this, and you can just call it ? That means you have no desire at all to make an 'object tracking algorithm'.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
my data is loaded to data grid using dataset,,
now i want to put a button when i press on it it will save the changes permanent to my database...
thanks...
|
|
|
|
|
You can iterate through the rows of a datagrid and check if a row is new, if it was deleted, or if it's been changed. Once you do this, you'll know what data to pass back to the database.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote: You can iterate through the rows of a datagrid and check if a row is new, if it was deleted, or if it's been changed. Once you do this, you'll know what data to pass back to the database.
How could we do that?
|
|
|
|
|
|
Thank you very much for your answer.
|
|
|
|
|
Hello!
It is me again!
Could you please let me know how I could detect a plugged or unplugged deviced to usb port? A code sample would make me happier..
Thank You!
Bedri
|
|
|
|
|
|
Hi,
In VB.net, how can i know the results of Obj.GetText without running the code and using messagebox to display it?
thanks
|
|
|
|
|
You either have to know the object that you calling GetText on very, very well, or consult a Ouji board.
Other than that, the best way is to step through the code in the debugger and watch what happens to the variable contents.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello
I am new to VB.net and have a form where I am trying to update an Access database from a datagridview that I databound on the fly. However when I change something on the grid and press the update button it would seem that the dataset has accepted the changes, but when I next look at the grid, it hasn't updated. Can I use a SELECT statement in the way that I have?
Am I doing something wrong in the code, or is there something in the grid properties that I need to change?
Many thanks
Trimtrom
Public Class frmManual
Dim dcManual As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Nwind 97.mdb")
Dim daManual As OleDb.OleDbDataAdapter
Dim dsManual As New DataSet
Dim strSQL As String
Private Sub frmManual_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
strSQL = "select * from employees"
Try
daManual = New OleDb.OleDbDataAdapter(strSQL, dcManual)
daManual.Fill(dsManual, "Employees")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Me.dgManual.DataSource = dsManual.Tables("Employees")
End Sub
Private Sub cmdUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdUpdate.Click
Dim ans As String
If (dsManual.HasChanges) Then
ans = MsgBox("Changes have occurred!" & vbCrLf & "Do you wish to update?", MsgBoxStyle.YesNo + MsgBoxStyle.Information, "Updates")
If ans = vbYes Then
Try
dsManual.AcceptChanges()
daManual.Update(dsManual.Tables("Employees"))
Catch exManual As Exception
MsgBox(exManual.Message)
Throw exManual
Finally
End Try
MsgBox("Table updated!", MsgBoxStyle.Critical, "Employees")
End If
End If
End Sub
End Class
|
|
|
|
|
Dear All
Hello, How can make a print preview in VB6.0 with API and VB functions. Without any Other .OCX Files.
|
|
|
|
|
Hello!
I have a picturebox (width=60, Height=60) size mode is set to Strechimage. I am loading an image to picturebox which has bigger size and then I want to save this image back to hard disk with smaller size (size of picturebox)?
Can you show me how to do that please?
Thanks!
Bedri
|
|
|
|