HDTenEightyP/NetNews huggingface dataset:
Subject: Re: buffer sizes for filenames, pathnames etc. 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Thu, 31 Dec 1992 19:39:50 +0000

In article <1992Dec31.013722.18655@emr1.emr.ca> jagrant@emr1.emr.ca writes:

>Ok, somebody explain this...
> [ stuff deleted]
>
>Now it seems to me that there should only have to be one definition
>        #define MAX_LENGTH_PATHNAME     ??
>regardless of whether or not we are using DOS or Windows.
>This is the size of the buffer required to hold the longest possible
>pathname, including drive, directory, filename and extension.
>
>As noted above, there are several defined constants and 3 other numbers
>which are not defined symbolically.  I really don't feel like hard-coding
>numbers in my programs.
>
>Now when Windows becomes Windows NT, then it probably needs to be
>redefined for the new file system, but it can *still* be done with
>a single #defined constant:
>        #ifdef WIN_NT
>          #define MAX_LENGTH_PATHNAME xx
>        #else
>          #define MAX_LENGTH_PATHNAME yy
>        #endif
>
>So which is it?  80, 144, 255, 260???
>
>-- 
>John A. Grant                                           jagrant@emr1.emr.ca
>Airborne Geophysics
>Geological Survey of Canada, Ottawa
>

In DOS on a standalone machine, you're allowed 63 characters for the drive
and directory, and another 12 for the filename, plus the NUL byte at the
end.  That's a total of 76, hence (presumably) the "80" definition.  That
76 is a limitation of MS-DOS itself.

If you're on a network, things get more hairy.  On a LAN Manager network,
at least, you're allowed to add a server and sharename to the start of the
path, so you might have something like:

    \\app_server\word\myfiles\..... etc

I seem to recall (though I'm probably wrong!) that both server and sharename
can be up to 16 characters long, which, with the separators, brings us
up to 112 characters.

The solution you mention with NT, ie, saying:

    #ifdef WIN_NT
       etc.

unfortunately doesn't work, either!  The trouble is, NT has installable
file systems.  You can "plug in" a new file system and neither the NT
Kernel *nor* any of the API subsystems (such as Win32) will know anything
about it, as such. The limit on the length of a filename is a parameter of
the file system currently being accessed, *not* of NT itself!

I think that you've raised an interesting point, though, certainly.
Personally I use a file-name buffer of 256 characters now, just to be on
the safe side.....

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Newsgroups: comp.os.ms-windows.programmer.misc
From: perry@hplabsz.hpl.hp.com (Jeff Perry)
Subject: Re: Need more disk throughput under Win 3.1
Date: Tue, 22 Dec 1992 23:28:35 GMT
Organization: Hewlett-Packard Laboratories Palo Alto,CA
X-Newsreader: TIN [version 1.1.4 PL6]

If you're using Win3.1, you can use the Multimedia file libraries. They handle
buffered IO to/from the disk. Although I think they were intended for use 
writing/reading RIFF file format, you can use the them for simple IO. 

I've done no comprehensive benchmarking, but an application I have that uses
the MM IO libraries gets a little over 1MB/sec to disk running in Enhanced
mode. I'm using an Adaptec 1740 on an HP Vectra 486/33, your milage may vary.
I expect that you could do better than 1MB per sec, though, because my 
program has several other things going on that steal cycles from disk access.

Good luck,
jeff
 
-- 

         ___
        /  /          | Jeff Perry, HP Labs - Medical
HEWLETT/hp/PACKARD    | E-Mail: jeff@hpl4-d or jeff_perry@hplabs
From: cparker@centerline.com (Charles Parker)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How would you program this ?
Date: 24 Dec 1992 15:06:51 GMT
Organization: CenterLine Software
Distribution: world
Reply-To: cparker@centerline.com
NNTP-Posting-Host: 140.239.2.37

In article 26119@news.ysu.edu, doug@cc.ysu.edu (Doug Sewell) writes:
>I have to retrieve three related numbers from a user (they're the count
>of two-dimensional tables, and the dimensions of the tables).
>
>The number of tables ranges from two to four.
>The columns range from two to four, for each of the tables.
>The rows in each table range from five to ten.
>
>For alternatives to retrieve the values, I see three options (I'm using
>VB, incidentally). 

I would do it with three horizontal scrollbars, with the values to the
right of the scrollbars, and have the values be updated in user-percieved
realtime as the user moves the associated scrollbar


  Num tables
  < ------------|-------------->  :  3
  Num columns
  < -------------------|------->  :  4
  Num rows
  < -|------------------------->  :  5

     ----------     -----------
     |  OK    |     |  Cancel |
     ----------     -----------

---
---------------------------------------------------------

Charles Parker			  Phone.(800) 669 9165
Technical Support			(617) 498 3321
CenterLine Software, Inc.	    Fax.(617) 868 6655

                                       cyberspace
momma, don't let yer children grow up to be ^ cowboys ...
---------------------------------------------------------
From: khamsi@ll.mit.edu (Sarir Khamsi)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Sending message for multiple program instances
Date: 29 Dec 92 20:05:05 GMT
Distribution: comp
Organization: MIT Lincoln Laboratory

Yo,

Does somebody have a code segment that will display a message window
(with OK button) stating that the program is currently running? I am
using the condition :

   if( hPrevInstance)
      return FALSE;

in my WinMain() to check currently, but it tells the user nothing.
Thanks in advance.

--
Sarir (Riri) Khamsi - khamsi@ll.mit.edu
MIT Lincoln Laboratoy
244 Wood St.
Lexington, MA 02173
USA
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
From: jagrant@emr1.emr.ca (John Grant)
Subject: can't get HELP_CONTEXT to work with #defines
Organization: Energy, Mines, and Resources, Ottawa
Date: Wed, 23 Dec 1992 18:16:39 GMT

Ok, I'm getting on quite well with my help now, except for one problem:

"Warning 4098: Context string(s) in [MAP] section not defined 
        in any topic.."

and sure enough, WinHelp can't find them either.

Here is my .HPJ file:
        [files]
        myapp.rtf

        [map]
        #include <helpid.h>

and helpid.h looks like:
        #define HELPID_XXX      101
        #define HELPID_YYY      102
        ...

Using Word for Windows, I put in # footnotes for these topics 
using HELPID_XXX etc as the context string, i.e. the context,
title & keyword footnotes for the topic look like:
        # HELPID_XXX
        $ Help for XXX
        K xxx
(and yes, I double-checked that there is only ONE space after the
#, $ and K symbols).

When I do: 
        Winhelp(hwnd,"myapp.hlp",HELP_CONTEXT,HELPID_XXX);
it says "can't find topic".  Not surprising, since HC already 
reported a similar error.

How does HC distinguish between a #defined CONSTANT in a footnote:
        # HELPID_XXX
and a context string in the footnote:
        # ContextString

The docs don't really point out any difference between a context 
string & a #defined constant.  They just say "use a # footnote".

What am I doing wrong?
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.misc
From: neil@progress.COM (Neil Galarneau)
Subject: Re: Force DLL to unload
Organization: Progress Software Corp.
Date: Tue, 22 Dec 1992 18:15:51 GMT

flc@mips.com (Fred Cox) writes:

>mccreary@sword.eng.hou.compaq.com (Ed McCreary) writes:

>>In article <DEREKL.92Dec18100741@watson.harlqn.co.uk> derekl@harlqn.co.uk (Derek Law) writes:
>>>Does anybody know how to FORCE Windows 3.1 to unload a DLL? I'm
>>>developing a DLL, but every time I change it I have to quit and
>>>restart Windows - otherwise Windows complains that the file is "still
>>>in use" and so write protected.
>>>

>>How are you loading it?  Try this...

>>hLib = LoadLibrary("MY.DLL");
>>....program code....
>>FreeLibrary(hLib);

>That works for when your DLL works, but when you get a UAE, the thing
>doesn't get FreeLibraried, and you're hosed.

[lines deleted...]

>Fred Cox
>flc@mti.sgi.com

Windows keeps a use count on dlls.  The use count gets incremented on
LoadLibrary and decremented on FreeLibrary.  When the use count drops to zero
the dll is unloaded.

If your app UAEs, it never does the FreeLibrary, and any new dll you try to
make is ignored.

The solution is to write a trivial program that does:

while(GetModuleUsage(hLib))
    FreeLibrary(hLib);


Neil
neil@progress.com
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
From: joero@microsoft.com (Joe Robison)
Subject: Re: VB and databases.
Date: 19 Dec 92 02:51:36 GMT
Organization: Microsoft Corp.

In article <MIZO.92Dec14095658@sevax1.cse.canon.co.jp> mizo@sevax1.cse.canon.co.jp wrote:
> 
>  >>>>You might want to look at Microsoft Access. Its a brand new relational
>  >>>>database product from Microsoft. It supports data, sound, images, etc in
>  >>>>the database. I'd heard good things about it. I saw a demo of the product
>  >>>>and I'm sold. The "script" language is amazingly "VisualBasic" like
>  >>>>(imagine that :-).
> 
> I have not seen the product here in Japan yet, but does it allow you
> to write a DLL and use it from inside Access just like VB does?

You can Declare a DLL routine and call it from Access Basic in exactly the
same way (and using exactly the same syntax) as you would in Visual Basic.

Hope this helps.

--
Joe Robison
joero@microsoft.com
Not A Microsoft Spokeshuman
From: pk64380@kaarne.cs.tut.fi (Kuusisto Pasi Petri,,,SIG,64380)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: problems with CTL3D.DLL
Date: 31 Dec 92 09:45:10 GMT
Reply-To: pk64380@kaarne.cs.tut.fi
Organization: Technical University of Tampere, Dep. of Computer Science ,Finland
NNTP-Posting-Host: kaarne.cs.tut.fi
Originator: pk64380@kaarne.cs.tut.fi

From article <1992Dec31.021603.21231@emr1.emr.ca>, by jagrant@emr1.emr.ca (John Grant):
> CTL3D.DLL is provided by MS on CI$ and at ftp.cica.indiana.edu
> (in vendors... - sorry I forget the exact location or filenames,
> but it was posted here recently).  It provides 3d effects for
> listboxes, comboboxes, etc (finishing up what they started with
> 3d buttons).
    /vendor/microsoft/developer-network/techsamp/3-31.zip
     
> Problems with CTL3D.DLL
> -----------------------  
>   1. before *anything* in your app runs (i.e. even before you check for
>      'first instance', something in CTL3D.LIB (linked in) tries to find
>      CTL3D.DLL.  It appears to look in at least 3 directories:
> 	- ...\windows
> 	- ...\windows\system
> 	- the application's home directory (GetModuleFileName)
>      (I tried placing it in each of the 3 directories to see
>       what it was looking for and where).
> 
>      If it can't find CTL3D.DLL, it chokes and displays:
> 	+----------------------+
> 	|     File Error       |
> 	| Can't find CTL3D.DLL |
> 	+----------------------+
>      and then terminates the application before it even gets a
>      chance to run.

   Yes, but that's Windows itself. Before executing a single line of the 
   application it will try and load all the DLL's needed (specified
   when linking).
   If you don't want this, you might try LoadLibrary and GetProcAddress
   (or whatever, never tried myself - so don't ask how to do this. SDK
    reference should be able to help)

-zi
Xref: sparky comp.os.ms-windows.programmer.misc:4414 comp.lang.c++:18299
From: ventura!vs@UCSD.EDU (Shankar Venkataraman)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.c++
Subject: Has anyone got this source ?
Date: 19 Dec 92 00:37:42 GMT
Reply-To: ventura!vs@UCSD.EDU
Followup-To: comp.os.ms-windows.programmer.misc
Organization: Ventura Software, Inc., A XEROX Company

We had downloaded an article from the Microsoft Knowledge Base ( Q85282 ) on linking an application dynamically to a DLL using a class. In the article there is a mention of a sample program DYNDLL ( archived as DYNDLL.ZIP ) which demonstrates it. 

We have not been able to locate it in the Software/Data library of the Microsoft forum on CompuServe. 

If anyone knows about the exact location or has downloaded it, please mail the info.

Thanx in advance,

Shankar
ventura!vs@ucsd.edu
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
From: rhb@hotsand.cnet.att.com (54312 - Richard H Brandwein)
Subject: Re: VB and databases.
Reply-To: rich.brandwein@att.com
Organization: AT&T Bell Labs - Holmdel, NJ
Date: Mon, 21 Dec 1992 17:11:44 GMT
Originator: rhb@hotsand


In article <MIZO.92Dec14095658@sevax1.cse.canon.co.jp>, mizo@sevax1.cse.canon.co.jp (Hideo Mizoguchi) writes:
|> 
|>  >>>>You might want to look at Microsoft Access. Its a brand new relational
|>  >>>>database product from Microsoft. It supports data, sound, images, etc in
|>  >>>>the database. I'd heard good things about it. I saw a demo of the product
|>  >>>>and I'm sold. The "script" language is amazingly "VisualBasic" like
|>  >>>>(imagine that :-).
|> 
|> I have not seen the product here in Japan yet, but does it allow you
|> to write a DLL and use it from inside Access just like VB does?
|> 
|> Hideo Mizoguchi
|> Canon Inc., Japan

It does all that and more.  I've played with Access for awhile.  It's
not nearly as straightforward to use as VB, but it does the job.  The
biggest problem (from my perspective) is that there is no run-time
version of access available yet, so that you can distribute your
code to others (who don't have access).

-- 
--
	Rich Brandwein		rich.brandwein@att.com
From: tope@enea.se (Tommy Petersson)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: VB, Windows and printing
Keywords: VB, printing
Date: 21 Dec 92 13:25:16 GMT
Reply-To: tope@enea.se (Tommy Petersson)
Organization: Enea Data AB, Sweden
Uucp-Path: mcvax!kth!sunic!enea.se!tope

We are doing a small application in Visual Basic 2.0 Pro, to run on
Windows 3.1 clients in a Lan Manager Network.

Reports from our application need to be printed in landscape orientation
on a Nec PostScript laser printer. This is easy by selecting landscape
mode in Control Panel/Printer. However, everything else the users print
should be portrait, and they of course don't want to manually change the
preferences all the time.

There seem to be two choices here:

Let Visual Basic still use the "Printer" object, (which only works on
the default printer). For every report in our application, set the printer
to landscape, and reset it afterwards.

Forget about the Printer object, stuff the default printer, use Windows
calls to get/change device context and don't mess with the default printer
whatsoever.

Which is best? Or is there a better way of doing it?

In "your best solution" - how do you do it? (I have looked only briefly
on the GetDeviceContext, ExtDeviceMode, Escape and other calls)

Pro's and con's?

-- 
=============================================================================
 Tommy Petersson              tope@enea.se              Enea Data AB, Sweden
=============================================================================
Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.pascal
From: sjsobol@wariat.org (Steven J. Sobol)
Subject: Re: toolbar and mdi window. Never mind.
Followup-To: comp.os.ms-windows.programmer.misc,comp.lang.pascal
Organization: APK Public Access Unix * Cleveland, OH
X-Newsreader: TIN [version 1.1 PL7]
Date: Sun, 3 Jan 1993 03:24:16 GMT

Steven J. Sobol (sjsobol@wariat.org) wrote:

: I have a package I picked up off wuarchive.wustl.edu called TOOLPA.ZIP.
: It is a demo from a commercial prototyping program, and it lets you create
: a toolbar in Turbo Pascal. It works fine in non-MDI windows. In MDI windows,
: I turn off the wb_MDIChild flag so I don't get the caption and system menu
: enclosing the toolbar. However, I can't get it to respond to any mouse clicks
: if I don't have wb_MDIChild set. How can I get a non-MDI child window in an
: MDI frame window to respond to mouse clicks? 

I figured it out. You must adjust the client area so that the toolbar is not
inside it. The two programs I found which adjust the client area do so in
response to a WM_SIZE message.
 
: Oh yeah... the toolbar does not respond to paint events, either.

Actually, when I get a WM_SIZE, I do an InvalidateRect on the toolbar
and one on the MDI window and everything gets repainted just fine.

Sorry.

-- 
Steve Sobol   Head Cheerleader, APK Public Access *nix/Internet
(216) 481-9436 <2400 baud>     (216) 481-9425 <v.32bis, TurboPEP>
Telnet: wariat.org   To register: send e-mail to info@wariat.org, or
log in to BBS and download file 'user.new' from file area 2.

Also President of The Tiny Software Co.   E-Mail Address: sjsobol@tiny.com
Newsgroups: comp.os.ms-windows.programmer.misc
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: Force DLL to unload
Date: 22 Dec 92 20:53:03 GMT
Organization: Microsoft Canada Inc.

In article <flc.724728723@poseidon> flc@mips.com (Fred Cox) writes:
>mccreary@sword.eng.hou.compaq.com (Ed McCreary) writes:
>>In article <DEREKL.92Dec18100741@watson.harlqn.co.uk> derekl@harlqn.co.uk (Derek Law) writes:
>>>Does anybody know how to FORCE Windows 3.1 to unload a DLL? I'm
>>>developing a DLL, but every time I change it I have to quit and
>>>restart Windows - otherwise Windows complains that the file is "still
>>>in use" and so write protected.
[description of calling FreeLibrary correctly deleted]
>That works for when your DLL works, but when you get a UAE, the thing
>doesn't get FreeLibraried, and you're hosed.
>
>As you can tell, I've been annoyed by the same problem.

The MSDN CD has an "unsupported tool" on it called WPS that amongst
other things allows you to free an arbitrary DLL.  I suspect this tool
may also be available on the MS BBS.  (I don't know this for sure.)
If you don't have easy access to a tool like this it is probably worth
the 20 minutes it would take to hack together a minimal utility to do
this on your own.  You can walk the module list with ModuleFirst and
ModuleNext and drop them in a listbox, then in response to a double-click
on this listbox you can call FreeLibrary GetModuleUsage times.

-Blake (insert prefered seasonal wishes here)
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Herc cards and 486's and Windows !
From: cameron@cosc.canterbury.ac.nz (cameron)
Date: Wed, 23 Dec 1992 06:42:30 GMT
Organization: Computer Science,University of Canterbury,New Zealand


Do you have a dual display working on a 486 under
windows ?

I can get a Herc card and mono monitor working in my 486
together with main VGA display card and monitor. Turbo
Debugger uses it fine... BUT the whole windows environment
is slowed down (screen updates) when the herc card is
in place, also problems with the hard disk controller..

I've got  DualDisplay=1 in my system.ini..and the herc card
is a recent model.  The machine isn't slowed down in normal
DOS mode.. 

SO what do I need to do to get the second display working
on the 486 ?  I've been through all available windows and
Turbo C docs.. but the only setting I could find was
the "dualdisplay=1" - make no difference..

The vga card is a ET4000 is 1Mg RAM.. Machine is 33Mz TP
486

Thanks
Cameron.
From: skrause@informatik.hu-berlin.de (Steffen Krause)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: CF_SCALABLEONLY - does it work with ATM & FACELIFT ?
Date: 21 Dec 92 12:45:58 GMT
Organization: A poorly-installed InterNetNews site
NNTP-Posting-Host: einstein.informatik.hu-berlin.de

Hi everybody !
I'm writing an application that relies on scalable fonts.
So I include CF_SCALABLEONLY in the font selection dialog.
Everything works OK with Truetype and Windows stroke fonts.
Now I want to know if it works too with other font scaling software.
Any experiance ?
Thanks
Steffen

-- 
---------------- Steffen Krause --------------------------------------------
Zu Risiken oder Nebenwirkungen lesen Sie die Packungsbeilage und informieren
Sie Ihren Arzt oder Apotheker.
----------------------------------------------------------------------------
Xref: sparky comp.os.ms-windows.programmer.misc:4429 comp.os.ms-windows.programmer.tools:1804
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
Subject: Re: MFC and Borland IDE
Date: 22 Dec 92 21:07:23 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <1992Dec18.035645.3257@microsoft.com> stevesi@microsoft.com (Steven Sinofsky) writes:

>The October issue of Dr. Dobbs has a review of several application
>frameworks for Windows, most notable OWL and Microsoft's MFC.

>The OWL executable also requires 3 DLLs totalling 312,640 bytes.  MFC
>is a stand-alone EXE.

That's fine and dandy.

My customers have large hard disks, but very little time.
I have been swearing about MSC; PWB and the MFC all authumn,
and yesterday I gave in and bought Borland C++ and started
reading the manual. TODAY I am as far with my OWL project
as I came in 3 months using PWB/MSC/MFC (however, not on
anything NEAR full-time)

It seems Microsoft has certain exotic priorities, such as
small size being better than solid performance and ease-of-use.
If I was to write something cryptic and small, I'd use FORTH
for DOS. Or CP/M, even ;-)

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
   The word "politics" is derived from the word "poly", meaning
   "many", and the word "ticks", meaning "blood sucking parasites".
                     -- Larry Hardiman
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
Subject: Re: Executing Windows or DOS application from Windows 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Mon, 28 Dec 1992 21:07:43 +0000

In article <Bzw446.AEr@pcuf.fi> turre@pcuf.fi writes:

>I am writing an application which should first unpack .ZIP's and later on
>call an editor. Calling with WinExec is not difficult, but Windows keeps
>executing my application while it should wait DOS or the editor to finish.
>I can do a while loop with FindWindow, but problem is what to do inside
>the loop. If I use GetMessage user can access my apps menus & buttons whichh
>should not be allowed. DisableWindow will not help because user will not 
>get back to the application if he, while in editor, switches task.
> 
>So I would like to wait for the tasks to finish with doing nothing in my
>own app still allowing other applications to work. Help is appreciated in 
>both DOS case and Windows case.
> 

Why not simply set a "DOS Application is running" flag in your program at
the time you start the program running, then ignore any WM_COMMAND messages
you receive if the flag is set to "TRUE".  That's what I'd do, anyway.

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------