Some programming questions - OS2

This is a discussion on Some programming questions - OS2 ; 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 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Some programming questions

  1. 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


  2. Re: Some programming questions

    [A complimentary Cc of this posting was sent to

    ], who wrote in article <1103837856.164144.139680@z14g2000cwz.googlegroups. com>:
    > * 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.


    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

  3. Re: Some programming questions

    spam@jqhome.net schrieb:
    > 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?


    Use DosQueryPathInfo. But that might still fail if a process has opened the dir with exclusive access.

    >
    > * 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.


    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
    www.edm.com (old archives)
    to learn how to do this.

    >
    > * 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?


    Good question. I guess when OS/2 runs out of module table entries (MTEs).
    But it would help to see the code.

    >
    > Many thanks
    >
    > -- j
    >


    Lars

  4. Re: Some programming questions

    On Thu, 23 Dec 2004 21:37:36 UTC, spam@jqhome.net wrote:
    >
    > * 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?


    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 | http://e-vertise.com/rws/rws060.zip
    __________________________________________________ _________________

  5. Re: Some programming questions

    On Thu, 23 Dec 2004 05:47:39 +0100, Lars Erdmann
    wrote:

    >> * 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?

    >
    > Use DosQueryPathInfo. But that might still fail if a process has opened the dir with exclusive access.


    You cannot open a directory. You can only open files (or devices).

    >> * 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.

    >
    > 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.


    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.

  6. Re: Some programming questions

    Hi,

    >> 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.

    >
    > 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.


    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



  7. Re: Some programming questions


    Lars Erdmann wrote:
    > spam@jqhome.net schrieb:
    >
    >
    > 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);


    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


  8. Re: Some programming questions

    On Tue, 4 Jan 2005 20:19:03 UTC, spam@jqhome.net wrote:
    > Lars Erdmann wrote:
    > >
    > > 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);

    >
    > 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?


    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 | http://e-vertise.com/rws/rws060.zip
    __________________________________________________ _________________

  9. Re: Some programming questions

    On Tue, 4 Jan 2005 11:39:29 +0100, Lars Erdmann
    wrote:

    >> 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.

    >
    > 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.


    AIUI, DSOM never worked very well anyway, even before XWP.

+ Reply to Thread