HDTenEightyP/NetNews huggingface dataset:
From: std_u22c@uni-duesseldorf.de (verehrte(r) Benutzer(in))
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Searching DDK
Date: Mon, 4 Jan 1993 15:27:31 GMT
Organization: Universitaetsrechenzentrum, Heinrich-Heine-Universitaet Duesseldorf
NNTP-Posting-Host: 134.99.8.52

I'm searching for the Microsoft Device-Developers('s?)-Kit - DDK.
Does anyone know where to get it - or even better - where to get it
from a "secondary source".

I don't have an e-mail address - so post to this NEWS-group or call
(02 11) 311 41 25 in Duesseldorf/ Germany.
Newsgroups: comp.os.ms-windows.programmer.misc
From: dhartung@chinet.chi.il.us (Dan Hartung)
Subject: ObjectVision, SHARE.EXE, & Netware
Organization: Chinet - Public Access UNIX
Distribution: na
Date: Tue, 5 Jan 1993 20:12:27 GMT

OK, ObjectVision can't access Paradox files w/o loading SHARE.EXE.
SHARE won't load if Netware is active, so you have to load it before
the network drivers.  Then if SHARE is loaded, you get all sorts of
things happen that can't be explained.  ;-)

Can anyone enlighten me on possible workarounds for this Catch-22?

("Load SHARE anyway" is not an option ... decreed from on high in
LAN Integration.)

-- 
The Presidential Towers complex here   | Dan Hartung               |  Ask me
in Chicago is bounded by four streets: | dhartung@chinet.chi.il.us |  about
Jefferson, Adams, Monroe  .....        | Birch Grove Software      | Rotaract!
        and Clinton!
Newsgroups: comp.os.ms-windows.programmer.misc
From: ahmad@norooz.NoSubdomain.NoDomain (Ahmad Alavi)
Subject: DLL problem (using BC++/AF)
Reply-To: ahmad@norooz.b17a.ingr.com
Organization: " "
Date: Tue, 5 Jan 1993 21:20:08 GMT


I have problem calling a routine in a DLL when the DLL is loaded
using LoadLibrary.

Here is the DLL source code in its entirely.

    #include <windows.h>
    int FAR PASCAL LibMain( HANDLE hInstance, WORD wDataSegment,
                                   WORD wHeapSize, LPSTR lpszCmdLine )
    {
        if ( wHeapSize != 0 )
	        UnlockData( 0 );
        return 1;
    }

    BOOL FAR PASCAL MyFunction (char far *theString) /* this functions is */
    {                                            /* exported in .DEF */
         return 1;
    }


And the main executable source:

    #include <owl.h>
    int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                       LPSTR lpCmdLine, int nCmdShow)
    {
        HINSTANCE DLLInstance;
        BOOL FAR (*MyFunctionFunc)(char far  *theString);
        DLLInstance = LoadLibrary("dll1.dll");
        (FARPROC) MyFunctionFunc =GetProcAddress(DLLInstance, "MyFunction");
        (*MyFunctionFunc)("In the MAIN");
        FreeLibrary(DLLInstance);

        TApplication MyApp("Sample Program", hInstance, hPrevInstance,
               lpCmdLine, nCmdShow);
        MyApp.Run();
        return MyApp.Status;
    }

When I run the main program, everything looks OK and MyFunction in DLL
is actually called but I get a General Protection Fault. The error happens
inside MyApp.Run() call. If I change MyFunction argument to int the
there is no problem (but I really need it to be char*).

I have a short term and long term question.

STQ: What is wrong with the above programs?
LTQ: What is a good refrence book for DLL programming?

Post or mail.

Thanks.

Ahmad
ahmad@norooz.b17a.ingr.com
From: fred@poly2.nist.gov (Frederick R. Phelan Jr.)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Equivalent to the unix SCCS for WIN?
Date: 11 Jan 93 16:22:29 GMT


Does an equivalent to the unix SCCS exist for DOS or
Windows?

Tips apreciated.  

Please send personal reply.

Fred
 ---------------------------------------------------
| Fred Phelan                                       |
| Polymer Composites                                |
| National Institute of Standards and Technology    |
| Gaithersburg, MD 20899                            |
 ---------------------------------------------------
| e-mail >>> fred@poly2.nist.gov   (Internet)       |
 ---------------------------------------------------

Newsgroups: comp.os.ms-windows.programmer.misc
From: d88-jwa@dront.nada.kth.se (Jon Wtte)
Subject: Re: difference between STUFF *stuff & STUFF stuff[]???
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 6 Jan 1993 15:17:41 GMT

In <1993Jan6.084522.25921@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:

>			static STUFF stufftable[MAXSTUFF];
>   and in another module that referenced it:
>			extern STUFF stufftable[];
>Ok, that was fine and everything worked ok.

I'm not sure that it should. Since stufftable is explicitly
static to a module (file) you shouldn't have gotten at it
from anywhere else. If you did, that's a bug.

>			static STUFF *stufftable;
>			stufftable=malloc(MAXSTUFF*sizeof(STUFF));
>and in the other module, I left it as:
>			extern STUFF stufftable[];

This of course is totally bogus. It tells the compiler that
you have a data area consisting of items, and that saying
"stufftable" will generate the address of that data area.

>			extern STUFF *stufftable;
>and re-built, it ran perfectly.

Well, this is the correct thing, saying there's this variable
stufftable pointing to data items, and saying "stufftable"
gives you the contents of that variable.

However, since stufftable is static in the first module, you
should not have been able to get at it; the linker should
have given you an unresolved external error.

>and explain why it is so dangerous here, but it's perfectly ok
>to use a pointer or a [] in a function declaration.

I did, above. Better yet, buy Kernighan & Ritchie,
"The C Programming Language" which explain this and a lot
of other things about C.

One common and recommended way of avoiding this kind of
problems is to have the extern declaration in a header,
that both the defining and using file uses.

foo.h:

extern fooItem * fooPointer ;


foo.c:

#include "foo.h"

fooItem * fooPointer = NULL ;

void
InitFoo ( void )
{
	fooPointer = ( fooItem * ) calloc ( sizeof ( fooItem ) , 47 ) ;
}


bar.c:

#include "foo.h"

...
	fooPointer [ 4 ] = ...

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

   Cookie Jar: Vanilla Yoghurt with Crushed Oreos.
Organization: Penn State University
Date: Tue, 12 Jan 1993 10:19:37 EST
From: <KDW103@psuvm.psu.edu>
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: trapping interrupts under windows

  Hello,
    I'm having trouble trapping IRQ11 or IRQ12 under windows.  I am trying to
 write a device driver.  The problem isn't really with trapping the interrupt.
 I found some sample code that helped me do that.  The problem is that anytime
 that the IRQ line is enabled and I switch focus to anything other than the
 program that uses the driver.  Windows crashes.  I've seen it crash 6 totaly
 different ways, and I'm getting tired of it.  Does anyone have any idea what
 is going on?  Is windows changing the interrupt vector table w/o telling me?
 ANY help will be appreciated.

  Thanks,
     Keith (kdw103@psuvm.psu.edu)
From: cornelis_k@et.tudelft.nl
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How to wait for end-of-process?
Date: 8 Jan 93 16:20:38 +0100
Organization: TU-Delft, dpt of Electrical Engineering

I want to make an application which uses another process
(a DOS-application doing some heavy calculations). The
Windows-app must execute the DOS-app, wait for it to be 
finished and read the results from a file. The difficult
part for me is waiting for the DOS-app to be finished.
How can I realise this?

I am using Turbo Pascal for Windows 1.5, but if someone
knows the answer in C++, that could also help. 

Is it possible to identify running processes? Or must I
in some way look for the window in which it is running?

Any help would be greatly appreciated, please reply
to r.p.essenius@et.tudelft.nl

Thanks in advance,

Rik Essenius
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
From: David.Gunter@launchpad.unc.edu (David Gunter)
Subject: Errors compiling LARGE model with MS C++ 7.0 and MFC
Keywords: MFC, large
Organization: University of North Carolina Extended Bulletin Board Service
Distribution: na
Date: Tue, 12 Jan 1993 16:46:06 GMT

We're trying to develop a Windows program using Microsoft C/C++ 7.0
and the Microsoft Foundation Class (MFC) Library. Our target platform
is a 486 running Windows 3.1.  The program is designed to run in
enhanced mode ONLY.

Everything compiles and runs just fine under MEDIUM model. When we
decided to compile under LARGE model, the program crashes with a GPF 
in the startup code.  WinMain is NEVER reached. (Yes, I rebuilt the MFC
libraries as LARGE model libraries :-)

We've been unable to track this down so far. Basically, it dies in the
startup code.  Does anyone have any ideas/solutions/information/spells 
about this?

==================================================================
Dave Gunter *** Wandel & Goltermann Technologies *** gunter@wg.com
==================================================================

--
   The opinions expressed are not necessarily those of the University of
     North Carolina at Chapel Hill, the Campus Office for Information
        Technology, or the Experimental Bulletin Board Service.
           internet:  laUNChpad.unc.edu or 152.2.22.80
From: jca17@phx.cam.ac.uk (J.C. Ashworth)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Toolbar Support Available (C++)
Keywords: toolbar, OWL, Borland
Date: 6 Jan 93 17:14:41 GMT
Organization: U of Cambridge Computer Lab, UK

I have just finished writing two 'easy to use' and very extensible classes to support toolbars and
'toolbar-style' buttons (which may be used separately and placed in any window as far as I can see).

I have developed the code using Borland C++ 3.1. Both classes are completely OWL compatible but may
be used with 'standard' Windows programs as well (without change!?).
All code is highly portable (in my view at least!)

I shall be happy to share my code, documentation and a demonstration of how to use the classes with
anyone interested.

Email me at jca17@phx.cam.ac.uk
From: jkubicky@cco.caltech.edu (Joseph J. Kubicky)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Why does my mouse crash when I use Win 3.1 Debugging Verion?
Date: 7 Jan 1993 07:33:03 GMT
Organization: California Institute of Technology, Pasadena
NNTP-Posting-Host: punisher.caltech.edu


I just tried to use the debugging version of 3.1 (Enhanced) for the first
time.  It starts up ok, and identifies itself as the debugging version,
but my mouse only responds until the big prog manager window opens up -
as soon as this window is opened, the mouse dies right where it is (but
continues to switch between hourglass, pointer, etc.).  Has anyone else
had this problem?  Can I fix it.

Oh, my mouse is a Logitech Serial (type C7).  Works fine under no-debugging
version of 3.1.


Thanks,

Jay Kubicky
jkubicky@cco.caltech.edu
From: jcl@bdrc.bd.com (John C. Lusth)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: initalizing dialog boxes
Date: 8 Jan 93 16:44:47 GMT

Hi again.  Thanks to the those who pointed out the obvious in
that I need to call IsDlgMessage for the tab keys to switch input
focus.

Now another question.  When do I initialize my child windows when
I am using a dialog box as my main window (ala HEXCALC in Petzold)?
I never receive a WM_INITDIALOG message; when I receive the
WM_CREATE message, my child windows are not yet created (i.e.
GetDlgItem returns 0).

What I ended up doing is the first time I receive a message from
the child window, I initialize the child window.  This is not a very
appealing method.

A related question is I can't return TRUE when processing a WM_INITDIALOG
message since I never receive it.  Therefore none of my child windows
gets the initial input focus.  What's up with that?

john
-- 
John C. Lusth, Becton Dickinson Research Center, RTP, NC, USA  jcl@bdrc.bd.com
Newsgroups: comp.os.ms-windows.programmer.misc
From: hill@netcom.com (Tom Hill)
Subject: Re: ? Device Interface w/o DDK ?
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Distribution: na
Date: Tue, 12 Jan 1993 00:34:00 GMT

In article <1993Jan11.144522.7687@bnr.ca> tracyb@bnr.ca (Tracy Blomquist) writes:
>I have a PC card that requires the use of h/w int 2-5 (one of)
>and reading/writing to several ports.  I want to port the DOS
>app that uses it to Windows.  I don't have the DDK. 
>
>I read an article in MSJ a while back about "embedded device
>drivers" in windows apps.  But these drivers can only access
>devices generating ints >= 30h. I'm thinking about the following
>approach to get it to work...
<stuff deleted>


You might want to take a look at the code in the ...\samples\handler
directory of the SDK. It is a simple DLL that fields keyboard interrupts.
It seems a lot simpler than trying to do a combined DOS/Windows driver.

Tom Hill
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: Difference between a dialog-box and an window 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Thu, 7 Jan 1993 19:30:46 +0000

In article <1ih6vkINN1ck@coli-gate.coli.uni-sb.de> stanke@sol.cs.uni-sb.de writes:

>Hi Folks out there,
>
>can anyone tell me the big difference between a dialog-box (normally created
>with an resource, non-modal) and a standard-window (with push-buttons, 
>scroll-bars etc.)

There *is* no difference.  A dialog box is simply a window that uses a
pre-defined window procedure that Microsoft wrote for you.  CreateDialog,
etc, actually creates all the controls via calls to "CreateWindow", 
exactly as you could do yourself.

>Is it possible to emulate with a standard-window the properties of a 
>dialog-box ? 
>

Certainly it is, yes.  The easy way is just to have an "IsDlgMessage" line
in your main message loop.  This will give your window the standard dialog
keyboard interface (TAB moving between controls, etc).

>Please give me a response or mail to
>stanke@sol.cs.uni-sb.de
>
>Thank you
>Oliver
>
-- 
--------------------------------------------------------------------------
| 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: jagrant@emr1.emr.ca (John Grant)
Subject: does GetPrivateProfileString work with lpszEntry= NULL?
Organization: Energy, Mines, and Resources, Ottawa
Date: Tue, 5 Jan 1993 03:45:04 GMT

I'm trying to get GetPrivateProfileString() to work for the case
where lpszEntry is NULL - no success.  The following may also apply
to GetProfileString() as well (for WIN.INI).

Suppose I have the following in my xxx.ini file:
	[stuff]
	abc=xxx
	def=yyy
	ijk=zzz
Then, supposedly I should be able to get the whole [stuff] section with
char buffer[100];
	GetPrivateProfileString("stuff",NULL,"failed",buffer,
			sizeof(buffer),"xxx.ini");
and yet I only get "failed" and I should get:
	"xxx\0yyy\0zzz\0\0"
or so it says in the docs.

It doesn't work if I use "" instead of NULL either, and yet if I use
"abc", sure enough I get "xxx", so I know I'm doing something right.

Supplementary Question #1
  Assuming I can get this to work, will I be able to read:
	[stuff]
	xxx
	yyy
	xxx
  when using lpszEntry=NULL, or does each item require a keyword?

Supplementary Question #2
  If I have:
	[stuff]
	abc=xxx
	abc=yyy
	abc=zzz
  and I ask for entry "abc", will I get:
	(a) nothing
	(b) "xxx" the first one
	(c) "zzz" the last one

John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: michael@glia.biostr.washington.edu (Michael)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How do you get enviroment variables?
Date: 5 Jan 93 00:13:02 GMT
Article-I.D.: glia.michael.726192782
Organization: University of Washington
NNTP-Posting-Host: glia.biostr.washington.edu

In <1993Jan3.194240.11140@exucom.com> bobw@exucom.com (Bob Willer) writes:
>How do you get the enviroment variables that are used by the system
>with the SET command ie. in the autoexec.bat file ?
>Bob Willer

Well, if you want the value of a single environment variable, you can
always use the getenv() call.  If however you want to access the entire
list of environment variables (or you don't know the name of one in
particular and wish to search the entire list), then you can access the
global variables 'environ' (in Borland C -- I assume Microsoft C has
something similar).  Environ is of this type:

    extern char *environ[];

and is declared in <dos.h>.  Environ is a NULL terminated array of
string pointers.  Each string is of the form:

    VAR=value

Hope that helps.

    Michael Stanley (michael@glia.biostr.washington.edu)
From: jne@rice-chex.ai.mit.edu (Jeff Eisen)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: GP Trap device driver
Date: 12 Jan 93 21:58:53 GMT
Organization: MIT Artificial Intelligence Lab
NNTP-Posting-Host: rice-chex.ai.mit.edu

Hi.

I'm new to device driver programming, so excuse me if my
terminology is not 100% correct.

I have taken over a GP Fault device driver written by someone
else. It almost always works ok.

When in 386 enhanced mode in windows 3.1, the driver is hooked in with 
Hook_PM_... and defined to handle interrupt "0dh".

Normally, when I get a GP fault, my handler kicks in and throws my
application (lisp) into the debugger, instead of windows putting up
the "Do you want to close" screen.

I have a repeatable case though, where I'm not sure why its GP faulting,
with the following behavior:
   1) If I don't install my handler, there is no GP fault (at least there 
      is no "Do you want to close" screen and CVW doesn't detect the fault).
   2) If my handler handles the fault, I get thrown into my debugger
      in an almost-dead state.
   3) If my handler declines the fault by chaining to the next handler
      in the chain, there is no GP fault (at least there is no "Do you
      want to close" screen and CVW doesn't detect the fault.

Is it possible that there are some classes (error codes?) of GP faults
that my device driver is supposed to know to ignore?

Is there any good way to debug this (I've never used WDEB386 or WINICE,
but I could learn them if necessary)?

This is a real bitch to debug because the error only happens when I'm
set up so that CVW won't catch the error :-(

Thanks in advance for any help or ideas.

Jeff Eisen
jne@ai.mit.edu
Newsgroups: comp.os.ms-windows.programmer.misc
From: pbreen@world.std.com (Patrick D Breen)
Subject: Re: Automatic data segment exceeds 64K
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 8 Jan 1993 01:12:41 GMT

"Jeffrey P. Overcash" <p00090@mail.psi.net> writes:

>  The header say it all - well almost.  I'm useing Borland C++ and I am 
>currently running into this linking error.  Unfortunately, I have a DLL 
>that requires a large (32K) stacksize and already only use 1024 for 
>heapsize therefore I need to move some of my near data to far.  I've 
>tried several different way of doing this (or so I thought), but nothing 
>seems to be affecting this problem.  The manual says to use the map file 
>to determine the sizes of the componant segments to see which modules 
>contribute what to the DGROUP.  I've done this but nowhere can I find 
>out how to move a module into another segment.  Any and all help will be 
>greatly appriciated.

We ran into the same problem with our application.  What we did to fix it
was to remove the expression string from our asserts and make sure that
the "merge duplicate strings" option is enabled.  Both of these reduce the
size of the automatic data segment.

If these don't help, the space is probably being taken up by a few static
arrays or structures.  If it is possible to change these to be allocated
from the heap, the problem may go away.  If it is not possible to allocate
them from the heap, you can force them to be put into a far segment by
including the _far keyword in the declaration - for instance 

static long _far LargeArray[1000] = { 1, 2, ... 1000, };

The one thing to watch for with this is that by default, Borland will
create a new far segment for each declaration of this type.  There is a
compile switch (and a #pragma) that force them all into the same far
segment but I forget what the switch is.

Hope this helps,

Patrick Breen
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: difference between STUFF *stuff & STUFF stuff[]???
Organization: Energy, Mines, and Resources, Ottawa
Date: Wed, 6 Jan 1993 08:45:22 GMT

At the risk of appearing stupid again, I have another (perhaps
obvious, but not right now at 3:30 AM) question...

I had the following in my app:
   in my global module:	#define MAXSTUFF 10
			static STUFF stufftable[MAXSTUFF];
   and in another module that referenced it:
			extern STUFF stufftable[];
Ok, that was fine and everything worked ok.

I decided to change it to a heap table instead, so I declared
it in global as:
			static STUFF *stufftable;
and at startup time, allocated it:
			stufftable=malloc(MAXSTUFF*sizeof(STUFF));
and in the other module, I left it as:
			extern STUFF stufftable[];

I thought that it was ok (actually I forgot to change it), because
you can use things like
		somefunc(...,STUFF *x,...);
	and	somefunc(...,STUFF x[],...);
interchangeably in function calling sequences, i.e. there is
no difference between a pointer and the address of an array.

Boy, was I surprised!  When I re-built and tested it, all hell
broke loose, with UAE and crashes left, right & centre.  Note
that I always enable every single warning when I compile and it
didn't tell me there was anything wrong.  Anyway, when I changed
the reference to:
			extern STUFF *stufftable;
and re-built, it ran perfectly.

So, can someone tell me the difference between the following 2
statements:
	extern STUFF *stufftable;
	extern STUFF stufftable[];
with respect to the code generated when I reference stufftable, i.e.:
	stufftable[i].xxx=...
and explain why it is so dangerous here, but it's perfectly ok
to use a pointer or a [] in a function declaration.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: deitsch@sol.crd.ge.com (Andy Deitsch)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: More MDI questions
Date: 11 Jan 93 14:28:23 GMT
Reply-To: deitsch@sol.crd.ge.com
Organization: GE Research & Development

Ok, thanks to everyone who told me that if I intercept the WM_SIZE
message I also need to pass the message on to the default proc.

Question:

I have my MDI application and can create two different types of children
(documents).  What I would like, is to also create a child window that
is owned by one of these MDI children so that I can use it as a tool box
whenever the MDI child window is active (similar to the Tools window
used in Borland's Resource Workshop in the Dialog Editor).

I have tried calling CreateWindow after my MDI Child has been created but
this seems to cause a Protection Violation Error.  I have tried several
different styles (WS_CHILD, WS_CHILDWINDOW etc), but nothing seems to work.

Does anyone have an idea as to how this can work?  I don't really want another
MDI child because it seems that MDI children must have Maximize/Minimize 
buttons which I don't want.

Also, how does Borland get their Tools window (it may be a dialog box I
don't know) to constantly be active even if another MDI child window is
active?

Any answers would be appreciated.


Andy
-- 
_________________________________________________________________________
Andy Deitsch                             email    : deitsch@crd.ge.com  
GE Corporate Research & Development      phone    : (518) 387-7207   
Schenectday, NY 12301                    dial comm: 833-7207     
Newsgroups: comp.os.ms-windows.programmer.misc