Results 1 to 2 of 2

Thread: Unhandled exception at 0x00000000

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2008
    Posts
    204

    Unhandled exception at 0x00000000

    Hi All,
    In my project, when I am trying to make a function call to a DLL, I'm getting an exception stating:

    Unhandled exception at 0x00000000 in Project_Name.exe: 0xC0000005: Access violation.

    The code is as follows:

    Code:
    Public Structure USER_SET
            Dim FilmScreen As Integer
            Dim Density As Integer
            Dim RunLength As Byte
            Dim PatientSize As Integer
            Dim Exp As Boolean
            Dim switch As Byte 
    End Structure
    
     <DllImport("Configure.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Ansi)> _
        Public Function Configure_UserSettings(ByRef UserData As USER_SET) As Boolean
    
        End Function
    
     Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1_Click
            Dim Return_Status as boolean
            Dim UserDataSettings as USER_SET = new  USER_SET
    
             UserDataSettings.FilmScreen =1
             UserDataSettings.Density =2
             UserDataSettings.RunLength = &H20
             UserDataSettings.PatientSize  = 4
             UserDataSettings.Exp  = false
             UserDataSettings.switch  = &H10
    
            Return_Status = Configure_UserSettings( UserSettings) 
    
        End Sub

    Please anybody let me know why I am getting this exception.

    Regards,
    Susheelss

  2. #2
    PowerPoster SJWhiteley's Avatar
    Join Date
    Feb 2009
    Location
    South of the Mason-Dixon Line
    Posts
    2,256

    Re: Unhandled exception at 0x00000000

    You are not using the DLL correctly, or it is broken.
    "Ok, my response to that is pending a Google search" - Bucky Katt.
    "There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
    "Before you can 'think outside the box' you need to understand where the box is."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width