Make your own free website on Tripod.com

AllApi.net

[an error occurred while processing this directive]
 
Const CDERR_DIALOGFAILURE = &HFFFF
Const CDERR_FINDRESFAILURE = &H6
Const CDERR_GENERALCODES = &H0
Const CDERR_INITIALIZATION = &H2
Const CDERR_LOADRESFAILURE = &H7
Const CDERR_LOADSTRFAILURE = &H5
Const CDERR_LOCKRESFAILURE = &H8
Const CDERR_MEMALLOCFAILURE = &H9
Const CDERR_MEMLOCKFAILURE = &HA
Const CDERR_NOHINSTANCE = &H4
Const CDERR_NOHOOK = &HB
Const CDERR_REGISTERMSGFAIL = &HC
Const CDERR_NOTEMPLATE = &H3
Const CDERR_STRUCTSIZE = &H1
Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As Any) As Long
Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long
Private Sub Form_Load()
    'KPD-Team 1999
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    'We're letting the GetOpenFileName-function crash
    GetOpenFileName ByVal 0&
    Select Case CommDlgExtendedError
        Case CDERR_DIALOGFAILURE
            MsgBox "The dialog box could not be created."
        Case CDERR_FINDRESFAILURE
            MsgBox "The common dialog box function failed to find a specified resource."
        Case CDERR_INITIALIZATION
            MsgBox "The common dialog box function failed during initialization."
        Case CDERR_LOADRESFAILURE
            MsgBox "The common dialog box function failed to load a specified resource."
        Case CDERR_LOADSTRFAILURE
            MsgBox "The common dialog box function failed to load a specified string."
        Case CDERR_LOCKRESFAILURE
            MsgBox "The common dialog box function failed to lock a specified resource."
        Case CDERR_MEMALLOCFAILURE
            MsgBox "The common dialog box function was unable to allocate memory for internal structures."
        Case CDERR_MEMLOCKFAILURE
            MsgBox "The common dialog box function was unable to lock the memory associated with a handle."
        Case CDERR_NOHINSTANCE
            MsgBox "The ENABLETEMPLATE flag was set in the Flags member of the initialization structure for the corresponding common dialog box, but you failed to provide a corresponding instance handle."
        Case CDERR_NOHOOK
            MsgBox "The ENABLEHOOK flag was set in the Flags member of the initialization structure for the corresponding common dialog box, but you failed to provide a pointer to a corresponding hook procedure."
        Case CDERR_REGISTERMSGFAIL
            MsgBox "The RegisterWindowMessage function returned an error code when it was called by the common dialog box function."
        Case CDERR_NOTEMPLATE
            MsgBox "The ENABLETEMPLATE flag was set in the Flags member of the initialization structure for the corresponding common dialog box, but you failed to provide a corresponding template."
        Case CDERR_STRUCTSIZE
            MsgBox "The lStructSize member of the initialization structure for the corresponding common dialog box is invalid."
        Case Else
            MsgBox "Undefined error ..."
    End Select
End Sub


 
Copyright © 1998-2000, The KPD-Team.
Send mail to KPDTeam@Allapi.net with comments about this web site.
This site is located at
http://www.Allapi.net/