we are currently in the process of converting our PowerBuilder application to use unicode instead of ANSI. We already made good progress, but are currently looking into our external function calls.
Currently we are using “List & Label 24” and the two respective PowerBuilder objects “u_cmll24” and “u_cmls24”, which came shipped together with the “List & Label 24” installation.
Doing some research it was found that next to all defined external function calls within the above mentioned objects are defined as ANSI, e.g. :
FUNCTION LONG LlDefineField(LONG hLlJob, ref STRING pszVarName, ref STRING lpbufContents) LIBRARY “CMLL24.DLL” ALIAS FOR “LlDefineFieldA;ANSI”
So far we already found out, that by replacing “A;ANSI” with “W” at the end of each external function we are able to switch from ANSI (“A API”?) to unicode (“Unicode API”) :
FUNCTION LONG LlDefineField(LONG hLlJob, ref STRING pszVarName, ref STRING lpbufContents) LIBRARY “CMLL24.DLL” ALIAS FOR “LlDefineFieldW”
First tests showed that by doing this, the most part of the used functionality by us is working fine. Unfortunately we are running into problems when trying to open the designer or preview window for labels.
So I would like to ask :
- Does anyone have experience on calling the “unicode API” from PowerBuilder?
- Are we missing something? Maybe some kind of initialization?
- How come the “list” printouts are all working fine, but when trying to open the labels the designer will crash without any real error message within the debwin4 window? And when trying to open the preview window, the first attempt is working fine but the second attempt will open up empty with an “bad allocation” error on the debwin4 window?