Results 1 to 4 of 4

Thread: damn findfirstfile

  1. #1

    Thread Starter
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330

    Angry

    When I start my program to find first file I get a "User defined type not defined" Here the code:

    'In a module
    Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long

    Public Type Win_32_Find_data
    dwFileAttributes As Long
    cFileName As String * 260
    End Type

    The program does not even get to the procedure under the command button it just gets hung up on this user defined type error. Any hwlp is greatly appreciated!!

    Matt

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You've got an extra underscore in your definition. Replace Win_32_Find_data with WIN32_FIND_DATA...and you'll be away.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Hyperactive Member MPrestonf12's Avatar
    Join Date
    Jun 1999
    Location
    NY
    Posts
    330

    Thumbs up

    It works fine now. I appreciate it. thanks
    Matt

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    No probs...I've had problems with things which seem obvious from someone else's viewpoint before!
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

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