
                   comp.os.os2.programmer.misc      (Usenet)

                 Saturday, 16-Oct-1999 to Friday, 22-Oct-1999

+----------------------------------------------------------------------------+

From: info@BackupForDummies.com                         16-Oct-99 07:40:10
  To: All                                               16-Oct-99 05:17:17
Subj: www.BackupForDummies.com

From: info@BackupForDummies.com

This is a multi-part message in MIME format.
--------------FE202A708575834E4933A7B7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


--------------FE202A708575834E4933A7B7
Content-Type: text/html; charset=us-ascii; name="banner.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="banner.html"

<html>
<body bgcolor=white>
<!--
comp.os.os2.networking.server,comp.os.os2.networking.tcp-ip,comp.os.os2.network
ing.www,comp.os.os2.programmer.misc,comp.os.os2.programmer.oop -->
<center>
<b>   
Year 2000 is coming!  This diverse site is a must!
</b>
<br>
<br>
<a href="http://www.backupfordummies.com"><img
src="http://www.backupfordummies.com/banners/B4D.gif" border=2></a>
<br>
<br>
<b>
We apologize if this post is off topic, however we see this as
a service that is necessary for everyone!
<br>
Please direct any complaints to this post to <a
href="mailto:info@backupfordummies.com">info@backupfordummies.com</a>
</center>
<!--
comp.os.os2.networking.server,comp.os.os2.networking.tcp-ip,comp.os.os2.network
ing.www,comp.os.os2.programmer.misc,comp.os.os2.programmer.oop -->
</body>
</html>

--------------FE202A708575834E4933A7B7--

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: www.BackupForDummies.com (1:109/42)

+----------------------------------------------------------------------------+

From: abuse@orac.clara.co.uk                            16-Oct-99 12:36:10
  To: All                                               16-Oct-99 14:29:07
Subj: Re: Lost VACPP 3 icons

From: abuse@orac.clara.co.uk (Paul Ratcliffe)

On Fri, 15 Oct 1999 20:45:51 GMT, Charlie <no_spam@blah.net> wrote:

>I accidentally deleted my VACPP icons from my desktop, as I remember 
>there is a program to rebuild them without reinstalling.  Does anyone 
>remember what it was?

\IBMCPP\BIN\CPPDESK.CMD I think.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: The Floppy BBS (1:109/42)

+----------------------------------------------------------------------------+

From: no_spam@blah.net                                  16-Oct-99 17:19:15
  To: All                                               16-Oct-99 16:44:01
Subj: Re: HOWTO: chat scripts?

From: no_spam@blah.net (Charlie)

for some strange reason leaving java running, with all its resource 
requirements, all night and day, just doesnt seem like the best way to
do anything to me.....

On Wed, 13 Oct 1999 10:44:35, Tim Timmins <tim.timmins@bcs.org.uk> 
wrote:

>  ftp://hobbes.nmsu.edu/pub/os2/apps/internet/ftp/client/jsm285r.zip
> 
> Brian@webone.com.au wrote:
> 
> > JASMINE HAS to be the best way to do this.
> >
> > Look for  jsm280r.zip on Hobbes etc.
> >
> > Written in Java it is quick and you can FTP toa server or copy to a disk.
> >
> > Brian
> >
> > <380335B2.EDB694B@powertech.no>, =?iso-8859-1?Q?Bj=F8rn?= Vermo
<bvermo@powertech.no> writes:
> > >Paul Ratcliffe wrote:
> > >
> > >> On Mon, 11 Oct 1999 20:27:02 GMT, Marco Shaw <marco.shaw@nbtel.nb.ca>
wrote:
> > >>
> > >> >I'm new to OS/2 admin.  I need to develop a script that gets files
newer
> > >> >than x date, and FTPs all these files to an FTP server, and this must
be
> > >> >done every 4 hours.
> > >>
> > >> You need REXX and a library package called RxSock. This all comes with
Warp 4.
> > >>
> > >
> > >It may also be useful to run SWITCHRX.CMD to change to the new Object
REXX. It has
> > >some new functions which are very useful, such as access to semaphores.
It is also
> > >very fast and convenient to use the container classes (tables, arrays,
queues &c)
> > >to organize the files you need to transmit.
> > >
> > >It is easier to use the REXX ftp API if you do not need all the socket
> > >capabilities.
> > >From the online documentation:
> > >
> > > The REXX FTP API package is contained in the file rxftp.dll. This
dynamic link
> > >library (DLL) must be placed in a
> > > directory listed in your LIBPATH statement in your CONFIG.SYS file. To
use the
> > >functions in the REXX FTP API
> > > package, execute this REXX code:
> > >
> > > rc = RxFuncAdd("FtpLoadFuncs","rxFtp","FtpLoadFuncs")
> > > rc = FtpLoadFuncs()
> > >
> > > To unload the DLL, you should first call the FtpDropFuncs() function,
then exit
> > >all CMD.EXE shells. After exiting all
> > > the command shells, the DLL will be dropped by OS/2 and can be deleted
or
> > >replaced.
> > >
> > >
> > >
> > >>
> > >> >What kind of scheduling mechanism does OS/2 (Warp 4) have?
> > >>
> > >> It doesn't, but there is a choice of Cron-like utilties on Hobbes which 
will
> > >> do the job.
> > >>
> > >
> > >It certainly does! I have used the scheduler in the bonus pack for years
with no
> > >problems. It will allow a wide range of different scheduling options
(like every n
> > >days, third wednesday in every month, or whatever).
> > >
> > >It is also possible to do the scheduling in REXX if it is fairly
straightforward.
> > >Your batch control program can be started from the startup folder, and
stay in the
> > >background like any other daemon.
> > >
> > >/* REXX timing loop for daily task */
> > >iScheduled = TIME('S', '22:14:00') /* Convert scheduled time 22:14 to
seconds
> > >after midnight */
> > >do forever
> > >  iNow = TIME('s') /* Seconds since midnight */
> > >  iWait = iScheduled - iNow
> > >  if iWait < 0 then iWait = iWait + TIME('S', '23:59:59') /* Not until
tomorrow */
> > >
> > >  SAY 'Wait' iWait 'seconds, until' TIME('N', iScheduled, 'S')
> > >  CALL SysSleep iWait
> > >  'START /B myjob.cmd'
> > >end
> > >
> > >
> 


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: PenTeleData http://www.ptd.net (1:109/42)

+----------------------------------------------------------------------------+

From: beve@dds.nl                                       17-Oct-99 08:59:06
  To: All                                               17-Oct-99 05:16:23
Subj: help!!! PGCC is not working

From: "G. van der Veer" <beve@dds.nl>

Hi,

When I run any program (for example Squid) compiled in PGCC 1.1.3 or
below I get the following message:

SYS0191: GCC29166 cannot be run in an OS/2 session.

I installed the files which i got from http://www.goof.com/pcg/os2/
according the instructions.
I have ensured myself that all paths are in the path and libpath in my
config.sys (and of course EMX 0.9D fix 2 had already been installed).
When I toggle of protectonly it does not work either, so gcc29166.dll is
not a dos-executable either.  Maybe I need to install XFree86 for the
runtime libraries?

current system:

Processor:              Intel Pentium II 350 MHz
Motherboard:        Gateway 2000
Internal memory:  320 MB
Operating system: OS/2 Aurora

PS. I had the same troubles when using OS/2 Warp 4.0 Fixpak 6 with
earlier versions of PGCC.
I hope that I can get the runtime libraries working. Otherwise I have to
say goodbye till Star Office too  :-(

Another option might be to recompile the sources for PGCC... has anybody
an idea on how to do this?

I hope someone can help me out of this mess,

kind regards,

Berry van der Veer

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: UUNET-NL (http://www.nl.uu.net) (1:109/42)

+----------------------------------------------------------------------------+

From: noone@bigfoot.com                                 17-Oct-99 22:50:29
  To: All                                               17-Oct-99 19:56:07
Subj: Zu Verkaufen: Os/2: Visual Age 3.0 + C-Set +

From: noone@bigfoot.com

http://www.eBay.de/servlet/auctiondetaildConnector?page=eineAuktion&auktionsID=
6205620&user=1367775&session=940192999698&

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: XS4ALL Internet BV (1:109/42)

+----------------------------------------------------------------------------+

From: tbretz@physik.tu-muenchen.de                      18-Oct-99 10:25:03
  To: All                                               18-Oct-99 10:22:24
Subj: Launching external processes

From: Thomas Bretz <tbretz@physik.tu-muenchen.de>

Hello,

I tried to start an external process from a multithreaded PM application
via
 - DosExecPgm
 - spawnvp
 - system

In the moment I call one of these functions the program crashes with
SYS3173. It is using DIVE and DART. Does anybody have an idea what's
wrong?

Thx,
Thomas.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Nathan Electronics (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                18-Oct-99 06:35:04
  To: All                                               18-Oct-99 10:22:24
Subj: HPFS volume usage

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

In my quest to find a relationship between the system usage of HPFS and the
size of the drive, I've found that I can't account for about 2MB on a 301MB
drive.

After adding up the directory band, hot fix sectors, spare DirBlks, etc., I
come up with a difference of 2MB between the drive size, and the drive's free
space, that can't be accounted for.

I haven't done an exact count of known usage, so I can't be sure, but it's
tempting to say that exactly one whole cylinder is unaccounted for (with the
current translation, one cylinder is 64 tracks/cyl * 63 sectors/track = 4032
sectors).

Anyone know what I'm missing?  


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: dmhills@ibm.net                                   19-Oct-99 00:51:09
  To: All                                               18-Oct-99 11:10:16
Subj: Re: HPFS volume usage

From: dmhills@ibm.net (Don Hills)

In article <gunaalzrvfgrelnubbpbz.fjso2k2.pminews@netnews.worldnet.att.net>,
"Mike Ruskai" <thannymeister@spambegone.yahoo.com> wrote:
>
>Anyone know what I'm missing?

You're likely missing one whole cylinder, there was a bug (that was
fixed a while back) where the disk driver would calculate the disk size
one cylinder smaller than the real size. I'm hazy on the details, try
Dejanews.

--
Don Hills      (dmhills at ibmdotnet)     Wellington, New Zealand

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Global Network Services - Remote Access Mail & Ne
(1:109/42)

+----------------------------------------------------------------------------+

From: bschnabl@telesnap.de                              18-Oct-99 14:54:21
  To: All                                               18-Oct-99 11:10:16
Subj: Re: Debugger terminates program by PM Resource Interlock message.

From: "b" <bschnabl@telesnap.de>

Hi,
Bernhard here again.

The problem with the debugger and the "PM Resource Interlock"
still exists.

All advices didn't work.

My critical working environment is Warp 4 FP 12, VageC++ 3.0 FP 8.

The same project that works quite beautiful on Warp 3 FP 22, VageC++ FP 8
has the interlock problem on Warp 4:
when I start the debugger in the workframe the only  ennabled thread
disappears immediately.

When I start icsdebug.exe explicitly and set some breakpoints anywhere the
PM Resource Interlock message appears in short time.

Fact is that other projects, o.k. they are smaller, doesn' t have this
problem with Warp 4. The debugger works correctly.


I' ve no idea what's going wrong.
May be you outside there?

Thanks Bernhard.






b schrieb in Nachricht <7td8v2$1mnr$1@news.lf.net>...
>Hi there,
>
>I've a problem with OS/2 Warp 4 and Visual Age C++ 3.0.
>When I'm going to debug my project the debugger stops with
>the message specified above.
>
>All Dll's are built quite new, so that the project fits.
>
>Thanks for any advices
>
>Bernhard Schnabl
>
>


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: LF.net GmbH, Stuttgart, Germany (1:109/42)

+----------------------------------------------------------------------------+

From: root@microsoft.com                                18-Oct-99 06:29:00
  To: All                                               18-Oct-99 11:10:17
Subj: How to load a dll with different extension?

From: root@microsoft.com (Bart/2 (Bartosz Tomasik))

Hey all
 simple question: how can I load a dll library (preferably using 
DosLoadModule) that has different extension than a *.dll I know that 
can be done eg: ImpOS/2 has it nls resources packed into a dll with 
*.nls extension.
 thanx
-------------------------------------------------
 Bart/2 irc:Ihsahn Bart2@asua.org.pl UIN:50890586
 Asu'a member    http://www.asua.org.pl
 TeamOS/2 Polska http://www.teamos2.org.pl

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Asu'a <http://www.asua.org.pl> (1:109/42)

+----------------------------------------------------------------------------+

From: mamodeo@stny.rr.com                               18-Oct-99 10:50:14
  To: All                                               18-Oct-99 14:36:02
Subj: Re: help!!! PGCC is not working

From: Marty <mamodeo@stny.rr.com>

"G. van der Veer" wrote:
> 
> Hi,
> 
> When I run any program (for example Squid) compiled in PGCC 1.1.3 or
> below I get the following message:
> 
> SYS0191: GCC29166 cannot be run in an OS/2 session.

This can happen in a DLL when the DLL itself is dynamically linked to
other DLLs and it can't find one of them.

For example:
My_Exe.EXE is linked to GCC29166.DLL which is dynamically linked to
BLAH.DLL which can't be found.  This error message would be reported if
you tried to run My_Exe.EXE.

- Marty

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Global Services North -- Burlington, Vermont,
(1:109/42)

+----------------------------------------------------------------------------+

From: bschnabl@telesnap.de                              18-Oct-99 17:01:26
  To: All                                               18-Oct-99 14:36:03
Subj: Debugger still terminates program by PM Resource Interlock!!

From: "b" <bschnabl@telesnap.de>

Hi,
Bernhard here again.
The problem with the debugger and the "PM Resource Interlock"
still exists.
All advices didn't work.
My critical working environment is Warp 4 FP 12, VageC++ 3.0 FP 8.
The same project that works quite beautiful on Warp 3 FP 22, VageC++ FP 8
has the interlock problem on Warp 4:
when I start the debugger in the workframe the only  ennabled thread
disappears immediately.
When I start icsdebug.exe explicitly and set some breakpoints anywhere the
PM Resource Interlock message appears in short time.
Fact is that other projects, o.k. they are smaller, doesn' t have this
problem with Warp 4. The debugger works correctly.

I' ve no idea what's going wrong.
May be you outside there?
Thanks Bernhard.





--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: LF.net GmbH, Stuttgart, Germany (1:109/42)

+----------------------------------------------------------------------------+

From: g.pfeiffer@asc.de                                 18-Oct-99 15:58:02
  To: All                                               18-Oct-99 14:36:03
Subj: Re: Problems with file handling

From: Gerald Pfeiffer <g.pfeiffer@asc.de>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello Mike,
<p>thank you for your mail.
<p>I'll check this.
<br>But I am not quite sure if the drive is faulty, because the problem
appaers on different systems. The systems are running without an error
for some days. Then some of the systems show this problem.
<p>Best regards
<p>Gerald</html>

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Origin Line 1 Goes Here (1:109/42)

+----------------------------------------------------------------------------+

From: g.pfeiffer@asc.de                                 18-Oct-99 16:26:28
  To: All                                               18-Oct-99 14:36:03
Subj: Re: Problems with file handling

From: Gerald Pfeiffer <g.pfeiffer@asc.de>

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello Mr. Harald Eilertsen,
<p>thank you for the information and your advice.
<p>We are using the Adaptec AIC7870 and AIC7880 SCSI controllers.
<p>I am now testing with new Adaptec 7800 Family drivers.
<p>Because of the fact that the problems do not occur immediately it might
take some days until I know if there is still a problem or if the previous
(old) driver caused the problems. To ensure the latter might take some
weeks.
<p>I always thought that the thread is blocked until the API-call is finished,
but I had no explaination for the described situation so I wasn't quite
sure any longer.
<p>Best regards / vennlig hilsen
<p>Gerald Pfeiffer
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;</html>

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Origin Line 1 Goes Here (1:109/42)

+----------------------------------------------------------------------------+

From: dmcbride@no.tower.spam.to.org                     18-Oct-99 16:58:13
  To: All                                               18-Oct-99 16:32:03
Subj: Re: How to load a dll with different extension?

From: "Darin McBride" <dmcbride@no.tower.spam.to.org>

On 18 Oct 1999 06:29:00 GMT, Bart/2 (Bartosz Tomasik) wrote:

>Hey all
> simple question: how can I load a dll library (preferably using 
>DosLoadModule) that has different extension than a *.dll I know that 
>can be done eg: ImpOS/2 has it nls resources packed into a dll with 
>*.nls extension.

Make sure you pass in the extension when using DosLoadModule.  You may have
to find the DLL yourself and pass in the full pathname, though, I can't
recall.
---
Disclaimer: unless explicitly mentioned otherwise, I do not speak
for the company I work for.



--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: @Home Network Canada (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                18-Oct-99 13:01:25
  To: All                                               18-Oct-99 16:32:03
Subj: Re: HPFS volume usage

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Tue, 19 Oct 1999 00:51:19 +1300, Don Hills wrote:

>In article <gunaalzrvfgrelnubbpbz.fjso2k2.pminews@netnews.worldnet.att.net>,
>"Mike Ruskai" <thannymeister@spambegone.yahoo.com> wrote:
>>
>>Anyone know what I'm missing?
>
>You're likely missing one whole cylinder, there was a bug (that was
>fixed a while back) where the disk driver would calculate the disk size
>one cylinder smaller than the real size. I'm hazy on the details, try
>Dejanews.

It does work out to just about one cylinder (which is 4032 sectors on the
drive in question).

Is that in reported total space, or reported free space?

The drive does in fact have the correct number of sectors.  I can read sector
0 right to the end, and write them all to a file, with no "sector not found"
problems.  

I'll have to try searching for info on that.


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: isaacl@sonics.ece.ubc.ca                          18-Oct-99 19:39:17
  To: All                                               18-Oct-99 22:36:23
Subj: Warpzilla Build Instructions?

From: isaacl@sonics.ece.ubc.ca (e-frog)

Is there any updated build instructions for Warpzilla? (If there is any
for VAC++ that would be even better).

The pages at mozilla/ports/os2 look REALLY dated, I can't tell what has
changed. Do they need some assistance updating the pages?


Thanks,
Isaac

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: ITServices, University of British Columbia (1:109/42)

+----------------------------------------------------------------------------+

From: void@nospam.demon.nl                              18-Oct-99 00:51:09
  To: All                                               19-Oct-99 03:31:02
Subj: Re: GNU "as" and "newer" instructions (like MMX, etc.)

From: huug <void@nospam.demon.nl>

>>>>> "Marty" == Marty  <mamodeo@stny.rr.com> writes:

Marty> Does the GNU assembler recognize and accept "newer" types of
Marty> opcodes like MMX instructions and Pentium-specific opcodes?  If

The latest one does.  Go to http://www.goof.com/pcg/os2 (homepage of the
Pentium optimized GCC port).

-- 
Note: I reserve the right to publish or return unsolicited, harassing or 
annoying (e-)mail.  /hy:x/                               PGP keyID: 0xDF28F4C1
"All are strange but thee and me; but sometimes thee acts funny."- Chuck Blake

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: voluntary (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                19-Oct-99 07:55:01
  To: All                                               19-Oct-99 10:32:23
Subj: Re: System area on HPFS drive

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Tue, 19 Oct 1999 08:42:34 +0100, Gerald Pfeiffer wrote:

>
>Mike Ruskai schrieb:
>
>> Anyone know how to query the size of the system area on an HPFS drive?
>>
>> --
>>  - Mike
>>
>> Remove 'spambegone' to send e-mail.
>
>Hello Mike,
>
>you can find a description of the HPFS and its structures in the article
>series
>"Inside the High Performance File System" at EDM/2.
>
>http://www.edm2.com/0410/hpfs1.html
>http://www.edm2.com/0411/hpfs2.html
>http://www.edm2.com/0501/hpfs3.html
>http://www.edm2.com/0502/hpfs4.html
>http://www.edm2.com/0503/hpfs5.html
>http://www.edm2.com/0504/hpfs6.html
>
>There are REXX sources to show the structures, too.

I'm way past that point.  Right now I'm stuck trying to figure out why
there's a discrepancy of apparently one whole cylinder between the total
drive space, and reported free drive space, taking into account HPFS's space
usage.


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: dholmes@trellis.net                               19-Oct-99 08:45:25
  To: All                                               19-Oct-99 12:51:29
Subj: Re: Warpzilla Build Instructions?

From: Dan Holmes <dholmes@trellis.net>

e-frog wrote:
> 
> Is there any updated build instructions for Warpzilla? (If there is any
> for VAC++ that would be even better).
> 
> The pages at mozilla/ports/os2 look REALLY dated, I can't tell what has
> changed. Do they need some assistance updating the pages?
> 
> Thanks,
> Isaac

Try posting on news://news.mozilla.org.  There is a group
for the OS2 build.  They could really use the help.  I do
know that the group is behind the tip and there is alot of
catching up to do.  The NG is netscape.public.mozilla.os2
-- 
-------------------
Dan Holmes
Integrated Visual Systems, Inc.
voice 704-847-3379
fax   704-847-4655
mailto:dholmes@trellis.net
work -> http://www.ivsi.com
play -> http://www.geocities.com/heartland/hollow/3097

Insert Disclaimer:
Most of the time i think for myself, at least that is what
they tell me.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Origin Line 1 Goes Here (1:109/42)

+----------------------------------------------------------------------------+

From: blaschke@us.ibm.com                               19-Oct-99 10:46:00
  To: All                                               19-Oct-99 12:51:29
Subj: Re: Launching external processes

From: Dave Blaschke <blaschke@us.ibm.com>


Thomas Bretz wrote:

> Hello,
>
> I tried to start an external process from a multithreaded PM application
> via
>  - DosExecPgm
>  - spawnvp
>  - system
>
> In the moment I call one of these functions the program crashes with
> SYS3173. It is using DIVE and DART. Does anybody have an idea what's
> wrong?

Well, SYS3173 indicates that there is a breakpoint (int 3) being hit
somewhere, perhaps in your external process?  Can you run this external
process from the command line normally?  What type of process is the
external one (VIO, VIOABLE, PM)?  If it is different from your PM app, then
you need to use DosStartSession instead.  If it is PM also, then DosExecPgm
should be OK, and you may want to check if you are using either of the flags
(third parameter) that indicates debugging.

>
>
> Thx,
> Thomas.



--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Austin (1:109/42)

+----------------------------------------------------------------------------+

From: blaschke@us.ibm.com                               19-Oct-99 10:55:17
  To: All                                               19-Oct-99 16:46:05
Subj: Re: How to load a dll with different extension?

From: Dave Blaschke <blaschke@us.ibm.com>


Bart/2 (Bartosz Tomasik) wrote:

> Hey all
>  simple question: how can I load a dll library (preferably using
> DosLoadModule) that has different extension than a *.dll I know that
> can be done eg: ImpOS/2 has it nls resources packed into a dll with
> *.nls extension.
>  thanx

You will have to specify the complete path name and and extension (i.e.
C:\TEST\ABC.NLS) but DosLoadModule should work OK...

> -------------------------------------------------
>  Bart/2 irc:Ihsahn Bart2@asua.org.pl UIN:50890586
>  Asu'a member    http://www.asua.org.pl
>  TeamOS/2 Polska http://www.teamos2.org.pl



--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Austin (1:109/42)

+----------------------------------------------------------------------------+

From: branchsys@anz.co.nz                               19-Oct-99 17:28:23
  To: All                                               19-Oct-99 23:36:04
Subj: Emulating dialog using control windows

From: "Branch Systems" <branchsys@anz.co.nz>

I am trying to emulate another app of mine that uses a dialog box, by using
WinCreateStdWindow to createthe frame and client and then using
WinCreateWindow in the WM_CREATE processing to create the individual control
windows - some static texts, two entryfields some group boxes and a
pushbutton.
I have managed to create size and position the controls ok, but the major
problem is the key handling - the default dialog window processing seems to
handle:
- an ENTER key  resulting in the default pushbutton being pushed
- tabbing from field to field
I have no managed to get the two above tasks to work.
Does anyone have a code for a working example of a similar app that they
could post?
Thanks.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: CLEAR Net New Zealand (1:109/42)

+----------------------------------------------------------------------------+

From: g.pfeiffer@asc.de                                 19-Oct-99 08:42:17
  To: All                                               19-Oct-99 23:36:05
Subj: Re: System area on HPFS drive

From: Gerald Pfeiffer <g.pfeiffer@asc.de>


Mike Ruskai schrieb:

> Anyone know how to query the size of the system area on an HPFS drive?
>
> --
>  - Mike
>
> Remove 'spambegone' to send e-mail.

Hello Mike,

you can find a description of the HPFS and its structures in the article
series
"Inside the High Performance File System" at EDM/2.

http://www.edm2.com/0410/hpfs1.html
http://www.edm2.com/0411/hpfs2.html
http://www.edm2.com/0501/hpfs3.html
http://www.edm2.com/0502/hpfs4.html
http://www.edm2.com/0503/hpfs5.html
http://www.edm2.com/0504/hpfs6.html

There are REXX sources to show the structures, too.

Best regards

Gerald

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Origin Line 1 Goes Here (1:109/42)

+----------------------------------------------------------------------------+

From: yourself@127.0.0.1                                20-Oct-99 04:26:01
  To: All                                               20-Oct-99 03:24:08
Subj: DeskMan2QuerySetup

From: yourself@127.0.0.1 (Rich Walsh)

I'd like my WPS classes to support this method but I haven't a
clue how to do so.  Can anyone point me at some documentation?


   == == almost usable email address:  rlwalshATpacket.net == ==

___________________________________________________________________

                |             - DragText v3.1 -
Rich Walsh      |  A Distinctly Different Desktop Enhancement
Ft Myers, FL    |  New!  Pickup & Drop for text, and more...
                |  http://www.usacomputers.net/personal/rlwalsh/
___________________________________________________________________

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: http://extra.newsguy.com (1:109/42)

+----------------------------------------------------------------------------+

From: asmirnov@sendmail.mid.ru                          20-Oct-99 19:36:11
  To: All                                               20-Oct-99 19:50:27
Subj: Calling DosDevIOControl  for ResourceManager Investigation

From: Alexey Smirnov <asmirnov@sendmail.mid.ru>

Dear Frieds!
    I am a Russian programmer, who wrote a SysInfo/2 program. Now you
can find in Hobbes my last beta (file name is SYSINFO0038.ZIP). Now I am
working on Resource Tree page and I want to enumerate OS/2 resources
using DosDevIOControl function (function 0x80, subfunction 0x01 and
0x02). Please, HELP ME!
    When I call DosDevIOControl (func. 0x80, subfunc. 0x02 -> "traverses
the resource manager node structure...") with proper HANDLE (previously
getting from DosOpen function) - I get reasonable output (RC=0, and
Resources enumerated).
    But when I pass Resource Manager Handle, obtained from the first
step to DosDevIOControl (func. 0x80, subfunc. 0x01 -> "returns the
contents of resource manager node indicated by the handle provided") -
its returns an ERROR (RC= -244). I don't understand and can't find this
error code. Buffer, that I pass to DosDevIOControl is quite enuf. What
shell I do?
    Did anybody work with this functions? Can you help me to understand
a problem?

Best regards, Alexey Smirnov.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Combellga (1:109/42)

+----------------------------------------------------------------------------+

From: csaba.raduly@sophos.com                           20-Oct-99 14:51:21
  To: All                                               20-Oct-99 19:50:27
Subj: Re: System area on HPFS drive

From: Csaba Raduly <csaba.raduly@sophos.com>

Mike Ruskai wrote:
> 
> On Tue, 19 Oct 1999 08:42:34 +0100, Gerald Pfeiffer wrote:
> >Mike Ruskai schrieb:
> >> Anyone know how to query the size of the system area on an HPFS drive?
[snip]
> 
> I'm way past that point.  Right now I'm stuck trying to figure out why
> there's a discrepancy of apparently one whole cylinder between the total
> drive space, and reported free drive space, taking into account HPFS's space
> usage.
> 
IIRC some BIOSes actually report one track less than the Real Thing.
They reserve that track for diagnostics purposes.

Csaba

-- 
-----BEGIN GEEK CODE BLOCK----- 
Version 3.1
GCS/>GMU d- s:- a30 C++$ UL+ P+>+++ L++ E- W+ N++ o? K? w++>$ O++$ M-
V- PS PE Y PGP- t+ 5 X++ R* tv++ b++ DI+++ D++ G- e+++ h-- r-- !y+
-----END GEEK CODE BLOCK----- 

Csaba Raduly,    Software Developer (OS/2),    Sophos Anti-Virus
mailto:csaba.raduly@sophos.com            http://www.sophos.com/
US Support +1 888 SOPHOS 9            UK Support +44 1235 559933
Life is complex, with real and imaginary parts.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: SOPHOS Plc (1:109/42)

+----------------------------------------------------------------------------+

From: glen@rockyhorror.Zkaroo.co.uk                     20-Oct-99 15:30:02
  To: All                                               20-Oct-99 19:50:27
Subj: HPFS BootBlock

From: glen@rockyhorror.Zkaroo.co.uk (Glen D)

Hi all,

Could someone post a detailed description of how the BootBlock is
arranged.  The EDM/2 articles don't give much attention to its
contents.

Thanks in advance,

Glen D
-<remove Z from my e-mail address>-

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Customer of Planet Online (1:109/42)

+----------------------------------------------------------------------------+

From: charette@writeme.com                              20-Oct-99 20:39:26
  To: seg@us.ibm.com                                    20-Oct-99 19:50:28
Subj: Re: DosQuerySysInfo question

To: seg@us.ibm.com
From: Stephane Charette <charette@writeme.com>

> All the DosQuerySysInfo defines are documented. As
> of the latest toolkit, the defines are as below. I
> leave it to others to explicate.
>
> #define INDX_NUMPROCESSORS              26
> #define INDX_MAXHPRMEM                  27
> #define INDX_MAXHSHMEM                  28
> #define INDX_MAXPROCESSES               29
> #define INDX_VIRTUALADDRESSLIMIT        30
> #define INDX_INT10ENABLED               31

Where can I find these?  I've got the latest Warp 4
toolkit installed from the April 1999 DevCon (member
disk #24), but I find no reference to anything past
index 26, QSV_NUMPROCESSORS.

The last index that seems to work on these 2 OS/2
Warp 4 fixpak 11 (?) boxes is #27.

The last index in the BSEDOS.H file (4-27-1998,
101361 bytes) is #25.

Stephane Charette


Sent via Deja.com http://www.deja.com/
Before you buy.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: StephNET (1:109/42)

+----------------------------------------------------------------------------+

From: charette@writeme.com                              20-Oct-99 21:30:18
  To: seg@us.ibm.com                                    20-Oct-99 19:50:28
Subj: Re: DosQuerySysInfo question

To: seg@us.ibm.com
From: Stephane Charette <charette@writeme.com>

My fault -- I have 3 different versions of the OS/2
Warp 4 toolkit installed:

VAC++ v3.08:     BSEDOS.H, 4-26-1995,  99684 bytes
DevCon disk A3:  BSEDOS.H, 4-27-1998, 101361 bytes
DevCon disk M24: BSEDOS.H, 1-20-1999, 114018 bytes

The file from 1-20-1999 does contain the new QSV_*
values.

Who would have guessed that the member-level version
of DevCon contains newer files than the advanced
level?!

Thanks,

Stephane Charette


Sent via Deja.com http://www.deja.com/
Before you buy.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: StephNET (1:109/42)

+----------------------------------------------------------------------------+

From: niclas.lindstrom@edt.ericsson.se                  21-Oct-99 13:37:20
  To: All                                               21-Oct-99 10:33:27
Subj: How do I read and write ethernet packets?

From: Niclas =?iso-8859-1?Q?Lindstr”m?= <niclas.lindstrom@edt.ericsson.se>

Are there any API's in OS/2 that can be used to read and
write ehternet frames directly from/to the lan-adapter so
I can analyze the ethernet header, modify it and send it
back out on the ethernet again..?

Regards
Niclas Lindstr”m

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: L M Ericsson Data AB (1:109/42)

+----------------------------------------------------------------------------+

From: stefand@lcam.u-psud.fr                            21-Oct-99 11:53:05
  To: All                                               21-Oct-99 10:33:27
Subj: Re: System area on HPFS drive

From: stefand@lcam.u-psud.fr (Stefan A. Deutscher)

On Wed, 20 Oct 1999 14:51:42 +0100, Csaba Raduly
<csaba.raduly@sophos.com> wrote:
>Mike Ruskai wrote:
>> [ ... snip ...] Right now I'm stuck trying to figure out why there's
>> a discrepancy of apparently one whole cylinder between the total
>> drive space, and reported free drive space, taking into account
>> HPFS's space usage.

>IIRC some BIOSes actually report one track less than the Real Thing.
>They reserve that track for diagnostics purposes.

Not sure it has anything to do with the bios. In the readmes to one of
the later idedasd.exe drivers it is stated that some more free space
will show up in fdisk after installation of the new driver, and that
that space is real and can be partitioned and used. Supposedly, it was
not seen by the Warp 4 GA drivers. Maybe this is related to the
discrepancy you're seein?

 Cheers,
              Stefan


-- 
=========================================================================
Stefan A. Deutscher                       | (+33-(0)1)   voice      fax
Laboratoire des Collisions Atomiques et   | LCAM :  6915-7699  6915-7671
Mol\'{e}culaires (LCAM), B\^{a}timent 351 | home :  5624-0992  call first
Universit\'{e} de Paris-Sud               | email:  sad@utk.edu 
91405 Orsay Cedex, France (Europe)        |         (forwarded to France)
=========================================================================
 Do you know what they call a quarter-pounder with cheese in Paris?

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Universite Paris-Sud, France. (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                21-Oct-99 08:46:12
  To: All                                               21-Oct-99 14:39:10
Subj: Re: Calling DosDevIOControl  for ResourceManager Investigation

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Wed, 20 Oct 1999 19:36:22 +0400, Alexey Smirnov wrote:

>Dear Frieds!
>    I am a Russian programmer, who wrote a SysInfo/2 program. Now you
>can find in Hobbes my last beta (file name is SYSINFO0038.ZIP). Now I am
>working on Resource Tree page and I want to enumerate OS/2 resources
>using DosDevIOControl function (function 0x80, subfunction 0x01 and
>0x02). Please, HELP ME!
>    When I call DosDevIOControl (func. 0x80, subfunc. 0x02 -> "traverses
>the resource manager node structure...") with proper HANDLE (previously
>getting from DosOpen function) - I get reasonable output (RC=0, and
>Resources enumerated).
>    But when I pass Resource Manager Handle, obtained from the first
>step to DosDevIOControl (func. 0x80, subfunc. 0x01 -> "returns the
>contents of resource manager node indicated by the handle provided") -
>its returns an ERROR (RC= -244). I don't understand and can't find this
>error code. Buffer, that I pass to DosDevIOControl is quite enuf. What
>shell I do?
>    Did anybody work with this functions? Can you help me to understand
>a problem?

The first thing you should do is declare the RC variable as APIRET, so
that it's an unsigned long integer (as it should be).  

Then you might find the error code.  Since I've never dealt with any of
the resource manager information, that's all I can say for now.



 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: asmirnov@sendmail.mid.ru                          21-Oct-99 17:59:05
  To: All                                               21-Oct-99 14:39:10
Subj: Re: Calling DosDevIOControl  for ResourceManager Investigation

From: Alexey Smirnov <asmirnov@sendmail.mid.ru>

> The first thing you should do is declare the RC variable as APIRET, so
> that it's an unsigned long integer (as it should be).
>
> Then you might find the error code.  Since I've never dealt with any of
> the resource manager information, that's all I can say for now.
>
>  - Mike
>

Hi, Mike!
    Well, well... If I declare RC like LongWord (Unsigned integer with 4 byte
length) - I get RC=65292. I can't find *ANY* discription of this error code
anywhere in *.INF, *.HLP or *.H files I have.

Best regards, Alexey Smirnov.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Combellga (1:109/42)

+----------------------------------------------------------------------------+

From: asmirnov@sendmail.mid.ru                          21-Oct-99 18:20:04
  To: All                                               21-Oct-99 14:39:11
Subj: Re: Calling DosDevIOControl  for ResourceManager Investigation (more..)

From: Alexey Smirnov <asmirnov@sendmail.mid.ru>

> The first thing you should do is declare the RC variable as APIRET, so
> that it's an unsigned long integer (as it should be).
>
> Then you might find the error code.  Since I've never dealt with any of
> the resource manager information, that's all I can say for now.
>
>  - Mike

One more: Calling DosErrClass with RC=65292 I get
    ErrorClass      = 13 (UNKNOWN)
    ErrorAction    = 4   (ABORT YOUR PROGRAM)
    ErrorLocus    = 1   (UNKNOWN)

What does it mean?

Alexey

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Combellga (1:109/42)

+----------------------------------------------------------------------------+

From: jSePnAsMaBjOcTe@w271zrz.zrz.tu-b...               21-Oct-99 15:49:14
  To: All                                               21-Oct-99 14:39:11
Subj: Re: Calling DosDevIOControl  for ResourceManager Investigation

Message sender: jSePnAsMaBjOcTe@w271zrz.zrz.tu-berlin.de

From: jSePnAsMaBjOcTe@w271zrz.zrz.tu-berlin.de (Jens Glathe)

On Thu, 21 Oct 1999 13:59:10, Alexey Smirnov 
<asmirnov@sendmail.mid.ru> wrote:

Greetings!

> Hi, Mike!
>     Well, well... If I declare RC like LongWord (Unsigned integer with 4
byte
> length) - I get RC=65292. I can't find *ANY* discription of this error code
> anywhere in *.INF, *.HLP or *.H files I have.
> 
> Best regards, Alexey Smirnov.

65292==0xFF0C, which is a defined return code for device drivers. You 
can find them in the control program reference (I hope so), and in the
PDD reference. The codes are defined in bseerr.h, and start with 
ERROR_I24_. Your return code means ERROR_I24_GEN_FAILURE. Now we know 
a lot more :)

with best regards,

Jens Glathe <glathe at gmx dot de>

-- 
Never trust a programmer who is carrying a screwdriver.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Technical University Berlin, Germany (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                21-Oct-99 10:30:18
  To: All                                               21-Oct-99 14:39:11
Subj: Re: System area on HPFS drive

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Wed, 20 Oct 1999 14:51:42 +0100, Csaba Raduly wrote:

>Mike Ruskai wrote:
>> 
>> On Tue, 19 Oct 1999 08:42:34 +0100, Gerald Pfeiffer wrote:
>> >Mike Ruskai schrieb:
>> >> Anyone know how to query the size of the system area on an HPFS drive?
>[snip]
>> 
>> I'm way past that point.  Right now I'm stuck trying to figure out why
>> there's a discrepancy of apparently one whole cylinder between the total
>> drive space, and reported free drive space, taking into account HPFS's
space
>> usage.
>> 
>IIRC some BIOSes actually report one track less than the Real Thing.
>They reserve that track for diagnostics purposes.

The BIOS isn't involved here.  What I've found is that OS/2 is reporting
exactly 4096 sectors less freespace than is indicated by the freespace
bitmaps on the drive.  It does so on every HPFS drive I have on two systems.

What I'd like to do know is distribute the program that does that work, to
get more info.  However, I'm not sure exactly how HPFS handles drives larger
than 4GB.  The normal freespace bitmap list can handle 512 data bands, which
comes out to 4GB for a drive with 512-byte sectors.  

There's an entry for a spare freespace bitmap list in the SuperBlock, but I
can't find any information about how long this list is.  If it's another four
sectors, then HPFS dies at 8GB (which I know it doesn't).  So, either there
are more freespace bitmap lists stored outside of the SuperBlock, or the
secondary list is more than four sectors long.  In the latter case, I need to
know where the length is stored.  Since I don't have any logical drives over
4GB, I can only go by whatever documentation I find.


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                21-Oct-99 10:34:01
  To: All                                               21-Oct-99 14:39:11
Subj: Re: System area on HPFS drive

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On 21 Oct 1999 11:53:11 GMT, Stefan A. Deutscher wrote:

>On Wed, 20 Oct 1999 14:51:42 +0100, Csaba Raduly
><csaba.raduly@sophos.com> wrote:
>>Mike Ruskai wrote:
>>> [ ... snip ...] Right now I'm stuck trying to figure out why there's
>>> a discrepancy of apparently one whole cylinder between the total
>>> drive space, and reported free drive space, taking into account
>>> HPFS's space usage.
>
>>IIRC some BIOSes actually report one track less than the Real Thing.
>>They reserve that track for diagnostics purposes.
>
>Not sure it has anything to do with the bios. In the readmes to one of
>the later idedasd.exe drivers it is stated that some more free space
>will show up in fdisk after installation of the new driver, and that
>that space is real and can be partitioned and used. Supposedly, it was
>not seen by the Warp 4 GA drivers. Maybe this is related to the
>discrepancy you're seein?

No, that's referring to space on the physical drive.  I'm referring to space
on a logical drive.  If you subtract reported free space from total space,
you get a number that's 2MB larger than all of the HPFS structures on the
drive.

If you traverse the freespace bitmaps on the drive, and tally up the free
sectors, you come up with a number exactly 2MB larger than what's reported by
API's like DosQueryFSInfo().  However, write operations will fail with a disk
full error if you attempt to write that extra 2MB, after the disk is reported
full.


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: jdosbor@revealed.net                              21-Oct-99 08:53:04
  To: All                                               21-Oct-99 14:39:11
Subj: stuff keystrokes into Netscape for OS/2 2.02

From: "jim osborne" <jdosbor@revealed.net>

i can get the window handle of a running copy of netscap 2.02 from the
switch list and send the copy a WM_QUIT and kill it, how do i send
a series of WM_CHAR   messages to netscape to drive a running copy to a new
URL?
tx jim osborne


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: http://extra.newsguy.com (1:109/42)

+----------------------------------------------------------------------------+

From: bschnabl@telesnap.de                              21-Oct-99 17:31:23
  To: All                                               21-Oct-99 14:39:11
Subj: Re: Debugger still terminates program by PM Resource Interlock!!

From: "b" <bschnabl@telesnap.de>

Hi,
I've found a solution for my debugger problem.
I only had to take an older FP like FP6 for OS/2 Warp 4.
The debugger works fine now.
Thanks for your interest.


Ciao Bernhard.





b schrieb in Nachricht <7ufckp$qfm$1@news.lf.net>...
>Hi,
>Bernhard here again.
>The problem with the debugger and the "PM Resource Interlock"
>still exists.
>All advices didn't work.
>My critical working environment is Warp 4 FP 12, VageC++ 3.0 FP 8.
>The same project that works quite beautiful on Warp 3 FP 22, VageC++ FP 8
>has the interlock problem on Warp 4:
>when I start the debugger in the workframe the only  ennabled thread
>disappears immediately.
>When I start icsdebug.exe explicitly and set some breakpoints anywhere the
>PM Resource Interlock message appears in short time.
>Fact is that other projects, o.k. they are smaller, doesn' t have this
>problem with Warp 4. The debugger works correctly.
>
>I' ve no idea what's going wrong.
>May be you outside there?
>Thanks Bernhard.
>
>
>
>
>


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: LF.net GmbH, Stuttgart, Germany (1:109/42)

+----------------------------------------------------------------------------+

From: frank.palmisano@ssa.gov                           21-Oct-99 10:50:10
  To: All                                               21-Oct-99 14:39:11
Subj: Re: Is there a Kill Command?

From: "Frank" <frank.palmisano@ssa.gov>

Adrian Gschwend <nospam_ktk@netlabs.org> wrote in message
news:xgxargynofbet.fjz2470.pminews@news.aart.ch...
> On Thu, 21 Oct 1999 10:12:04 -0500, Frank wrote:
>
> >    Thanks for the lead but I need to know if there is something
intrinsic
> >in OS/2 to provide this functionality.  I already have some freeware to
do
> >it but it is a long story....
>
> ah, I see. I don't know about built in functionality, maybe you should ask
in
> comp.os.os2.programmer.*
>
> cu
>
> Adrian
>
>
> ---
> Adrian Gschwend
> @ OS/2 Netlabs
>
> ICQ: 22419590
> ktk@netlabs.org
> -------
> The OS/2 OpenSource Project:
> http://www.netlabs.org
>
>


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Social Security Administration (1:109/42)

+----------------------------------------------------------------------------+

From: vlabella@comp.uark.edu                            21-Oct-99 11:02:27
  To: All                                               21-Oct-99 16:48:12
Subj: FS: OS/2 Programming books with disks

From: "Vincent P. LaBella" <vlabella@comp.uark.edu>

Look,
	Seven OS/2 programming books are for sale on ebay, all if not most
are out of print!
	Petzold, Schildt etc.

Goto

http://cgi.ebay.com/aw-cgi/eBayISAPI.dll?ViewItem&item=185667527

for more info

=|Vincent P. LaBella vlabella@comp.uark.edu University of Arkansas 
Dept. of Physics   Fayetteville, AR 72701  501-575-4313 FAX:4781|=

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: The University of Arkansas (1:109/42)

+----------------------------------------------------------------------------+

From: mamodeo@stny.rr.com                               21-Oct-99 12:43:10
  To: All                                               21-Oct-99 16:48:12
Subj: Re: System area on HPFS drive

From: Marty <mamodeo@stny.rr.com>

Mike Ruskai wrote:
> 
> On 21 Oct 1999 11:53:11 GMT, Stefan A. Deutscher wrote:
> 
> >On Wed, 20 Oct 1999 14:51:42 +0100, Csaba Raduly
> ><csaba.raduly@sophos.com> wrote:
> >>Mike Ruskai wrote:
> >>> [ ... snip ...] Right now I'm stuck trying to figure out why there's
> >>> a discrepancy of apparently one whole cylinder between the total
> >>> drive space, and reported free drive space, taking into account
> >>> HPFS's space usage.
> >
> >>IIRC some BIOSes actually report one track less than the Real Thing.
> >>They reserve that track for diagnostics purposes.
> >
> >Not sure it has anything to do with the bios. In the readmes to one of
> >the later idedasd.exe drivers it is stated that some more free space
> >will show up in fdisk after installation of the new driver, and that
> >that space is real and can be partitioned and used. Supposedly, it was
> >not seen by the Warp 4 GA drivers. Maybe this is related to the
> >discrepancy you're seein?
> 
> No, that's referring to space on the physical drive.  I'm referring to space
> on a logical drive.  If you subtract reported free space from total space,
> you get a number that's 2MB larger than all of the HPFS structures on the
> drive.
> 
> If you traverse the freespace bitmaps on the drive, and tally up the free
> sectors, you come up with a number exactly 2MB larger than what's reported
by
> API's like DosQueryFSInfo().  However, write operations will fail with a
disk
> full error if you attempt to write that extra 2MB, after the disk is
reported
> full.

I'm a bit outta my league here, but isn't that the 2MB that shows up
under the "reserved for system use" column during a CHKDSK?

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Global Services North -- Burlington, Vermont,
(1:109/42)

+----------------------------------------------------------------------------+

From: mamodeo@stny.rr.com                               21-Oct-99 12:49:10
  To: All                                               21-Oct-99 16:48:12
Subj: Re: stuff keystrokes into Netscape for OS/2 2.02

From: Marty <mamodeo@stny.rr.com>

jim osborne wrote:
> 
> i can get the window handle of a running copy of netscap 2.02 from the
> switch list and send the copy a WM_QUIT and kill it, how do i send
> a series of WM_CHAR   messages to netscape to drive a running copy to a new
> URL?
> tx jim osborne

I'm sure there's a better way than sending WM_CHAR messages.  You have
no idea which control within Netscape has the focus, so you can't use
the keyboard to navigate.  I'm certain that there are DDE messages to do
what you desire.  Also, with Netscape 4.61 and up, just running the
executable again with a command line parameter of the desired URL makes
your <existing running copy> go to the URL as you desire.

- Marty

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Global Services North -- Burlington, Vermont,
(1:109/42)

+----------------------------------------------------------------------------+

From: mamodeo@stny.rr.com                               21-Oct-99 12:53:01
  To: All                                               21-Oct-99 16:48:12
Subj: Re: Is there a Kill Command?

From: Marty <mamodeo@stny.rr.com>

Frank wrote:
> 
> Adrian Gschwend <nospam_ktk@netlabs.org> wrote in message
> news:xgxargynofbet.fjz2470.pminews@news.aart.ch...
> > On Thu, 21 Oct 1999 10:12:04 -0500, Frank wrote:
> >
> > >    Thanks for the lead but I need to know if there is something
> intrinsic
> > >in OS/2 to provide this functionality.  I already have some freeware to
> do
> > >it but it is a long story....
> >
> > ah, I see. I don't know about built in functionality, maybe you should ask
> in
> > comp.os.os2.programmer.*
> >
> > cu
> >
> > Adrian

Death.Exe (which comes with XF86Sup.SYS) works fairly well if it is the
first method you use to try to kill something.  If you try and fail to
kill it with something else and then try death, it doesn't work too
well.

The only builtin process killer is the KILLFEATUREENABLED version of
WarpCenter which doesn't usually work too well.

- Marty

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: IBM Global Services North -- Burlington, Vermont,
(1:109/42)

+----------------------------------------------------------------------------+

From: fBeythien@gmx.de                                  21-Oct-99 16:32:02
  To: All                                               21-Oct-99 16:48:12
Subj: Re: DosQuerySysInfo question

From: fBeythien@gmx.de (Frank Beythien)

On Wed, 20 Oct 1999 21:30:37, Stephane Charette <charette@writeme.com>
wrote:

> My fault -- I have 3 different versions of the OS/2
> Warp 4 toolkit installed:
> 
> VAC++ v3.08:     BSEDOS.H, 4-26-1995,  99684 bytes
> DevCon disk A3:  BSEDOS.H, 4-27-1998, 101361 bytes
> DevCon disk M24: BSEDOS.H, 1-20-1999, 114018 bytes
> 
> The file from 1-20-1999 does contain the new QSV_*
> values.
> 
> Who would have guessed that the member-level version
> of DevCon contains newer files than the advanced
> level?!

Take the one from CD A2  July 1999  DevCon Version

CU/2
-- 
Frank Beythien   fBeythien@gmx.de

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Prima e.V. - Dortmund - Germany (1:109/42)

+----------------------------------------------------------------------------+

From: fBeythien@gmx.de                                  21-Oct-99 16:28:19
  To: All                                               21-Oct-99 16:48:12
Subj: Re: Calling DosDevIOControl  for ResourceManager Investigation

From: fBeythien@gmx.de (Frank Beythien)

On Wed, 20 Oct 1999 15:36:22, Alexey Smirnov
<asmirnov@sendmail.mid.ru> wrote:

Hello Alexey,


> Dear Frieds!
>     I am a Russian programmer, who wrote a SysInfo/2 program. Now you
> can find in Hobbes my last beta (file name is SYSINFO0038.ZIP). Now I am
> working on Resource Tree page and I want to enumerate OS/2 resources
> using DosDevIOControl function (function 0x80, subfunction 0x01 and
> 0x02). Please, HELP ME!
>     When I call DosDevIOControl (func. 0x80, subfunc. 0x02 -> "traverses
> the resource manager node structure...") with proper HANDLE (previously
> getting from DosOpen function) - I get reasonable output (RC=0, and
> Resources enumerated).
>     But when I pass Resource Manager Handle, obtained from the first
> step to DosDevIOControl (func. 0x80, subfunc. 0x01 -> "returns the
> contents of resource manager node indicated by the handle provided") -
> its returns an ERROR (RC= -244). I don't understand and can't find this
> error code. Buffer, that I pass to DosDevIOControl is quite enuf. What
> shell I do?
>     Did anybody work with this functions? Can you help me to understand
> a problem?

Well, -244 gives x'FF0C' in hex. This looks like a returncode from the
DD. I don't have the DDK with me , so I can't interpret it. After
reading the CPREFx.INF, I think you got it the wrong way round, or I
misunderstood the docs. Aren't you supposed to pass the handle(s)
gotten by subfunction 2 to pass to subfunc 1 to get the RM data?
By the way, you only will get info about drivers which called the RM.
Most (all?) Lancards don't

CU/2
Frank

--
Frank Beythien   fBeythien@gmx.de

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Prima e.V. - Dortmund - Germany (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                21-Oct-99 15:22:27
  To: All                                               21-Oct-99 16:48:12
Subj: Re: System area on HPFS drive

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Thu, 21 Oct 1999 12:43:21 -0400, Marty wrote:

>Mike Ruskai wrote:
>> 
>> On 21 Oct 1999 11:53:11 GMT, Stefan A. Deutscher wrote:
>> 
>> >On Wed, 20 Oct 1999 14:51:42 +0100, Csaba Raduly
>> ><csaba.raduly@sophos.com> wrote:
>> >>Mike Ruskai wrote:
>> >>> [ ... snip ...] Right now I'm stuck trying to figure out why there's
>> >>> a discrepancy of apparently one whole cylinder between the total
>> >>> drive space, and reported free drive space, taking into account
>> >>> HPFS's space usage.
>> >
>> >>IIRC some BIOSes actually report one track less than the Real Thing.
>> >>They reserve that track for diagnostics purposes.
>> >
>> >Not sure it has anything to do with the bios. In the readmes to one of
>> >the later idedasd.exe drivers it is stated that some more free space
>> >will show up in fdisk after installation of the new driver, and that
>> >that space is real and can be partitioned and used. Supposedly, it was
>> >not seen by the Warp 4 GA drivers. Maybe this is related to the
>> >discrepancy you're seein?
>> 
>> No, that's referring to space on the physical drive.  I'm referring to
space
>> on a logical drive.  If you subtract reported free space from total space,
>> you get a number that's 2MB larger than all of the HPFS structures on the
>> drive.
>> 
>> If you traverse the freespace bitmaps on the drive, and tally up the free
>> sectors, you come up with a number exactly 2MB larger than what's reported
by
>> API's like DosQueryFSInfo().  However, write operations will fail with a
disk
>> full error if you attempt to write that extra 2MB, after the disk is
reported
>> full.
>
>I'm a bit outta my league here, but isn't that the 2MB that shows up
>under the "reserved for system use" column during a CHKDSK?

Amuse yourself.  Run CHKDSK on a drive, then run CHKDSK /F on the same drive
(obviously, one not in use).  Note the different numbers it reports for
"system use".  Also not the different numbers for available space.

When you use /F, it's closer to correct, but all it's doing is using the
difference between total space and free space, minus the space consumed by
files.  It's very evident on an empty drive.

2MB of that space is unaccounted for, however.  When you add up the size of
the directory band, the freespace bitmaps, hidden sectors on the drive
(unused sectors before the boot sector), and the first 25 sectors of the
drive (after hidden sectors), you get a number 2MB less than what CHKDSK /F
reports as reserved for system use.  

What I'm saying is that 2MB is actually free, according to the freespace
bitmaps on the drive (their sector offset is stored in a 4-sector list,
pointed to by offset 0x18 in LSN 16, the HPFS SuperBlock).  But it's not free
according to whatever DosQueryFSInfo() is using to get the free sector count.

This program will show you, thought it won't work on a drive larger than 4GB
(given 512-byte sectors):

#define INCL_DOSDEVICES
#define INCL_DOSDEVIOCTL
#define INCL_DOSFILEMGR
#define INCL_DOSERRORS
#include <os2.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>

#define FAIL_USAGE 3
#define FAIL_BAD_DRIVE_STRING 4
#define FAIL_INVALID_DRIVE 5
#define FAIL_UNKNOWN_FSTYPE 6
#define FAIL_NOT_HPFS 7
#define FAIL_OPEN_DRIVE 8
#define FAIL_FILE_POINTER 9
#define FAIL_UNKNOWN_SECTOR_SIZE 10
#define FAIL_BAD_SECTOR_SIZE 11
#define FAIL_READ_DRIVE 13
#define FAIL_WRITE_DRIVE 14
#define FAIL_MEMORY_ALLOCATION 15
#define FAIL_SECTOR_MODE 16

#define FSC_SECTORIO 0x9014

typedef struct
{
    unsigned bit0 : 1;
    unsigned bit1 : 1;
    unsigned bit2 : 1;
    unsigned bit3 : 1;
    unsigned bit4 : 1;
    unsigned bit5 : 1;
    unsigned bit6 : 1;
    unsigned bit7 : 1;
} usageField;

_Inline void Usage(void);
_Inline void rcReportError(char *fName, ULONG rc);
_Inline void ReportError(char *eString);

int main(int argc, char *argv[])
{
    HFILE driveHandle;
    ULONG openAction, openMode, bufLen, bpParmLen, bpDataLen, driveNum,
          cRead, dPointer, smParm, spBmpListSect, spBmpSect, bmpPos,
          freeSectCount, rFreeSectCount;
    int exitval, dec, sign, i, j, k;
    APIRET rc;
    char driveString[3], driveLetter, *fsStuff, bpParm[2], bpData[50],
         *sdata, *bmpList, *spBmp;
    double driveSize, freeSpace, rFreeSpace;
    USHORT sectorSize;
    FSQBUFFER2 *fsBuffer;
    BIOSPARAMETERBLOCK bpBlock;
    FSALLOCATE fsa;
    usageField uField;

    if (argc!=2)
        {
        Usage();
        return FAIL_USAGE;
        }

    memset(driveString, 0, sizeof(driveString));
    strncpy(driveString, argv[1], sizeof(driveString)-1);

    /*
        The following verifies that the drive letter provided
        is a letter from A to Z, and that the second character
        is a colon
    */

    driveLetter=toupper(driveString[0]);
    if (driveLetter<65 || driveLetter>90 || driveString[1]!=':')
        {
        ReportError("Invalid drive string provided.");
        Usage();
        return FAIL_BAD_DRIVE_STRING;
        }

    /*
        The following uses DosQueryFSAttach() to verify that the
        file system of the specified drive is indeed HPFS, as
        continuing otherwise would have somewhat unpredictable
        results.  A lexically valid, but non-existent drive would
        also be caught at this point.
    */

    fsBuffer=(PFSQBUFFER2)malloc(2048);
    if (fsBuffer==NULL)
        {
        ReportError("Memory allocation error.");
        return FAIL_MEMORY_ALLOCATION;
        }
    memset(fsBuffer, 0, 2048);
    bufLen=2048;
    rc=DosQueryFSAttach(driveString, 0, FSAIL_QUERYNAME, fsBuffer, &bufLen);
    if (rc!=NO_ERROR)
        {
        if (rc==ERROR_INVALID_DRIVE)
            {
            ReportError("Invalid drive specified.");
            return FAIL_INVALID_DRIVE;
            }
        else
            {
            ReportError("Unable to determine file system.");
            rcReportError("DosQueryFSAttach", rc);
            return FAIL_UNKNOWN_FSTYPE;
            }
        }
    fsStuff=(char*)(fsBuffer->szName+fsBuffer->cbName+1);
    if (strcmp(fsStuff, "HPFS")!=0)
        {
        ReportError("Specified drive is not using the HPFS file system.");
        Usage();
        return FAIL_NOT_HPFS;
        }
    free(fsBuffer);

    /*
        This queries the size of the drive, and free space.
    */

    driveNum=(ULONG)(driveLetter-64);

    memset(&fsa, 0, sizeof(fsa));

    rc=DosQueryFSInfo(driveNum, FSIL_ALLOC, &fsa, sizeof(fsa));

    if (fsa.cUnit>8388608)
        {
        ReportError("Drive too large (for now).");
        return FAIL_USAGE;
        }

    driveSize=(double)fsa.cbSector*(double)fsa.cUnit;
    rFreeSpace=(double)fsa.cbSector*(double)fsa.cUnitAvail;
    rFreeSectCount=fsa.cUnitAvail;

    /*
        This next bit uses DosOpen() to open the entire drive for reading.
    */

    openMode=0;
    openMode=openMode | OPEN_FLAGS_DASD | OPEN_ACCESS_READONLY |
OPEN_SHARE_DENYNONE;
    rc=DosOpen(driveString, &driveHandle, &openAction, 0L, 0L, FILE_OPEN,
openMode, 0L);
    if (rc!=NO_ERROR)
        {
        ReportError("Unable to open drive.");
        rcReportError("DosOpen", rc);
        return FAIL_OPEN_DRIVE;
        }

    /*
        Here we use a category 8, function 0x63 call to DosDevIOCtl()
        to determine the physical sector size of the drive in question.
        This information is necessary to correctly set the file
        pointer to the location of the partition status byte.  The only
        checking done is to verify that the returned value is greater
        than zero.  Otherwise, the program relies entirely on the 
        validity of the data in the BIOS Parameter Block, which is just
        a label for certain information contained in the boot sector.
    */

    memset(bpParm, 0, sizeof(bpParm));
    memset(bpData, 0, sizeof(bpData));
    bpParmLen=0;
    bpDataLen=0;
    rc=DosDevIOCtl(driveHandle, IOCTL_DISK, DSK_GETDEVICEPARAMS,
                   bpParm, sizeof(bpParm), &bpParmLen,
                   bpData, sizeof(bpData), &bpDataLen);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to determine sector size.");
        rcReportError("DosDevIOCtl", rc);
        return FAIL_UNKNOWN_SECTOR_SIZE;
        }
    
    memset(&bpBlock, 0, sizeof(bpBlock));
    memcpy(&bpBlock, bpData, sizeof(bpBlock));
    sectorSize=0;
    sectorSize=bpBlock.usBytesPerSector;
    if (sectorSize==0)
        {
        DosClose(driveHandle);
        ReportError("Bad sector size returned by DosDevIOCtl().");
        return FAIL_BAD_SECTOR_SIZE;
        }

    /*
        This next call puts the drive into sector mode, so that the
        standard file access API's will work.
    */

    smParm=0xDEADFACE;
    bpParmLen=sizeof(smParm);
    memset(bpData, 0, sizeof(bpData));
    bpDataLen=0;

    rc=DosFSCtl(bpData, sizeof(bpData), &bpDataLen, &smParm, bpParmLen,
                &bpParmLen, FSC_SECTORIO, NULL, driveHandle, FSCTL_HANDLE);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to put drive into sector mode.");
        rcReportError("DosFSCtl", rc);
        return FAIL_SECTOR_MODE;
        }

    /*
        This sets the file pointer, in sector units.
    */

    rc=DosSetFilePtr(driveHandle, 16L, FILE_BEGIN, &dPointer);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to set read pointer.");
        rcReportError("DosSetFilePtr", rc);
        return FAIL_FILE_POINTER;
        }

    /*
        Here we read the HPFS SuperBlock sector.
    */

    sdata=(char*)malloc(sectorSize);
    memset(sdata, 0, sectorSize);

    rc=DosRead(driveHandle, sdata, 1, &cRead);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to read HPFS SuperBlock sector.");
        rcReportError("DosRead", rc);
        return FAIL_READ_DRIVE;
        }

    /*
        Here we get the location of the free space bitmap list, and read
        those four sectors in.
    */

    memset(&spBmpListSect, 0, sizeof(spBmpListSect));
    memcpy(&spBmpListSect, &sdata[24], 4);

    bmpList=(char*)malloc(sectorSize*4);
    memset(bmpList, 0, sectorSize*4);

    rc=DosSetFilePtr(driveHandle, spBmpListSect, FILE_BEGIN, &dPointer);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to set read pointer.");
        rcReportError("DosSetFilePtr", rc);
        return FAIL_FILE_POINTER;
        }

    rc=DosRead(driveHandle, bmpList, 4, &cRead);

    if (rc!=NO_ERROR)
        {
        DosClose(driveHandle);
        ReportError("Unable to read freespace bitmap list sectors.");
        rcReportError("DosRead", rc);
        return FAIL_READ_DRIVE;
        }

    freeSectCount=0;

    spBmp=(char*)malloc(sectorSize*4);

    for (i=0; i<sectorSize*4; i+=4)
        {
        memset(&spBmpSect, 0, sizeof(spBmpSect));
        memcpy(&spBmpSect, &bmpList[i], 4);
        if (spBmpSect==0x00000000)
            break;

        rc=DosSetFilePtr(driveHandle, spBmpSect, FILE_BEGIN, &dPointer);

        if (rc!=NO_ERROR)
            {
            DosClose(driveHandle);
            ReportError("Unable to set read pointer.");
            rcReportError("DosSetFilePtr", rc);
            return FAIL_FILE_POINTER;
            }

        memset(spBmp, 0, sectorSize*4);

        rc=DosRead(driveHandle, spBmp, 4, &cRead);

        if (rc!=NO_ERROR)
            {
            DosClose(driveHandle);
            ReportError("Unable to read freespace bitmap sectors.");
            rcReportError("DosRead", rc);
            return FAIL_READ_DRIVE;
            }

        for (j=0; j<sectorSize*4; j++)
            {
            memset(&uField, 0, sizeof(uField));
            memcpy(&uField, &spBmp[j], 1);
            if (uField.bit0)
                freeSectCount++;
            if (uField.bit1)
                freeSectCount++;
            if (uField.bit2)
                freeSectCount++;
            if (uField.bit3)
                freeSectCount++;
            if (uField.bit4)
                freeSectCount++;
            if (uField.bit5)
                freeSectCount++;
            if (uField.bit6)
                freeSectCount++;
            if (uField.bit7)
                freeSectCount++;
            }
        }

    DosClose(driveHandle);

    free(sdata);
    free(spBmp);

    freeSpace=(double)sectorSize*(double)freeSectCount;

    printf("\nReported free sectors: %u\n", rFreeSectCount);
    printf("\nActual free sectors: %u\n", freeSectCount);
    printf("\nFree sector discrepancy: %u\n",
(freeSectCount-rFreeSectCount));
    printf("\nReported free space: %.0f\n", rFreeSpace);
    printf("\nActual free space: %.0f\n", freeSpace);
    printf("\nFree space discrepancy: %.0f\n", (freeSpace-rFreeSpace));

    return exitval;
}

/*
    This just shows the program usage, which is exceedingly simple.
*/

_Inline void Usage(void)
{
    ReportError("Usage: dmpsects.exe <drive letter>");
    ReportError("<drive letter> - letter of HPFS drive to read from");
    return;
}

/*
    These next two just clean up error reporting in the main function.
    The first gives a generic API function failure message.  The second
    just writes a string.  Both go to standard error.
*/

_Inline void rcReportError(char *fName, ULONG rc)
{
    fprintf(stderr, "\n%s() failed with error %d\n", fName, rc);
    return;
}

_Inline void ReportError(char *eString)
{
    fprintf(stderr, "\n%s\n", eString);
    return;
}


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

From: rmahoney@_REMOVE_THIS_netusa.net                  22-Oct-99 00:05:07
  To: All                                               21-Oct-99 21:24:23
Subj: Re: stuff keystrokes into Netscape for OS/2 2.02

From: rmahoney@_REMOVE_THIS_netusa.net (Robert Mahoney)

On Thu, 21 Oct 1999 13:53:09, "jim osborne" <jdosbor@revealed.net> 
wrote:

> i can get the window handle of a running copy of netscap 2.02 from the
> switch list and send the copy a WM_QUIT and kill it, how do i send
> a series of WM_CHAR   messages to netscape to drive a running copy to a new
> URL?

  That's the wrong way to go about it.  Use the Netscape DDE API.

  But if you insist on doing it your way, take a look at playback 
hooks.

Bob
--
Robert Mahoney
2Rud Software and Consulting
http://www.netusa.net/~rmahoney

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: 2Rud Software (1:109/42)

+----------------------------------------------------------------------------+

From: Vitus_Jensen@teaparty.fido.de                     22-Oct-99 00:22:03
  To: All                                               21-Oct-99 21:24:23
Subj: Calling DosDevIOControl  for ResourceManager Investigation

From: Vitus_Jensen@teaparty.fido.de (Vitus Jensen)

Hello Alexey,

20.10.99 17:36, Alexey Smirnov wrote a message to All :

...
 AS>     When I call DosDevIOControl (func. 0x80, subfunc. 0x02 ->
 AS> "traverses the resource manager node structure...") with proper
 AS> HANDLE (previously getting from DosOpen function) - I get
 AS> reasonable output (RC=0, and Resources enumerated).

 AS>     But when I pass Resource Manager Handle, obtained from the
 AS> first step to DosDevIOControl (func. 0x80, subfunc. 0x01 ->
 AS> "returns the contents of resource manager node indicated by the
 AS> handle provided") - its returns an ERROR (RC= -244). I don't
 AS> understand and can't find this error code. Buffer, that I pass to
 AS> DosDevIOControl is quite enuf. What shell I do?

 AS>     Did anybody work with this functions? Can you help me to
 AS> understand a problem?

I wrote code to display all resources.  It uses the ioctls you mentioned.  I
even passed the exe to a friend and it worked on his machine, too.
Well, this was 1996.  I've found the original ZIP file I passed around (dated
17.9.96), extracted the exe and ... error 65292 (= -244 = 0xFF0C).

The reason is that IBM changed the IOCtls to the resource manager (1996:
remember that resource manager stuff was not documented pre-Warp 4?).  The
RM_GETNODE_PARM structure got an additional element 'Linaddr'.  It looks
rather
strange to me but the following source works:

========<start>=======================================
/* hd		from DosOpen("resmgr$")
 * depth	from RM_ENUMNODES_DATA.Depth
 * rmhd		from RM_ENUMNODES_DATA.RMHandle
 */
static APIRET
DumpResource(HFILE const hd,ULONG const depth,RMHANDLE const rmhd)
{
    RM_GETNODE_PARM	parm;
    ULONG		parmlen = sizeof(parm);
    ULONG		datalen = MAX_RM_NODE_SIZE;
    PRM_GETNODE_DATA	data = _tmalloc(datalen);
    APIRET	rc;


    printf("DumpResource(%#lx)\n", rmhd);

    memset(&parm, 0, parmlen);
    memset(data, 0, datalen);
    parm.RMHandle = rmhd;
    parm.Linaddr = (ULONG)data;

    rc = DosDevIOCtl(hd, CAT_RM, FUNC_RM_GET_NODEINFO,
		     &parm, parmlen, &parmlen,
		     data, datalen, &datalen);
    if( rc )
    {
	printf("DosDevIOCtl(CAT_RM, FUNC_RM_GET_NODEINFO) - error %lu (%#lx)\n", rc,
rc);
	_tfree(data);
	return rc;
    }

    switch( data->RMNode.NodeType )
    {
      case RMTYPE_LDEV:
	printf("%*cLogical Device: %s\n", depth*2, ' ',
	       data->RMNode.pLDevNode->LDevDescriptName);
	printf("%*cFlags: %#6.4lx  Class: %8s\n", depth*2, ' ',
	       data->RMNode.pLDevNode->LDevFlags,
	       apszLDevClass[data->RMNode.pLDevNode->LDevClass]);
	break;

      case RMTYPE_SYSNAME:
	printf("%*cSystem Name: %s\n", depth*2, ' ',
	       data->RMNode.pSysNameNode->SysDescriptName);
	printf("%*cSystem Flags: %#6.4lx\n", depth*2, ' ',
	       data->RMNode.pSysNameNode->SysFlags);
	break;

      case RMTYPE_ADAPTER:
      case RMTYPE_DEVICE:
      case RMTYPE_DRIVER:
      default:
	printf("%*c--- unsupported resource type %lu ---\n",depth*2,' ',
	       data->RMNode.NodeType);
	break;
    }

    _tfree(data);
    return 0;
}
========<end>=========================================



C-x C-s
    Vitus

PS: complete source inkl. DDK header files and exe on request.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: Fido.DE domain gateway (Moving Bits e.V. / IN e.V
(1:109/42)

+----------------------------------------------------------------------------+

From: mmcclelland@delphi.com                            21-Oct-99 20:15:16
  To: All                                               22-Oct-99 02:30:01
Subj: Re: dynamic loadable driver (OS/2)?????

From: Mark McClelland <mmcclelland@delphi.com>

I think a DLD is a Windown (WDM?) driver. No such equivalent thing
exists in OS/2 to my knowledge. It would require some heavy-duty
rewriting of the kernel and much better kernel exception management (not
that Win98 is very much better than OS/2 in that regard)

---
Mark McClelland
mmcclelland@delphi.com
Get paid to surf the web! Visit to www.easydough.com for more info.

Robert Marcano wrote:
> 
> I am making a device driver with VisualAge C++ 4.0 for OS/2, and
> looking on the online help I found the term: "dynamic loadable driver",
> 
> that use the extension "dld" (Sounds like a good thing, but this is the
> 
> first time that I hear about it). But no more information than that,
> Can somebody help me and tell me how it works?, how can I build one or
> where to find information about that?
> 
> TIA

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: SBC Internet Services (1:109/42)

+----------------------------------------------------------------------------+

From: niclas.lindstrom@edt.ericsson.se                  22-Oct-99 10:26:24
  To: All                                               22-Oct-99 10:21:21
Subj: Re: How do I read and write ethernet packets?

From: Niclas =?iso-8859-1?Q?Lindstr”m?= <niclas.lindstrom@edt.ericsson.se>

Niclas Lindstr”m wrote:
> 
> Are there any API's in OS/2 that can be used to read and
> write ethernet frames directly from/to the lan-adapter so
> I can analyze the ethernet header, modify it and send it
> back out on the ethernet again..?
> 

Ok, I believe I will have to write my own intermediate
NDIS-driver. Does anyone know were I can find good source
samples for NDIS drivers. I just downloaded the DDK from
IBM and at the first look at the sample in there (a token
ring driver) it looks too complex. I guess it includes
hardware access and things like that, but my driver only
need to access the existing NDIS driver and act as any
NDIS driver towards the application (TCP/IP-stack)...

Regards
Niclas Lindstr”m

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: L M Ericsson Data AB (1:109/42)

+----------------------------------------------------------------------------+

From: csaba.raduly@sophos.com                           22-Oct-99 12:14:13
  To: All                                               22-Oct-99 10:21:22
Subj: Re: System area on HPFS drive

From: Csaba Raduly <csaba.raduly@sophos.com>

Mike Ruskai wrote:
> 
> On Thu, 21 Oct 1999 12:43:21 -0400, Marty wrote:
> 
[snip]
> This program will show you, thought it won't work on a drive larger than 4GB
> (given 512-byte sectors):
> 
> #define INCL_DOSDEVICES
> #define INCL_DOSDEVIOCTL
> #define INCL_DOSFILEMGR
> #define INCL_DOSERRORS
> #include <os2.h>
> #include <string.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <ctype.h>
> 
> #define FAIL_USAGE 3
> #define FAIL_BAD_DRIVE_STRING 4
> #define FAIL_INVALID_DRIVE 5
> #define FAIL_UNKNOWN_FSTYPE 6
> #define FAIL_NOT_HPFS 7
> #define FAIL_OPEN_DRIVE 8
> #define FAIL_FILE_POINTER 9
> #define FAIL_UNKNOWN_SECTOR_SIZE 10
> #define FAIL_BAD_SECTOR_SIZE 11
> #define FAIL_READ_DRIVE 13
> #define FAIL_WRITE_DRIVE 14
> #define FAIL_MEMORY_ALLOCATION 15
> #define FAIL_SECTOR_MODE 16
> 
> #define FSC_SECTORIO 0x9014
> 
> typedef struct
> {
>     unsigned bit0 : 1;
>     unsigned bit1 : 1;
>     unsigned bit2 : 1;
>     unsigned bit3 : 1;
>     unsigned bit4 : 1;
>     unsigned bit5 : 1;
>     unsigned bit6 : 1;
>     unsigned bit7 : 1;
> } usageField;
> 
> _Inline void Usage(void);
> _Inline void rcReportError(char *fName, ULONG rc);
> _Inline void ReportError(char *eString);
> 
> int main(int argc, char *argv[])
> {
>     HFILE driveHandle;
>     ULONG openAction, openMode, bufLen, bpParmLen, bpDataLen, driveNum,
>           cRead, dPointer, smParm, spBmpListSect, spBmpSect, bmpPos,
>           freeSectCount, rFreeSectCount;
>     int exitval, dec, sign, i, j, k;
>     APIRET rc;
>     char driveString[3], driveLetter, *fsStuff, bpParm[2], bpData[50],
>          *sdata, *bmpList, *spBmp;
>     double driveSize, freeSpace, rFreeSpace;
>     USHORT sectorSize;
>     FSQBUFFER2 *fsBuffer;
>     BIOSPARAMETERBLOCK bpBlock;
>     FSALLOCATE fsa;
>     usageField uField;
> 
>     if (argc!=2)
>         {
>         Usage();
>         return FAIL_USAGE;
>         }
> 
>     memset(driveString, 0, sizeof(driveString));
>     strncpy(driveString, argv[1], sizeof(driveString)-1);
> 
>     /*
>         The following verifies that the drive letter provided
>         is a letter from A to Z, and that the second character
>         is a colon
>     */
> 
>     driveLetter=toupper(driveString[0]);
>     if (driveLetter<65 || driveLetter>90 || driveString[1]!=':')
>         {
>         ReportError("Invalid drive string provided.");
>         Usage();
>         return FAIL_BAD_DRIVE_STRING;
>         }
> 
>     /*
>         The following uses DosQueryFSAttach() to verify that the
>         file system of the specified drive is indeed HPFS, as
>         continuing otherwise would have somewhat unpredictable
>         results.  A lexically valid, but non-existent drive would
>         also be caught at this point.
>     */
> 
>     fsBuffer=(PFSQBUFFER2)malloc(2048);
>     if (fsBuffer==NULL)
>         {
>         ReportError("Memory allocation error.");
>         return FAIL_MEMORY_ALLOCATION;
>         }
>     memset(fsBuffer, 0, 2048);
>     bufLen=2048;
>     rc=DosQueryFSAttach(driveString, 0, FSAIL_QUERYNAME, fsBuffer, &bufLen);
>     if (rc!=NO_ERROR)
>         {
>         if (rc==ERROR_INVALID_DRIVE)
>             {
>             ReportError("Invalid drive specified.");
>             return FAIL_INVALID_DRIVE;
>             }
>         else
>             {
>             ReportError("Unable to determine file system.");
>             rcReportError("DosQueryFSAttach", rc);
>             return FAIL_UNKNOWN_FSTYPE;
>             }
>         }
>     fsStuff=(char*)(fsBuffer->szName+fsBuffer->cbName+1);
>     if (strcmp(fsStuff, "HPFS")!=0)
>         {
>         ReportError("Specified drive is not using the HPFS file system.");
>         Usage();
>         return FAIL_NOT_HPFS;
>         }
>     free(fsBuffer);
> 
>     /*
>         This queries the size of the drive, and free space.
>     */
> 
>     driveNum=(ULONG)(driveLetter-64);
> 
>     memset(&fsa, 0, sizeof(fsa));
> 
>     rc=DosQueryFSInfo(driveNum, FSIL_ALLOC, &fsa, sizeof(fsa));
> 
>     if (fsa.cUnit>8388608)
>         {
>         ReportError("Drive too large (for now).");
>         return FAIL_USAGE;
>         }
> 
>     driveSize=(double)fsa.cbSector*(double)fsa.cUnit;
>     rFreeSpace=(double)fsa.cbSector*(double)fsa.cUnitAvail;
>     rFreeSectCount=fsa.cUnitAvail;
> 
>     /*
>         This next bit uses DosOpen() to open the entire drive for reading.
>     */
> 
>     openMode=0;
>     openMode=openMode | OPEN_FLAGS_DASD | OPEN_ACCESS_READONLY |
> OPEN_SHARE_DENYNONE;
>     rc=DosOpen(driveString, &driveHandle, &openAction, 0L, 0L, FILE_OPEN,
> openMode, 0L);
>     if (rc!=NO_ERROR)
>         {
>         ReportError("Unable to open drive.");
>         rcReportError("DosOpen", rc);
>         return FAIL_OPEN_DRIVE;
>         }
> 
>     /*
>         Here we use a category 8, function 0x63 call to DosDevIOCtl()
>         to determine the physical sector size of the drive in question.
>         This information is necessary to correctly set the file
>         pointer to the location of the partition status byte.  The only
>         checking done is to verify that the returned value is greater
>         than zero.  Otherwise, the program relies entirely on the
>         validity of the data in the BIOS Parameter Block, which is just
>         a label for certain information contained in the boot sector.
>     */
> 
>     memset(bpParm, 0, sizeof(bpParm));
>     memset(bpData, 0, sizeof(bpData));
>     bpParmLen=0;
>     bpDataLen=0;
>     rc=DosDevIOCtl(driveHandle, IOCTL_DISK, DSK_GETDEVICEPARAMS,
>                    bpParm, sizeof(bpParm), &bpParmLen,
>                    bpData, sizeof(bpData), &bpDataLen);
> 
>     if (rc!=NO_ERROR)
>         {
>         DosClose(driveHandle);
>         ReportError("Unable to determine sector size.");
>         rcReportError("DosDevIOCtl", rc);
>         return FAIL_UNKNOWN_SECTOR_SIZE;
>         }
> 
>     memset(&bpBlock, 0, sizeof(bpBlock));
>     memcpy(&bpBlock, bpData, sizeof(bpBlock));
>     sectorSize=0;
>     sectorSize=bpBlock.usBytesPerSector;

Wow, are you paranoid or what ? :-) ( Joke !!! )
That memset is useless if followed immediately by memcpy.
Same goes for setting sectorSize to 0 and overwriting it.
Maybe you wanted to do these at the beginning (before DosDevIOCtl ?)

>     if (sectorSize==0)
>         {
>         DosClose(driveHandle);
>         ReportError("Bad sector size returned by DosDevIOCtl().");
>         return FAIL_BAD_SECTOR_SIZE;
>         }
> 
>     /*
>         This next call puts the drive into sector mode, so that the
>         standard file access API's will work.
>     */
> 

The standard file access APIs will work without it, of course
(your choice of words is unfortunate).
It's just that you can access larger harddisks that way,
and save yourself a multiplication by 512 for every call.

[more code snipped]
Csaba

-- 
-----BEGIN GEEK CODE BLOCK----- 
Version 3.1
GCS/>GMU d- s:- a30 C++$ UL+ P+>+++ L++ E- W+ N++ o? K? w++>$ O++$ M-
V- PS PE Y PGP- t+ 5 X++ R* tv++ b++ DI+++ D++ G- e+++ h-- r-- !y+
-----END GEEK CODE BLOCK----- 

Csaba Raduly,    Software Developer (OS/2),    Sophos Anti-Virus
mailto:csaba.raduly@sophos.com            http://www.sophos.com/
US Support +1 888 SOPHOS 9            UK Support +44 1235 559933
Life is complex, with real and imaginary parts.

--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: SOPHOS Plc (1:109/42)

+----------------------------------------------------------------------------+

From: thannymeister@spambegone.yahoo.com                22-Oct-99 11:03:05
  To: All                                               22-Oct-99 14:21:14
Subj: Re: System area on HPFS drive

From: "Mike Ruskai" <thannymeister@spambegone.yahoo.com>

On Fri, 22 Oct 1999 12:14:27 +0100, Csaba Raduly wrote:

>Mike Ruskai wrote:
>> 
>> On Thu, 21 Oct 1999 12:43:21 -0400, Marty wrote:
>> 
>[snip]

>>     memset(&bpBlock, 0, sizeof(bpBlock));
>>     memcpy(&bpBlock, bpData, sizeof(bpBlock));
>>     sectorSize=0;
>>     sectorSize=bpBlock.usBytesPerSector;
>
>Wow, are you paranoid or what ? :-) ( Joke !!! )
>That memset is useless if followed immediately by memcpy.
>Same goes for setting sectorSize to 0 and overwriting it.
>Maybe you wanted to do these at the beginning (before DosDevIOCtl ?)

90% of all the strange results I get are due to residual values.  I've made a
habit of clearing virtually everything before use, and I have fewer problems
for it.

[snip]
>>     /*
>>         This next call puts the drive into sector mode, so that the
>>         standard file access API's will work.
>>     */
>> 
>
>The standard file access APIs will work without it, of course
>(your choice of words is unfortunate).
>It's just that you can access larger harddisks that way,
>and save yourself a multiplication by 512 for every call.

The program I pasted was a modification of another that has undergone a host
of modifications over time to accomodate large drives.  If I knew that
someone would be proofreading my comments, I certainly would have taken the
time to make them proper essays.

Foolishly, I'm sure, I just assumed people would use the code I posted for
compilation.  But I'm sure you'll sleep better tonight, having found
something to pick nits from, thereby fulfilling your life's purpose.


--
 - Mike

Remove 'spambegone' to send e-mail.


--- WtrGate+ v0.93.p7 sn 165
 * Origin: Usenet: TLF (1:109/42)

+----------------------------------------------------------------------------+

+============================================================================+
