Pseudo string types and zero
Pseudo string types and zero
It would be cool if .p-ascii, .p-utf8 and .p-unicode could also accept zero as argument. This would help a lot with Windows API functions that either accept a string or zero.
Maybe this helps?
Code: Select all
Procedure GetRawString(N.i)
If N = 0
Debug "Null string"
Else
Debug PeekS(N)
EndIf
EndProcedure
a.s
CallFunctionFast(@GetRawString(), a)
Trond, I don't understand what the purpose of this code snippet is.
I don't want to use it with CallFunction or Prototypes, I am using many WinAPI libraries with Import and it's a little bit annoying to always do the ASCII->Unicode and back convertion on my own, because sometimes I need to pass a string to one function and another time I need to pass a zero as argument to the same function at the same parameter index.
Edit: Now I see what you mean, but that way I can't use benefit .p-types.
I don't want to use it with CallFunction or Prototypes, I am using many WinAPI libraries with Import and it's a little bit annoying to always do the ASCII->Unicode and back convertion on my own, because sometimes I need to pass a string to one function and another time I need to pass a zero as argument to the same function at the same parameter index.
Edit: Now I see what you mean, but that way I can't use benefit .p-types.
Last edited by mback2k on Sun Jan 11, 2009 3:15 pm, edited 1 time in total.