Announcement

Collapse
No announcement yet.

Quick C++ converion

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

  • Quick C++ converion

    IMG_API int LoadImage( const char *file,int flags,int p);

    Just to make sure I am converting right, what would the const char *file be in PowerBASIC?

    ------------------
    Thank you,
    Ryan M. Cross

    Software Engineer
    Adaptive Motion
    Thank you,
    Ryan M. Cross

  • #2
    BYREF szFile AS ASCIIZ


    ------------------
    Website: http://com.it-berater.org
    SED Editor, TypeLib Browser, COM Wrappers.
    Forum: http://www.jose.it-berater.org/smfforum/index.php
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      Well if thats BYREF file AS ASCIIZ then what is this since you can't declare a function to return ASCIIZ:

      Code:
      IMG_API const char *EntClass( int Entity );
      Thanks!

      ------------------
      Thank you,
      Ryan M. Cross

      Software Engineer
      Adaptive Motion

      Stone Age Gamer - Store - Forum



      [This message has been edited by RyanCross (edited July 06, 2007).]
      Thank you,
      Ryan M. Cross

      Comment


      • #4
        LoadImage() is an ordinary winapi call.
        See your includefile.


        ------------------
        http://www.hellobasic.com
        Click here for PwrDev.
        hellobasic

        Comment


        • #5
          >char *EntClass( int Entity );

          Local psz as asciiz ptr

          psz = EntClass( n )
          I think..

          ------------------
          http://www.hellobasic.com
          Click here for PwrDev.
          hellobasic

          Comment


          • #6
            Yeah I get a Syntax error with AS ASCIIZ PTR. Would it have to do AS DWORD and then work my way around it from there or is there a more direct way?

            ------------------
            Thank you,
            Ryan M. Cross

            Software Engineer
            Adaptive Motion

            Stone Age Gamer - Store - Forum

            [This message has been edited by RyanCross (edited July 06, 2007).]
            Thank you,
            Ryan M. Cross

            Comment


            • #7
              This is no more 'direct' way to return pointer to NTS except to return a 32-bit integer (LONG or DWORD).

              But you could return a STRING if you wanted.


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

              Comment


              • #8
                Yup BYVAL ... AS STRING and ...)AS STRING work fine.

                Thanks guys!

                ------------------
                Thank you,
                Ryan M. Cross

                Software Engineer
                Adaptive Motion

                Stone Age Gamer - Store - Forum
                Thank you,
                Ryan M. Cross

                Comment

                Working...
                X