Не могу понять, почему выдает ошибку "Can't find project or library" - VB

Узнай цену своей работы

Формулировка задачи:

Листинг программы
  1. Public Function dhBrowseForFolder( _
  2. ByVal lngCSIDL As Long, ByVal lngBifFlags As Long, strFolder As String, _
  3. Optional ByVal hWnd As Long = 0, _
  4. Optional strTitle As String = "Select Directory") As Long
  5. Dim usrBrws As BrowseInfo
  6. Dim lngReturn As Long
  7. Dim lngIDL As Long
  8. If SHGetSpecialFolderLocation(hWnd, lngCSIDL, lngIDL) = 0 Then
  9. With usrBrws
  10. .hwndOwner = hWnd
  11. .pidlRoot = lngIDL
  12. .strDisplayName = String$(dhcMaxPath, vbNullChar)
  13. .strTitle = strTitle
  14. .ulFlags = lngBifFlags
  15. End With
  16. lngIDL = SHBrowseForFolder(usrBrws)
  17. If lngIDL Then
  18. strFolder = String$(dhcMaxPath, vbNullChar)
  19. If SHGetPathFromIDList(lngIDL, strFolder) Then
  20. strFolder = dhTrimNull(strFolder)
  21. lngReturn = dhcNoError
  22. Else
  23. strFolder = dhTrimNull(usrBrws.strDisplayName)
  24. lngReturn = dhcNoError
  25. End If
  26. Else
  27. lngReturn = dhcErrorExtendedError
  28. End If
  29. Else
  30. lngReturn = dhcErrorExtendedError
  31. End If
  32. dhBrowseForFolder = lngReturn
  33. End Function
Подчеркивает строку 12. Помогите разобраться пожалуйста.

Решение задачи: «Не могу понять, почему выдает ошибку "Can't find project or library"»

textual
Листинг программы
  1. Public Const dhcMaxPath = 260
  2. Public Const dhcNoError = 0&
  3. Public Const dhcErrorExtendedError = 1208&
  4. Public Const MAX_PATH = 260
  5. Public Declare Function SHGetSpecialFolderLocation Lib "Shell32.DLL" (ByVal hwndOwner As Long, ByVal Folder As Long, ByRef idl As Long) As Long ' Shell types
  6. Public Declare Function SHBrowseForFolder Lib "Shell32.DLL" (ByRef bi As BrowseInfo) As Long
  7. Public Declare Function SHGetPathFromIDList Lib "Shell32.DLL" (ByVal idl As Long, ByVal Path As String) As Integer
  8. Public Type BrowseInfo
  9. hwndOwner As Long ' Owner
  10. pidlRoot As Long ' Can be null
  11. strDisplayName As String ' Rcvs display name of folder (32 bytes)
  12. strTitle As String ' title/instructions for user
  13. ulFlags As Long ' 0 or BIF constants
  14. ' You won't use any of the following fields, from VBA.
  15. lpfn As Long ' Address for callback: use NULL
  16. lParam As Long ' Passes to callback
  17. iImage As Long ' index to the system image list
  18. End Type

ИИ поможет Вам:


  • решить любую задачу по программированию
  • объяснить код
  • расставить комментарии в коде
  • и т.д
Попробуйте бесплатно

Оцени полезность:

13   голосов , оценка 4.077 из 5

Нужна аналогичная работа?

Оформи быстрый заказ и узнай стоимость

Бесплатно
Оформите заказ и авторы начнут откликаться уже через 10 минут