TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
vidhya_bala2003
NA
20
0
Threading problem
Jan 28 2005 2:34 AM
hello, In my project i'm having a seperate class(Memory) for reducing the memory consumption function. I'm not able to create and start the threading concept. I used the following coding to create the thread but it shows me an error in the addressof operator stating that " Signature of Savememory function doesn't suits with Threadstart delegate signature. " 'This class utilizes the reduce memory function Public Class Memory Private Declare Function SetProcessWorkingSetSize Lib "kernel32.dll" (ByVal hProcess As IntPtr, ByVal dwMinimumWorkingSetSize As Int32, ByVal dwMaximumWorkingSetSize As Int32) As Int32 Public Shared Function SaveMemory() As Int32 Return SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1) End Function End Class I have written the code as follows:- Imports System.Threading Form1.vb 'Form1_Load Dim mem As New Memory() Dim t As New ThreadStart(AddressOf mem.SaveMemory) Dim ts As New Thread(t) ts.Start() end sub I don't know how to resolve these problem Urgent Pls help Thanx in advance vidhya
Reply
Answers (
0
)
Basic question
Unsafe code may only appear if compiling with /unsafe?