Feedback Search Top Backward Forward
EDM/2

Questions and Answers

Written by Larry Salomon Jr.

 

Introduction

Welcome to this month's "Questions and Answers"! Each month, I collect various items that fit into this column sent to me via email. The ones that I feel contribute the most to developers, whether in terms of information or as a nifty trick to tuck into your cap, get published in this column.

To submit an item, send it via email to my address - os2man@panix.com - and be sure to grant permission to publish it (those that forget will not be considered for publication).

Corrections

If you remember, last month I stated that APAR number PJ13781 was created against the Palette Manager; well, it has been closed. The reason is, if you'll look in the source code (ugpm.zip), you'll see that a call to WinGetPS() is made without 1) creating a message queue first and 2) without releasing it later. This is causing the instabilities that were reported.

My apologies for not figuring this out before, but I never looked at the source.

Gotcha Notes!

When using the IBM User Interface Class Libraries, if you use the new operator to create an instance of your main window in the main() function, you must use the delete operator after the IApplication::current().run() call or else the application will not close after the main window has been destroyed.


In the File Systems section of the Control Program Guide and Reference, there are a couple of problems.

  1. The API DosQueryFileInfo() is referenced when DosQueryFSInfo() is intended.
  2. The sample to retrieve file system information via DosQueryFSAttach() is incorrect. Declaring a variable of type FSQBUFFER2 and passing it to DosQueryFSAttach() will return ERROR_BUFFER_OVERFLOW. You must pass a pointer to a buffer (stack-based or dynamically allocated) that has sufficient space.

_wpPopulate is listed in the online reference as having a third parameter of WPFolder * and its value is the "real name of the folder to populate". In actuality, it is a PSZ which is the path of the folder to populate.