Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > BOOK: Professional VB 2005 ISBN: 0-7645-7536-8
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 22nd, 2008, 12:51 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
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)
        oRp.Deny()
        Dim objLog As New EventLog
        Dim objLogEntryType As EventLogEntryType
        Try
            Throw (New EntryPointNotFoundException)
        Catch objA As System.EntryPointNotFoundException
            Try
                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
                MessageBox.Show(objB.Message)
            End Try
        End Try
    End Sub
================================================== ==
Why the objLog.WriteEntry are always successful???

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:56 PM



All times are GMT -4. The time now is 12:04 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.