Ralph --
I searched in POFFS2
No one GetModuleHandle($NUL) found.
BTW, it seems to me that I never used $NUL at all, not in GetModuleHandle only (%NULL - yes)
------------------
E-MAIL: [email protected]
Announcement
Collapse
No announcement yet.
GetModuleHandle (BYVAL 0) vs. GetModuleHandle($NUL)
Collapse
X
-
Semen,
as i remember i found GetModuleHandle($NUL) in
your src postings too.
Ralph
------------------
Leave a comment:
-
Thanks for the help. I'll use GetModuleHandle(BYVAL 0)
to get the current instance.
Just to be shure : Literals are STRPTR. Aren't they ?
rgds
Ralph
------------------
Leave a comment:
-
I think that $NUL = CHR$(0) instead of $NUL = "" and PB operates with it like with string with length = 1.
For example, Len("a" + $NUL + "a") = 3.
Imagine
Code:Sub ab (s As Asciiz)
But in case
Code:Dim a As Asciiz * 100 ab a
It's not the same
PS. I saw Lance answer too late.
[This message has been edited by Semen Matusovski (edited May 20, 2001).]
Leave a comment:
-
$NUL is a built-in string equate, %NULL is a user-defined equate (it is defined in WIN32API.INC for convenience).
To be clear, using $NUL is the same as using CHR$(0). That is, it specifies a 1 byte string containing one CHR$(0).
Therefore, your API call code could be rewritten to show the problem more clearly:
Code:CALL GetModuleHandle(CHR$(0))
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Leave a comment:
-
Ralph,
%NULL should be a numeric value where your equate is a string
equate.
I usually use ByVal %NULL as the parameter.
Regards,
[email protected]
------------------
Leave a comment:
-
GetModuleHandle (BYVAL 0) vs. GetModuleHandle($NUL)
Hi there,
this works fine :
hICONInfo = LoadIcon( GetModuleHandle(BYVAL 0), BYVAL MAKLNG(1003,0) )
but when i use $NUL hIconInfo is 0 :
hICONInfo = LoadIcon( GetModuleHandle($NUL), BYVAL MAKLNG(1003,0) )
What is $NUL ? A STRPTR, a VARPTR or simply 0 ?
Ralph
------------------
Tags: None
Leave a comment: