Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #8089
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Hunting for 5333 |
| Date | 2015-05-12 16:31 +0200 |
| Message-ID | <creh6vFnd6hU1@mid.individual.net> (permalink) |
| References | <mit0oc$9id$1@dont-email.me> |
Hi Martin,
to be safe, I would use always String2PSZ().
From the help:
"String2Psz() is useful for many Windows or DLL functions that require
a PSZ in their argument list. It checks whether <cString> is a
NULL_STRING. If this is the case, String2Psz() returns a static
pointer to a byte containing 0x00.
Otherwise, it allocates a buffer within static memory, copies the
string content to it, and returns the pointer to this buffer. The
pointer becomes a hidden local variable. If the appropriate function
or method, which called String2Psz(), goes out of scope, the allocated
buffer will be freed up automatically. Furthermore, the pointer is no
longer valid"
This is so since the early days of VO 2.8, I think.
And at least in my code, 5333s are very, very rare now.
Wolfgang
> Hello
>
> Still getting the odd 5333 crash and I want to know the correct way
> to handle zero terminated strings PSZ
>
> This is just about the only thing I have left to investigate
>
>
> Examples of code found
>
> DirMake(String2Psz('C:\FILEPATH'))
>
> ShellExecute(SELF:Handle(),PSZ("open"),PSZ(CHR(34)+cURL+CHR(34)),PSZ("
> "),PSZ(""),SW_SHOWNORMAL)
>
> Thanks
>
> Martin
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Hunting for 5333 Martin <Martin@spam.spam> - 2015-05-12 14:56 +0100
Re: Hunting for 5333 "Wolfgang Riedmann" <wriedmann@gmail.com> - 2015-05-12 16:31 +0200
Re: Hunting for 5333 Mathias <mathias.hakansson@consultec.se> - 2015-05-12 23:45 -0700
csiph-web