Click here to Skip to main content
16,013,642 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Crystal Reports deployment Pin
Steven J Jowett23-Apr-08 12:33
Steven J Jowett23-Apr-08 12:33 
GeneralRe: Crystal Reports deployment Pin
Jodd23-Apr-08 13:29
Jodd23-Apr-08 13:29 
GeneralDeveloping applications for BlackBerry Pin
Mr Oizo23-Apr-08 4:50
Mr Oizo23-Apr-08 4:50 
GeneralRe: Developing applications for BlackBerry Pin
Thomas Stockwell23-Apr-08 8:24
professionalThomas Stockwell23-Apr-08 8:24 
QuestionError QueryInterface while trying to use VB6 DLL into VB.NET project Pin
mandrake_223-Apr-08 4:45
mandrake_223-Apr-08 4:45 
Questionsetting a variable for multiple threads Pin
Tom Deketelaere23-Apr-08 4:23
professionalTom Deketelaere23-Apr-08 4:23 
GeneralRe: setting a variable for multiple threads Pin
Luc Pattyn23-Apr-08 11:04
sitebuilderLuc Pattyn23-Apr-08 11:04 
GeneralRe: setting a variable for multiple threads Pin
Tom Deketelaere23-Apr-08 23:10
professionalTom Deketelaere23-Apr-08 23:10 
Thank you for you'r reply I'll test this as soon as I can (due to some hardware problems my cardreaders seem to have stopped working)


Luc Pattyn wrote:
1.
the Shared keyword in VB.NET indicates a variable is a class member, rather than an
instance member, i.e. it exists once in the class, as opposed to once in every instance
of that class. The C# equivalent is "static". It has no relationship with threads.


I knew that but escaped me for a moment Poke tongue | ;-P

Luc Pattyn wrote:
2.
all variables by default are thread-agnostic, they exist once and are readable by all
threads.


That has always been my experiance but now it doesn't seem to do that (never encounterd this problem before)

Luc Pattyn wrote:
3.
The one problem you may have is that variables could get "cached" in local variables
(that requires explicit code to do it) or in CPU registers, which could result in one
of the threads using stale data, i.e. not accessing the memory-based variable every time
your code seems to indicate.Example (in C#):


I don't have any code that would do this but I do have code that manages the memory and stores it's handle (is needed for accessing the smartcard readers)

Luc Pattyn wrote:
4.
There are language-specific keywords and thread synchronization primitives/classes
that may help you in achieving what you need. Have a look at SyncLock (that should do it),
and Interlocked class.


Did try the interlocked class before asking here but that didn't seem to solve the problem Sigh | :sigh:
Haven't tryed the synclock class so will do that next (as soon as I get my readers to work again)

I'll let you know how it goes

If my help was helpfull let me know, if not let me know why.

The only way we learn is by making mistakes.

GeneralFile Open/Close Pin
ritz123423-Apr-08 3:06
ritz123423-Apr-08 3:06 
GeneralRe: File Open/Close Pin
Dave Kreskowiak23-Apr-08 3:38
mveDave Kreskowiak23-Apr-08 3:38 
GeneralRe: File Open/Close Pin
ritz123423-Apr-08 4:32
ritz123423-Apr-08 4:32 
GeneralRe: File Open/Close Pin
Dave Kreskowiak23-Apr-08 9:59
mveDave Kreskowiak23-Apr-08 9:59 
GeneralProblem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:14
Balagurunathan S23-Apr-08 1:14 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:17
darkelv23-Apr-08 1:17 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:27
Balagurunathan S23-Apr-08 1:27 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:38
darkelv23-Apr-08 1:38 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 1:44
Balagurunathan S23-Apr-08 1:44 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 1:56
darkelv23-Apr-08 1:56 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
Balagurunathan S23-Apr-08 2:06
Balagurunathan S23-Apr-08 2:06 
GeneralRe: Problem in bring a checkbox inside a datagrid in windows application.. Pin
darkelv23-Apr-08 2:15
darkelv23-Apr-08 2:15 
Questionstring Replace in vb.net Pin
RajeevKumarSharma23-Apr-08 0:54
RajeevKumarSharma23-Apr-08 0:54 
GeneralRe: string Replace in vb.net Pin
Christian Graus23-Apr-08 1:06
protectorChristian Graus23-Apr-08 1:06 
GeneralRe: string Replace in vb.net Pin
RajeevKumarSharma23-Apr-08 1:28
RajeevKumarSharma23-Apr-08 1:28 
GeneralRe: string Replace in vb.net Pin
Dave Kreskowiak23-Apr-08 3:34
mveDave Kreskowiak23-Apr-08 3:34 
GeneralRe: string Replace in vb.net Pin
Icharus23-Apr-08 19:28
Icharus23-Apr-08 19:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.