OI 32 bit and OIPI 32 bit - DLL calls (Reporter Specific)
At 08 JUL 2002 11:34:56AM Colin Rule wrote:
I have OI 4.0.2 and OIPI versions.
I am trying to get the hang of these DLL's and I am making some progress now.
One problem I am having is with printing and GetNextWindow being reported as not existing in USER32.DLL.
My investigations seem to have concluded that on the 16 bit version it used USER.EXE as there is no USER.DLL.
Using QuickView on USER.EXE I can see the call to GetNextWindow with an associated number of 230.
This seems to tie in with the STDPROCS record DLL_OIPI_USER.
I can only assume Windows knows to look at USER.EXE instead of finding USER.DLL.
With the 32 bit version however it uses DLL_OIPI_USER32.
This refers to GetNextWindow too, but moans when it cannot find it.
QuickView on the USER32.DLL shows that this call does not exist, which seems to explain (and confirm) the problem.
I have had a bit of a search and found some links, such as
http://www.allapi.net/apilist/apilist.php?beginletter=Gand
http://www.andreavb.com/API_USER32.htmlThese confirm that GetNextWindow is not a callable function from USER32.DLL.
The size of USER32.DLL is only 54k (on Windows 98) compared with 536k for USER.EXE.
I can only conclude from this that Microsoft cheated with Windows 98 and made the DLL call the EXE using thunking to save effort.
On Windows 2000 the USER32.DLL file is much bigger (392k) so I suppose MS pulled their finger out and did it properly.
Some more searching pointed me down a path so I tried changing the declaration from
HANDLE STDCALL GetNextWindow(HANDLE,UINT)
to
HANDLE STDCALL GetWindow(HANDLE,UINT) AS GETNEXTWINDOW
This seems to work then.
I did clean up all the application specific SYSOBJs and run DECLARE_FCNS.
NOW… the QUESTIONS…
Is the above logical and is my change OK.
If not, how can I get Win98 to properly print using OIPI32.
Or.. would upgrading to OI 4.0.3 have a beneficial effect.
At 08 JUL 2002 11:37AM Colin Rule wrote:
Oops, was supposed to post under OI 32 bit.
Will re-post.
Colin
At 10 FEB 2003 09:17AM Michael F. Gordeev wrote:
I tried to repeat it and it works!