Announcement

Collapse
No announcement yet.

Easy porting question

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

  • Easy porting question

    This is one of many exported routines from a EHLLAPI.DLL, I decided since I have some time to complete the porting over....
    It's about 6 pages all told, one page left, the exported routines..

    Code:
    I'm assuming this:
    typedef struct tagATMSystem {
        Word    wHLLAPIVersionNumber;
        Word    wHLLAPILevelNumber;
        }       ATMSYSTEM, NEAR * NPATMSYSTEM, FAR * LPATMSYSTEM;
    
    
    '
    '
    Word WINAPI
    HLL_AttachmateQuerySystem (
        HWND        hWnd,
        LPATMSYSTEM lpATMSystem);
    
    
    Would come out as:
    '
    '
    (I validated the TYPE structure in a previous post months ago)
    Type ATMSystem
        wHLLAPIVersionNumber As Word
        wHLLAPILevelNumber As Word
    End Type
    
    '
    '
    Declare Function HLL_AttachmateQuerySystem LIB "EHLLAPI.DLL"(hWnd as long,lpATMSystem As ATMSYSTEM) As Long (Word?)
    Scott




    [This message has been edited by Scott Turchin (edited May 07, 2001).]
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

  • #2
    And a follow up question as well:

    Word wPSP

    wPsp As Word? Or can I use wPsp as Long?


    Also, pointer.......
    lpPoint As LPPOINT

    Is that correct? Is LPPOINT the C or C++ declare for a pointer? How do I modify that one?


    Scott

    ------------------
    Scott
    Scott Turchin
    MCSE, MCP+I
    http://www.tngbbs.com
    ----------------------
    True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

    Comment


    • #3
      wPsp AS WORD is most correct. In many cases, you may be able to use a LONG
      instead, as a WORD will fit in a LONG, but this is not really wise.

      lpPoint AS POINTAPI PTR

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

      Comment


      • #4
        In your BASIC DECLARE hWnd should be BYVAL

        MCM
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          OK, but whY? Just curious......byval passes the value?

          ------------------
          Scott
          Scott Turchin
          MCSE, MCP+I
          http://www.tngbbs.com
          ----------------------
          True Karate-do is this: that in daily life, one's mind and body be trained and developed in a spirit of humility; and that in critical times, one be devoted utterly to the cause of justice. -Gichin Funakoshi

          Comment


          • #6
            The default parameter passing method for C/C++ is BYVAL. If the C/C++ shows a pointer (ie, '*xyz'), then you either pass the variable BYREF (ie, 'BYREF xyz') or pass a pointer BYVAL (ie, 'BYVAL pXyz AS xyz PTR').

            ------------------
            Lance
            PowerBASIC Support
            mailto:[email protected][email protected]</A>
            Lance
            mailto:[email protected]

            Comment

            Working...
            X