Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > BOOK: Professional VB 2005 ISBN: 0-7645-7536-8
BOOK: Professional VB 2005 ISBN: 0-7645-7536-8
This is the forum to discuss the Wrox book Professional VB 2005 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Rama Ramachandran, Kent Sharkey, Bill Sheldon; ISBN: 9780764575365
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 22nd, 2008, 12:51 AM
Registered User
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 13:The test for RegistryPermissions failed

Why the objLog.WriteEntry are always successful???
================================================== ==============
Private Sub btnTestRegistryPermissions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTestRegistryPermissions.Click
        Dim oRp As New RegistryPermission(Security.Permissions.Permission State.Unrestricted)
        Dim objLog As New EventLog
        Dim objLogEntryType As EventLogEntryType
            Throw (New EntryPointNotFoundException)
        Catch objA As System.EntryPointNotFoundException
                If Not System.Diagnostics.EventLog.SourceExists("Example" ) Then
                    System.Diagnostics.EventLog.CreateEventSource("Exa mple", "System")
                End If
                objLog.Source = "Example"
                objLog.Log = "System"
                objLogEntryType = EventLogEntryType.Information
                objLog.WriteEntry("Error: " & objA.Message, objLogEntryType)
            Catch objB As System.Exception
            End Try
        End Try
    End Sub
================================================== ==
Why the objLog.WriteEntry are always successful???

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 bwoll BOOK: Beginning Access 2003 VBA 1 June 7th, 2007 03:57 PM
Should I go past chapter 13? bossman21 BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 4 July 24th, 2006 12:42 PM
Chapter 13 ElMorenito BOOK: Beginning ASP 3.0 0 January 14th, 2005 02:56 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.