HDTenEightyP/NetNews huggingface dataset:
From: mehran@monet.uwaterloo.ca (Mehran Farimani)
Subject: Re: modifying a variable in a Windows .EXE without re-linking???
Organization: University of Waterloo
Date: Wed, 6 Jan 1993 02:21:44 GMT

In article <1993Jan3.205027.28520@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
>Now, I really don't feel like re-linking the program with a different
>value of lockfilesize tied to each data set distributed, so is there
>a way of modifying this value in an already-linked .EXE, but not
>allowing anyone else to do it?
>
>Although I'm sure there are many ways to hack this, I would prefer
>a formal solution which is all 'up-front', so I can automate it
>somehow using a .BAT file.
>-- 
>John A. Grant						jagrant@emr1.emr.ca
>Airborne Geophysics
>Geological Survey of Canada, Ottawa

One solution is to put an identifier string as a part of a structure
following which is all your "post-configurable" variables. So,
for example in your case we'd have something like this:

typedef struct
{
   BYTE byIDString [10];
   LONG lLockFileSize;
} CONFIGINFO;

CONFIGINFO cnf =
{
   "012345678",
   -1
};

Then, you can write a small program which searches your exec for the ID
and writes all your configuration data in to the exec. Of course, for the
final version of your executable you can replace the search part with a
simple lseek() if you like.

Hope this helps ....

Regards,

--Mehran

Newsgroups: comp.os.ms-windows.programmer.misc
From: runehh@dhhalden.no (RUNE HALFDAN HOLST HUSEBY)
Subject: How to use OWL-runtime-library as DLL?
Organization: Ostfold College
Date: Sat, 9 Jan 1993 04:21:31 GMT

As the subject says, how do I use Borlands run-time libraries as DLL's?

I set the the linker/libraries options to DYNAMIC on all, I include the 
import-libraries (OWL.LIB, CRTLDLL.LIB, TCLASSDLL.LIB) in my project-file, 
compile everything in large model, but still I get linker errors, 
complaining about undefined symbols in my modules. 

Have anyone out there did what I'm trying to do?
If so please help me, I really need it!

Thanks in advance.


/-----------------------------+--------------------------------------------\
|  Rune Halfdan Holst Huseby  |  Ostfold Regional College, Halden, NORWAY  |
|-----------------------------+--------------------------------------------|
| Real programmers never work 9 to 5. If any real programmers are around   |
| at 9 am, it's because they were up all night.                            |
\--------------------------------------------------------------------------/
From: s_furrer@irau35.ira.uka.de (Andreas Furrer)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Getting rid of Help Engine on WM_SYSCOMMAND ?!
Date: 8 Jan 93 12:24:12 GMT
Organization: University of Karlsruhe, FRG
NNTP-Posting-Host: irau35.ira.uka.de

I think the problem was with Windows 3.0, not with 3.1

Andreas Furrer
s_furrer@ira.uka.de
Newsgroups: comp.os.ms-windows.programmer.misc
From: Steve_Goyette@mindlink.bc.ca (Steve Goyette)
Subject: Re: Any GIF display routines for windows 3.1? DLL?
Organization: MIND LINK! - British Columbia, Canada
Date: Tue, 12 Jan 1993 01:48:53 GMT

Hi,

        Try the Victor Library from Catenary systems (It's advertised in the
latest Windows Tech Journal.  It can read display and manipulate Gif's,
BMP's, TGA's, PCX's, TIFF's and Bif's (I have no idea what a BIF is) anyway,
it works really well.


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

Steve Goyette                    |       Email : Steve_Goyette@MindLink.BC.CA
Software Engineer                |       Cserve: 71763,1435
Abstract Automation Limited      |       Phone : (604) 421-8864
                                 |       Fax   : (604) 421-7722 (Call first)
-------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: dbl10@cunixb.cc.columbia.edu (Dominic B LoTempio)
Subject: MID File support for Windows programming
Organization: Columbia University
Distribution: usa
Date: Mon, 11 Jan 1993 08:03:08 GMT


	I am attepting to write a music notation program for Windows and
I'll like to be able to import and/or export using the standard MIDI .MID
file format.  Unfortunately, I know absolutely nothing about this file
standard.

	If someone could E-mail me or refer me to some reference as to
where I could learn something about the .MID file format I would greatly
appreciate it.

Thanks...

Newsgroups: comp.os.ms-windows.programmer.misc
From: rmccown@world.std.com (Bob McCown)
Subject: HELP!  Printing 3x5 cards!
Organization: The World Public Access UNIX, Brookline, MA
Distribution: all
Date: Mon, 11 Jan 1993 14:26:37 GMT

Hi there!
 Im working on an application, and as one of it's features, it will print
out information onto 3x5 index cards on the printer.  TextOut doesnt do
what I want, as I have to give it x and y locations.  I'd rather just
print line-by-line and work out myown top-of-form, etc...is there a simple
way to print to the printer line-by-line?  Thanks in advance. 


-- 
|  Bob McCown / Mundane - Robur of Roestoc / SCA - Sir Gaath Gazul / NERO  |
|  rmccown@world.std.com                                                   |
|  "'ow d'you know 'e's a king?" "'cause 'e 'asn't got shit all over 'im!  |
|									   |
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: Enabling the first and only window in MFC 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Fri, 8 Jan 1993 19:34:48 +0000

In article <C0Fyw0.3pq@pcuf.fi> turre@pcuf.fi writes:

>I want user not to be able to run many instances of my application. So if
>he tries to run another instance my program should bring the first
>instance to top. I've been trying it with this following code:
> 
>BOOL CMyApp::InitInstance()
>{
>    If( m_hPrevInstance != NULL )
>    {
>        m_pMainWindow->BringWindowToTop();
>        return FALSE;
>    }
>    else
>    {
>        m_pMainWindow = new CMyWindow;
>        m_pMainWindow->ShowWindow( m_nCmdShow );
>        m_pMainWindow->UpdateWindow();
>        return TRUE;
>    }
>}
> 
>The first instance runs fine and no other instances are displayed or created
>but the first windows is not brought to the top.
>

No - your code is wrong! This code:

>    If( m_hPrevInstance != NULL )
>    {
>        m_pMainWindow->BringWindowToTop();
>        return FALSE;
>    }

brings *your* window to the top, not that of the previous instance.
Sorry I don't know MFC or whatever it is you're using here, but what
you want to do is:

    if (m_hPrevInstance!=NULL)
    {
        hWnd = FindWindow( "MyAppClassName", NULL );
        BringWindowToTop( hWnd );
        return FALSE;
    }

That will do the trick.

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: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: Help - How to wite .hlp files 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Sat, 9 Jan 1993 17:46:04 +0000

In article <1993Jan9.124143.20324@sbfdk.sbf.dk> bmu@sbfdk.sbf.dk writes:

>Hi
>I'm not programmer, not primary, I kan write simple C programs etc.
>BUT
>I want to write som .hlp files for use in WINDOWS specialized for
>our company's use of windows.
>
>Can some of you guy's out there give me a tip of how to do those help
>files for WINDOWS. I would prefer not to need to bye a compiler tool-kit
>or similar.
>
>Is there a specialized editor or compiler?? if so - are there free- or
>shareware programs to do those ?
>
>Thanks
>
>-- 
>Boerge Mueller  (Project manager CAD & Technical information systems)
>Phone  : +45 3393 5200 x 222       | I don't know what the          |
>Company: Great Belt Lmtd.          |   managment's opinion          |
>E-mail : bmu@sbf.dk                |     is/are/was/will be etc.etc.|
>

Help files are written using a word processor, then compiled using a 
program called the "Help Compiler".  You need a word processor capable of
producing "RTF" files, of which the best is probably Word for Windows.

The easiest way to write help files is using Microsoft's (unsupported)
"Windows Help Project Editor", WHPE, available from CompuServe and
(presumably) ftp.uu.net too.  This consists of the help compiler itself,
a program to maintain the help project file, and a very complete set of
Word for Windows macros which make it easy to write the help topics.

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: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: Forced Update (WM_PAINT) of Window 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Wed, 6 Jan 1993 20:32:17 +0000

In article <C0Fx4F.6Cs@ccu.umanitoba.ca> umwaletz@ccu.umanitoba.ca writes:

>I'm using Borland C++ 3.1 to create my app and here's the problem:
>
>I have this main window which contains about 20 children, with each
>child being a box containing a particular color. Up pops a dialog
>asking the user to respond to some questions and once this dialog
>disappears, I would like to update all of the children with their
>new colors (ie. force a WM_PAINT message).
>
>I thought all I had to do was Invalidate the parent window and call
>UpdateWindow, but this doesn't seem to work. I then tried Invalidating
>all of the children and calling UpdateWindow, but this didn't work
>either. Any ideas?
>
>James.
>umwaletz@ccu.umanitoba.ca
>
>

That *is* all you have to do!  Saying:

    InvalidateRect( hWnd, NULL, TRUE );
    UpdateWindow( hWnd );

forces a total repaint of window "hWnd".  This certainly *should* work.
-- 
--------------------------------------------------------------------------
| 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: hill@netcom.com (Tom Hill)
Subject: Re: Calling ISR from Windows application
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Tue, 12 Jan 1993 00:41:56 GMT

In article <1993Jan11.151339.26243@nntpd.lkg.dec.com> j_pan@ranger.enet.dec.com (Joanna Pan) writes:
>
>I am porting a DOS application to Windows environment. Can I use in-line
>assembly to make an interrupt call ? It's not the regular int 21h or int 5Ch.
>e.g.
>	_asm {
>	     push  ds
>	     push  ax
>	     mov   ax, 0DE11h	; some function code
>	     int   78h		; call ISR
>	     pop   ax
>	     pop   ds
>	     }
Yes, but bear in mind that windows may be using some vectors that were
available in DOS.
>
>Can I use 32-bit registers instead of 16-bit ? 
You can use them, but I don't think the in line assembler recognizes them.

>If I choose to write a separate assembly file, can I write truely 
>32-bit programme ?
No. Windows normally runs code with 16 bit segment limits, you can use
the 32 bit registers, but you can't use them to address past the end of the
segment. For true 32 bit programming you need Win32s from the NT beta,
or one of the third party add ons. (I think Watcom has one).
>_______________________________________________________________________________
>!	Joanna Pan			email:j_pan@ranger.enet.dec.com       !
>! 	Personal Computer Systems Group					      !
>!	Digital Equipment Corporation					      !
>!	Littleton, Massachusetts					      !
>-------------------------------------------------------------------------------

Tom Hill
From: krishnan@pms001.pms.ford.com (Krishnan Subramaniam)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Need Help with DLLs
Date: 8 Jan 1993 17:33:57 GMT
Organization: Ford Motor Company
Distribution: world
NNTP-Posting-Host: pms001.pms.ford.com

Yes, It is possible.

But, you should know the list of functions you may be adding in the
future.

  List down All the functions you would add in future.

  Include them in the "*.def" file for the DLL

  Create dummy functions for all these functions in the corresponding
  library.

  Once you link the executable you are all set.
  Any change you make to the DLL should not affect your executable.

  You can't make changes to the order of the functions in your "*.def"
  file.

Hope this is what you are looking for.

Newsgroups: comp.os.ms-windows.programmer.misc
From: jeremy@cheetah.inmos.co.uk (Jeremy Thorp)
Subject: Re: DebugOutput: Unresolved External error...
Organization: INMOS Limited, Bristol, UK
Date: Tue, 12 Jan 1993 10:43:15 GMT

In article <9301112109.AA06983@deepthought.cs.utexas.edu>, pugsley@h32.nswc.navy.mil (Don Pugsley) writes:
|> 
|> My linker cannot find DebugOutput (L2029: Unresolved External)... a search
|> of all files in the \WINDEV tree finds NO occurences except DBAPI.TXT and
|> WINDOWS.H!  I am running the 3.1 debug version, have #included toolhelp.h
|> and windows.h, and have tried linking with OLDNAMES.LIB as suggested by the
|> Error Reference section on L2029.  Where is the code for this function
|> supposed to be? I am sure this is a simple problem but I am very
|> frustrated!  Thanks...

I had great problems with this too!! Eventually I got enough info from the net to get it to
work. Here goes:

First: add the following to the .DEF file (From: jjacob@nyx.UUCP)

IMPORTS
    _DebugOutput=KERNEL._DebugOutput
 
This will make the linkage work, but is not enough on it's own.

Second: for each call, 'OR' in DBF_APPLICATION to the first parameter
(From: rryan@panix.com): 

>I have a point in my code that calls OutputDebugString, DebugOutput,
>and then OutputDebugString again (3 successive lines).  The
>OutputDebugString strings are displayed by DBWin, but the DebugOutput
>string is not. I am using DBF_TRACE as the first parameter to
>DebugOutput

Ah ha.  You should use DebugOutput(DBF_TRACE | DBF_APPLICATION, ...).
That will do it.  It's not in the docs, but seems to work.

Third: If you are using DbWin, make sure that the application check box is checked.

Hope this helps, Jeremy

-- 
Jeremy Thorp, INMOS Ltd, 	|	jeremy@inmos.com
1000 Aztec West, Almondsbury, 	|	jeremy@inmos.co.uk
Bristol, BS12 4SQ, UK.		|	
Tel.  +44 454 616616    Fax. +44 454 617910
The above is the personal opinion of the author,
and does not necessarily reflect INMOS policy.
Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.pascal
From: troy@cbme.unsw.EDU.AU (Troy Rollo)
Subject: Re: DLL Procedure/Function Calls ???
Organization: University of New South Wales
Date: Fri, 8 Jan 1993 20:12:23 GMT

From article <VyT2wB4w165w@shakala.com>, by donh@shakala.com (Don Hackler):
> dmurdoch@mast.queensu.ca (Duncan Murdoch) writes:
> 
>> In article <1993Jan7.184304.3453@scf.loral.com> andres@scf16.scf.loral.com (J
>> >        Windows, likewise vendors and programmers, often supply .DLLs
>> >for use by others. Is there a convient way to find out what the calling
>> >convention is to utilize the procedures/functions contained ?  Is there
>> >a way to get like a "directory" listing of available calls ? 
>> 
>> There's a list of external entry points in the .DLL, but no information 
>> there about calling conventions.  You could use a disassembler to try to 
>> figure it out (e.g. my Dumpprog, on garbo.uwasa.fi as 
>> /pc/turbopas/dmpprg20.zip) by looking at the code following the entry points,
>> but it's not easy.  
>> 
> 
> Or get Undocumented Windows by Andrew Shulman...  which
> includes the utilities to dump the DLL entry points, and lots
> of other good stuff...

This doesn't help in the case of 3rd party DLLs. For these, there are a few
ways of finding the calling convention. The easiest is to assume the C calling
convention, and no parameters for all exported functions of the DLL (which you
have discovered by using IMPLIB or the MS equivalent). You then make calls to
each of them from a WinMain in a dummy program, and run that program in your
debugger. Before each call, note the value of the stack pointer, then step
over the call. Compare the stack pointer after the call to that before the
call. If they differ, the Pascal calling convention is being used. This is
the case in about 90% of 3rd party DLLs, and has the advantage that the
difference between the before and after stack pointers tells you how many
bytes were expected as parameters.

Alternatively, you can trace one level into the DLL (you'll need to do so
in "CPU" or assembly language level in the debugger, and look for the RET
statement for the function. If it is a RET n, where n is a number, that
call is a Pascal call with n bytes of parameters.
--
_______________________________________________________________________________
troy@cbme.unsw.EDU.AU	      Overworked, overcommited and always multitasking.
Opinions expressed are not those of the CBME or UNSW, but are my opinions only.
You are free to adopt them.   I suggest you adopt them.    You will adopt them!
Newsgroups: comp.os.ms-windows.programmer.misc
From: edbsba@sio25.uio.no (Stein-Aksel Basma)
Subject: EXCEL or SYLK file-formats
Organization: University of Oslo
X-Newsreader: TIN [version 1.1 PL8]
Date: Tue, 5 Jan 1993 14:15:58 GMT

Hello net,and happy GNU-year
I am looking for specs for the EXCEL 3.0 file-format, or the
SYLK format as used in Multiplan 3.04 or previous. My plan is
to write an interface for the SYLK-format for the GNU-oleo spreadsheet.
Oleo thus support SYLK, I know that. But it doesn't seem to understand
all the different fields in an Excel-generated SYLK-file.

Thanx in advance

--
/************************************************************/
 *	Stein-Aksel Basma				    *
 ************************************************************

Self Test for Paranoia:
	You know you have it when you can't think of anything that's
	your own fault.
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Loading Bitmaps from Resource Editor (TPW 1.5)
Organization: Energy, Mines, and Resources, Ottawa
Date: Wed, 6 Jan 1993 22:21:18 GMT

In article <1993Jan6.205044.24863@news2.cis.umn.edu> erik@turtle.psych.umn.edu (Erik Arthur) writes:
>Hello,
>
>I am writing a solitare type game and have a couple of questions about
>loading bitmaps from a *.res file.  I have been loading the bitmaps
>sequentially into a single variable of type HBitmap when the program
>needs to display them.  The problem is that I don't think that the
>HBitmap variable is being reused properly.  When I exit the application,
>a certain percentage of the windows resources reported by the Program
>Manager are gone.  What does the program need to do in order to reuse
>the variable?  When I use DeleteObject, the program crashes with a stack
>error.  Should I just load all of the bitmaps into an array?
>I am using TPW 1.5
	You *must* ensure that you have de-selected the object *before*
	you delete it.

	HBITMAP old_hbitmap,hbitmap;
		hbitmap=....this is the bitmap you have loaded
		old_hbitmap=SelectObject(hdc,hbitmap);
		...
		SelectObject(hdc,old_hbitmap);
		DeleteObject(hbitmap);

	If you are already doing that, then I have no other ideas.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: keeping an MDI child maximized 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Tue, 12 Jan 1993 19:43:23 +0000

In article <MUFFY.93Jan8122200@remarque.berkeley.edu> muffy@remarque.berkeley.edu writes:

>
>I have an MDI application which has several children.  One particular
>child is frequently maximized by the user.  When they select another
>child, though, the maximized child is sized back to its previous size.
>This is annoying, as they then have to re-maximize it.  Is there some
>way that I can tell it to stay maximized until the user resizes it
>explicitly?
>
>Thanks...
>
>Muffy
>--
>
>Muffy Barkocy                      | ~Never had a lot of faith in human beings/
>muffy@mica.berkeley.edu            |  but sometimes we manage to shine/like a
>"amorous inclinations"? Aha! I'm   |  light on a hill beaming out to space/from
>not "not straight," I'm *inclined*.|  somewhere hard to find~ - Bruce Cockburn
>

This is just the way the Window user interface works - annoying, isn't it?
You should be able to get around it by maximizing your window whenever it
receives a WM_ACTIVATE message.

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: gtonwu@Uz.nthu.edu.tw (Tony)
Subject: Data Type problem !!
Organization: National Tsing Hua University (HsinChu)
Date: Sat, 9 Jan 1993 08:50:30 GMT

Hi, there 

     I am confused by type data types of MSC ! I don't know what is the
     difference among them , since I was simply using int,unsigned,char..
     while I did programming under MS-DOS before    !

     Would someone kind enough to tell me the distict difference of the 
     following !?

       WORD , DWORD, LONG, WPARAM, LPARAM , ... 

       and some others I have to know !


-- 
+--------------------------------------------------------------------------+ 
| Tony Wu.   (: gtonwu@uz.nthu.edu.tw :)  National Tsing Hua Univ. CHE 95. |
|                                                                          |
|    @@#  Hey," You can't beat the feeling !". #@@                         |
From: mjn@aber.ac.uk (Mark James Neal)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Doing DDE from Visual Basic to Access
Summary: Need to know command strings
Keywords: DDE, Visual Basic, Access
Date: 12 Jan 93 16:42:46 GMT
Organization: University of Wales, Aberystwyth

I am trying to write an application that uses Visual Basic as its
front-end and uses Access as its underlying database. I have managed 
to get Access to acknowledge that it is being talked to using:

"microsoft access|pymsmngr" 

as the LinkTopic (pymsmngr is the name of my database in access). What
I can't do is get any information back because I don't know what to use
as the LinkItem. I've tried alot of stabs in the dark, and I've even
read the Access manual, but I can't find anything to tell me what syntax
I need to use.

The error message I get is:

"Foreign application won't perform DDE action or method"...

Any help or educated guesses, or pointers as to where I can find out how
to make it work will be gratefully received!?

Help!

Mark.


-- 
E mjn@aber    (UK)       \S  Mark Neal                   \V
M mjn@aber.ac.uk    (inet)\N  Dept of Biological Science  \O  +44
A ...!mcsun!ukc!aber!mjn   \A  University of Wales,        \I  970 622353
I           (uucp)          \I  Aberyswyth, Dyfed.          \C
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)