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>
Announcement
Collapse
No announcement yet.
Easy porting question
Collapse
X
-
OK, but whY? Just curious......byval passes the value?
------------------
Scott
Leave a comment:
-
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
Leave a comment:
-
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
Leave a comment:
-
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?)
[This message has been edited by Scott Turchin (edited May 07, 2001).]Tags: None
Leave a comment: