S
Steve B.
Hi,
I'm wondering what exactly is the lock keyword used for.
I'm building an application that call some win32 apis. Theses apis enumerate
registry key(RegEnumKeyEx). I can't use .Net ones because I'm building
CF.Net app and registry is not implemented
To enumerate registry keys I need to call the RegEnumKey until there is no
more item.
I added the lock(this) statement around the code that do that, in order to
be sure my enumeration won't be interfered with other thread (that should be
write in registry).
Is this the rigth usage of the lock object ?
Thanks,
Steve
I'm wondering what exactly is the lock keyword used for.
I'm building an application that call some win32 apis. Theses apis enumerate
registry key(RegEnumKeyEx). I can't use .Net ones because I'm building
CF.Net app and registry is not implemented
To enumerate registry keys I need to call the RegEnumKey until there is no
more item.
I added the lock(this) statement around the code that do that, in order to
be sure my enumeration won't be interfered with other thread (that should be
write in registry).
Is this the rigth usage of the lock object ?
Thanks,
Steve