CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: API Declaration

  1. #1
    Guest

    API Declaration

    I have a small project created by somebody. I contains 1 form with several functions and procedures and 1 module with API declarations. I'd like to wrap everything into 1 class. 1 of the API functions requires user defined Type parameter:

    Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (byval _
    hSnapshot as Long, uProcess as PROCESSENTRY32) as Long

    Type PROCESSENTRY32
    dwSize as Long
    szexeFile as string * MAX_PATH
    End Type



    I did not list all the members of Type to be shorter.

    While these declarations are in a separate module everything's OK. When I'm moving them into the class I receive an error. How can it be wrapped into 1 single class?
    Thank you.
    Vlad


  2. #2

    Re: API Declaration

    In the class, put the word private in front of declare and type.

    Charlie Zimmerman
    http://www.freevbcode.com


  3. #3
    Guest

    Re: API Declaration

    Thank you.


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

Featured