Announcement

Collapse
No announcement yet.

Winapi32.inc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Winapi32.inc

    I'm a bit angry that my earlier posts about incorrect winapi declares are not fixed.

    PB states that the win32api.inc is just for our convinience while i think it's more important than that.
    I'm sorry about that but ignoring posts is not friendly.
    And it was about 2 times or 3 times i stated the same correction...

    I have a list with fixes, i hope that the new PB version will have a question-round first for these kind of errors.

    BadMood = True

    ------------------
    [email protected]
    hellobasic

  • #2
    Compiler error. Variable "True" has not been declared.
    BadMood = %FALSE


    ------------------

    Comment


    • #3
      Better now...

      ------------------
      hellobasic

      Comment


      • #4
        A forum search didn't turn up any promising matches...? I am not sure
        what you are talking about. We certainly didn't mean to ignore you!
        If you would like to post your fixes here or send them to me directly,
        I will make sure they are addressed as quickly as possible. Thanks!

        [email protected]


        ------------------
        Tom Hanlin
        PowerBASIC Staff

        Comment


        • #5

          Code:
          DdeInitialize > DdeInitializeA
          DdeCreateStringHandle > DdeCreateStringHandleA
          DdeQueryString > DdeQueryStringA
          
          ExtractAssociatedIcon LIB "SHELL32.DLL" ALIAS "ExtractAssociate <d> IconA"
          [This message has been edited by Edwin Knoppert (edited February 06, 2001).]
          hellobasic

          Comment


          • #6
            While we are at it...

            All the API memory functions pass the memory block pointer BYREF when they should pass it BYVAL.

            here is a small example of what they should be...
            Code:
            DECLARE FUNCTION GetProcessHeap     LIB "KERNEL32.DLL" ALIAS "GetProcessHeap"   () AS LONG
            DECLARE FUNCTION GetProcessHeaps    LIB "KERNEL32.DLL" ALIAS "GetProcessHeaps"  (BYVAL LONG,LONG) AS LONG
            
            DECLARE FUNCTION HeapAlloc          LIB "KERNEL32.DLL" ALIAS "HeapAlloc"        (BYVAL LONG,BYVAL LONG,BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapCompact        LIB "KERNEL32.DLL" ALIAS "HeapCompact"      (BYVAL LONG,BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapCreate         LIB "KERNEL32.DLL" ALIAS "HeapCreate"       (BYVAL LONG,BYVAL LONG,BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapDestroy        LIB "KERNEL32.DLL" ALIAS "HeapDestroy"      (BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapFree           LIB "KERNEL32.DLL" ALIAS "HeapFree"         (BYVAL LONG,BYVAL LONG,BYVAL ANY) AS LONG
            DECLARE FUNCTION HeapLock           LIB "KERNEL32.DLL" ALIAS "HeapLock"         (BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapReAlloc        LIB "KERNEL32.DLL" ALIAS "HeapReAlloc"      (BYVAL LONG,BYVAL LONG,BYVAL ANY,BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapSize           LIB "KERNEL32.DLL" ALIAS "HeapSize"         (BYVAL LONG,BYVAL LONG,BYVAL ANY) AS LONG
            DECLARE FUNCTION HeapUnlock         LIB "KERNEL32.DLL" ALIAS "HeapUnlock"       (BYVAL LONG) AS LONG
            DECLARE FUNCTION HeapValidate       LIB "KERNEL32.DLL" ALIAS "HeapValidate"     (BYVAL LONG,BYVAL LONG,BYVAL ANY) AS LONG
            In most cases the word ANY should be prefixed with BYVAL.

            How can PowerBasic say that the include files are provided just out of convinience when they are the core link between Windows and the compiler. I think maybe PowerBasic should hire some one to keep this monster up to date...


            ------------------
            Cheers

            [This message has been edited by mark smit (edited February 06, 2001).]

            Comment


            • #7
              Hi Tom,

              Can you comment here.

              I sent Lance an e-mail re:the PB Winapi folder in general.

              Can PB or we users, doccument clean up and correct the *.inc
              files for you to officially post, or are we in M$ (c) turf.

              See my e-mail if you can...

              I've made an HTML help file for myself, (my brain is full,
              every time I learn something new, I forget something)
              that links to the INCLUDES so I can find stuff.

              I also have many of the 32 bit binary flags for the M$.dll calls,
              it super simplifies code. I still set constants in &h but since
              I usually use the same "boring" style, I really shortens the
              source file.

              LOCAL p7style as DWORD 'Must be DWORD
              'I find the OR'ed val
              p7style = %WS_POPUP OR %WS_VISIBLE OR %WS_CLIPCHILDREN OR %WS_CAPTION OR %WS_SYSMENU

              MSGBOX HEX$(p7style) 'Show it

              ' rem it out and insert the &h92c80000 inplace of style or whatever.
              Not a newbie trick.

              Mike...

              Humor: having trouble remembering your password?
              Make it "Forget your password?"

              ------------------


              [This message has been edited by Mike Comeau (edited February 06, 2001).]

              Comment


              • #8
                Edwin: Thanks! Updated and posted.

                Mark: Also thanks! Updated and posted.

                Mike: We'll be glad to take care of fixes and additions to the PB
                include files. We would prefer that you not send us modified versions
                of our files, as it may take us considerable work to cross-compare
                your files against our latest files.

                If you have translations of other include files, we'll be glad to
                make them available for downloading if it's legal to do so.
                Translations of Microsoft's Windows APIs may generally be
                distributed freely-- as freeware, NOT "public domain", as they must
                maintain Microsoft's copyrights. See the header of our Win32API.inc
                for example wording.

                If you have translations of include files for non-Microsoft products,
                it is generally not going to be legal to distribute them. In that case,
                perhaps you could encourage the vendor to make your translation
                available to their customers for the benefit of other PowerBASIC users.


                ------------------
                Tom Hanlin
                PowerBASIC Staff

                Comment

                Working...
                X