Some programming questions
Hi,
I am in the throes of a large project for OS/2 and need some help. Here
is a list of questions for y'all
* I need to read off the creation date and time of directories. I can
do this for all except the desktop, where I get an access denied
error. How do I set the flags on DosOpen to do this?
* The PM calls restartSOMDD and restartWPSDServer should not be used,
right? Seems that calling them to stop and restart the system cause the
WPS (ok, XWorkplace under ecs 1.2) to hang. Not good. I just want to
understand any interaction here.
* under RWS 0.6 [just in case someone knows] if I call wpPopulate on a
folder then list the contents (decreasing the lock each time
afterwards) this works ok a few times. Then I start getting messages
that I cannot start new programs because no dlls can be loaded. I don't
expect to get an answer as to what is happening with RWS, *but* what
causes OS/2 to refuse to load new dll's and is there a way to see what
it's doing and fix it?
Many thanks
-- j
Re: Some programming questions
[A complimentary Cc of this posting was sent to
<spam@jqhome.net>], who wrote in article <1103837856.164144.139680@z14g2000cwz.googlegroups.com>:[color=blue]
> * The PM calls restartSOMDD and restartWPSDServer should not be used,
> right? Seems that calling them to stop and restart the system cause the
> WPS (ok, XWorkplace under ecs 1.2) to hang. Not good. I just want to
> understand any interaction here.[/color]
In my experience, they should not be used *for shutting down*
services. Other uses look fine.
Anyway, one *can't* use these calls even if they would work, since the
API does not provide refcounts, so you have no idea whether somebody
else started to use them in between...
Hope this helps,
Ilya
Re: Some programming questions
[email]spam@jqhome.net[/email] schrieb:[color=blue]
> Hi,
>
> I am in the throes of a large project for OS/2 and need some help. Here
> is a list of questions for y'all
>
> * I need to read off the creation date and time of directories. I can
> do this for all except the desktop, where I get an access denied
> error. How do I set the flags on DosOpen to do this?[/color]
Use DosQueryPathInfo. But that might still fail if a process has opened the dir with exclusive access.
[color=blue]
>
> * The PM calls restartSOMDD and restartWPSDServer should not be used,
> right? Seems that calling them to stop and restart the system cause the
> WPS (ok, XWorkplace under ecs 1.2) to hang. Not good. I just want to
> understand any interaction here.[/color]
These calls are NOT meant to stop and restart the system. They are meant to stop and restart the
DSOM support which is something completely different. Also as far as I can tell XWorkplace broke the
DSOM support (deinstall XWorkplace and DSOM will work). However this is a completely different problem.
In order to restart the WPS use:
BOOL32 EXPENTRY WinRestartWorkplace(VOID);
Maybe you will also have to call WinWaitForShell afterwards to block until the WPS has completely
come back again.
In order to shutdown system use
BOOL EXPENTRY WinShutdown(HAB,HMQ);
Then there is a possibility to reboot the whole system via some DevIOTCL call. Look at
[url]www.edm.com[/url] (old archives)
to learn how to do this.
[color=blue]
>
> * under RWS 0.6 [just in case someone knows] if I call wpPopulate on a
> folder then list the contents (decreasing the lock each time
> afterwards) this works ok a few times. Then I start getting messages
> that I cannot start new programs because no dlls can be loaded. I don't
> expect to get an answer as to what is happening with RWS, *but* what
> causes OS/2 to refuse to load new dll's and is there a way to see what
> it's doing and fix it?[/color]
Good question. I guess when OS/2 runs out of module table entries (MTEs).
But it would help to see the code.
[color=blue]
>
> Many thanks
>
> -- j
>[/color]
Lars
Re: Some programming questions
On Thu, 23 Dec 2004 21:37:36 UTC, [email]spam@jqhome.net[/email] wrote:[color=blue]
>
> * under RWS 0.6 [just in case someone knows] if I call wpPopulate on a
> folder then list the contents (decreasing the lock each time
> afterwards) this works ok a few times. Then I start getting messages
> that I cannot start new programs because no dlls can be loaded. I don't
> expect to get an answer as to what is happening with RWS, *but* what
> causes OS/2 to refuse to load new dll's and is there a way to see what
> it's doing and fix it?[/color]
It sounds like you're running out of linear address space in the shared
arena. You can use Theseus to confirm this. It's unlikely to be RWS
itself since its memory demands are exceedingly modest (you can use
Theseus to confirm this as well).
--
== == almost usable email address: rws AT e-vertise.com == ==
___________________________________________________________________
|
| New - Remote Workplace Server v0.60
Rich Walsh | interact with the WPS from any program
Ft Myers, FL | [url]http://e-vertise.com/rws/rws060.zip[/url]
___________________________________________________________________
Re: Some programming questions
On Thu, 23 Dec 2004 05:47:39 +0100, Lars Erdmann <lars.erdmann@arcor.de>
wrote:
[color=blue][color=green]
>> * I need to read off the creation date and time of directories. I can
>> do this for all except the desktop, where I get an access denied
>> error. How do I set the flags on DosOpen to do this?[/color]
>
> Use DosQueryPathInfo. But that might still fail if a process has opened the dir with exclusive access.[/color]
You cannot open a directory. You can only open files (or devices).
[color=blue][color=green]
>> * The PM calls restartSOMDD and restartWPSDServer should not be used,
>> right? Seems that calling them to stop and restart the system cause the
>> WPS (ok, XWorkplace under ecs 1.2) to hang. Not good. I just want to
>> understand any interaction here.[/color]
>
> These calls are NOT meant to stop and restart the system. They are meant to stop and restart the
> DSOM support which is something completely different. Also as far as I can tell XWorkplace broke the
> DSOM support (deinstall XWorkplace and DSOM will work). However this is a completely different problem.[/color]
XWP uses many global variables in its classes and is thus incompatible
with DSOM. This is rather a fundamental design error, but there is no
hope of fixing it. Don't use DSOM with XWP.
Re: Some programming questions
Hi,
[color=blue][color=green]
>> These calls are NOT meant to stop and restart the system. They are meant
>> to stop and restart the
>> DSOM support which is something completely different. Also as far as I
>> can tell XWorkplace broke the
>> DSOM support (deinstall XWorkplace and DSOM will work). However this is a
>> completely different problem.[/color]
>
> XWP uses many global variables in its classes and is thus incompatible
> with DSOM. This is rather a fundamental design error, but there is no
> hope of fixing it. Don't use DSOM with XWP.[/color]
I can live with it. Though something like RWS (Rich Walsh's access to WPS
objects from external processes) would not be necessary if DSOM worked as it
does the exact same job pretty well.
But oh well ...
Lars
Re: Some programming questions
Lars Erdmann wrote:[color=blue]
> [email]spam@jqhome.net[/email] schrieb:
><snip/>
>
> In order to restart the WPS use:
> BOOL32 EXPENTRY WinRestartWorkplace(VOID);
>
> Maybe you will also have to call WinWaitForShell afterwards to block[/color]
until the WPS has completely[color=blue]
> come back again.
>
> In order to shutdown system use
> BOOL EXPENTRY WinShutdown(HAB,HMQ);[/color]
Unfortunately, these don't seem to be available to me (I am using
Watcom 1.2 and the os2 toolkit version 4.5). According to the
documentation, these are not in the base distribution but in the
enterprise edition. Anyway to get hold of the appropriate code?
-- j
write me at: jgaynor at jqhome dot net
Re: Some programming questions
On Tue, 4 Jan 2005 20:19:03 UTC, [email]spam@jqhome.net[/email] wrote:[color=blue]
> Lars Erdmann wrote:[color=green]
> >
> > In order to restart the WPS use:
> > BOOL32 EXPENTRY WinRestartWorkplace(VOID);
> >
> > Maybe you will also have to call WinWaitForShell afterwards to block
> > until the WPS has completely come back again.
> >
> > In order to shutdown system use
> > BOOL EXPENTRY WinShutdown(HAB,HMQ);[/color]
>
> Unfortunately, these don't seem to be available to me (I am using
> Watcom 1.2 and the os2 toolkit version 4.5). According to the
> documentation, these are not in the base distribution but in the
> enterprise edition. Anyway to get hold of the appropriate code?[/color]
Enterprise Edition???
WinShutdownSystem() is documented in the PM Ref and appears in pmwp.h.
WinRestartWorkplace() is documented in the Toolkit 4.5 Addendum
(addendum.inf) but doesn't appear in any header so you'll have to
copy the prototype above into your code.
--
== == almost usable email address: rws AT e-vertise.com == ==
___________________________________________________________________
|
| New - Remote Workplace Server v0.60
Rich Walsh | interact with the WPS from any program
Ft Myers, FL | [url]http://e-vertise.com/rws/rws060.zip[/url]
___________________________________________________________________
Re: Some programming questions
On Tue, 4 Jan 2005 11:39:29 +0100, Lars Erdmann <lars.erdmann@arcor.de>
wrote:
[color=blue][color=green]
>> XWP uses many global variables in its classes and is thus incompatible
>> with DSOM. This is rather a fundamental design error, but there is no
>> hope of fixing it. Don't use DSOM with XWP.[/color]
>
> I can live with it. Though something like RWS (Rich Walsh's access to WPS
> objects from external processes) would not be necessary if DSOM worked as it
> does the exact same job pretty well.[/color]
AIUI, DSOM never worked very well anyway, even before XWP.