delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/02/19/16:39:35

From: vaniwaar AT ca DOT metsci DOT com (Ronald Van Iwaarden)
Subject: sys V shm with _very_ limited functionality
19 Feb 1998 16:39:35 -0800 :
Message-ID: <Pine.LNX.3.95.980219073254.13851B-300000.cygnus.gnu-win32@tomcat.ca.metsci.com>
Mime-Version: 1.0
To: GNU-Win32 mailing list <gnu-win32 AT cygnus DOT com>

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime AT docserver DOT cac DOT washington DOT edu for more info.

--1791478163-988259526-887902629=:13851
Content-Type: TEXT/PLAIN; charset=US-ASCII


Well, As promised, here are the files with _very_ limited functionality. 
This is my first trip into WIN32 programming (mostly unix and OS/2) so
please forgive any poor WIN32 programming practices. 

--Ron
      o           Work to live; \   vaniwaar AT ca DOT metsci DOT com
     /\            Live to bike; \   http://www-math.cudenver.edu/~rvan
   _`\ `_<===       Bike to work! \  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
__(_)/_(_)___.-._                  \   Note the new addresses!


--1791478163-988259526-887902629=:13851
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="SharedMemoryCalls.C"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 3 DOT 95 DOT 980219073709 DOT 13851C AT tomcat DOT ca DOT metsci DOT com>
Content-Description: 

I2luY2x1ZGUgIlNoYXJlZE1lbW9yeUNhbGxzLkgiDQoNCg0KI2lmZGVmIF9f
Q1lHV0lOMzJfXw0KDQpzdHJ1Y3QgX1NoYXJlZE1lbW9yeVBvaW50ZXJzew0K
ICBIQU5ETEUgaDsNCiAgSEFORExFIFByb2Nlc3NIYW5kbGU7DQogIGNoYXIg
KiBwdHI7DQogIHN0cnVjdCBzaG1pZF9kcyBTaG1pZF9EUzsNCn0gU2hhcmVk
TWVtb3J5SGFuZGxlOw0KDQoNClNoYXJlZE1lbW9yeUhhbmRsZSAqIFNobWVt
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BicmVh
azsNCgljYXNlIElQQ19TRVQ6DQoJICBlcnJubyA9IEVJTlZBTDsNCgkgIHBy
aW50ZigiSVBDX1NFVCBub3QgaW1wbGVtZW50ZWQgeWV0XG4iKTsNCgkgIGJy
ZWFrOw0KCWNhc2UgSVBDX1JNSUQ6DQoJICBDbG9zZUhhbmRsZShTaG1lbUhh
bmRsZXNbcG9zXS5oKTsNCgkgIFVubWFwVmlld09mRmlsZShTaG1lbUhhbmRs
ZXNbcG9zXS5oKTsNCgkgIFNobWVtSGFuZGxlc1twb3NdLmggPSAtMTsNCgkg
IGJyZWFrOw0KCX0NCiAgICAgIH0NCiAgICAgIGVsc2V7DQoJZXJybm8gPSBF
SU5WQUw7DQogICAgICB9DQogICAgfQ0KICB9DQoNCiNlbHNlDQogIHNobWN0
bChoYW5kbGUsIGFjdGlvbiwgYnVmKTsNCiNlbmRpZg0KfQ0KDQoNCg0KDQo=
--1791478163-988259526-887902629=:13851
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="SharedMemoryCalls.H"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine DOT LNX DOT 3 DOT 95 DOT 980219073709 DOT 13851D AT tomcat DOT ca DOT metsci DOT com>
Content-Description: 

I2lmbmRlZiBTSEFSRURfTUVNT1JZX0NBTExTX0gNCiNkZWZpbmUgU0hBUkVE
X01FTU9SWV9DQUxMU19IDQoNCiNpZmRlZiBfX0NZR1dJTjMyX18NCiNpbmNs
dWRlIDx3aW5kb3dzLmg+DQoNCnN0cnVjdCBzaG1pZF9kcyB7DQogIHN0cnVj
dCAgICBpcGNfcGVybSBzaG1fcGVybTsgIC8qIG9wZXJhdGlvbiBwZXJtcyAq
Lw0KICBpbnQgIHNobV9zZWdzejsgICAgICAgICAgICAgICAvKiBzaXplIG9m
IHNlZ21lbnQgKGJ5dGVzKSAqLw0KICB0aW1lX3QgICAgc2htX2F0aW1lOyAg
ICAgICAgICAvKiBsYXN0IGF0dGFjaCB0aW1lICovDQogIHRpbWVfdCAg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HNvIHNwZWNpZmljIGNv
bW1hbmRzIGluIHNlbS5oLCBtc2cuaCBhbmQgc2htLmgNCiAqLw0KI2RlZmlu
ZSBJUENfUk1JRCAwICAgICAvKiByZW1vdmUgcmVzb3VyY2UgKi8NCiNkZWZp
bmUgSVBDX1NFVCAgMSAgICAgLyogc2V0IGlwY19wZXJtIG9wdGlvbnMgKi8N
CiNkZWZpbmUgSVBDX1NUQVQgMiAgICAgLyogZ2V0IGlwY19wZXJtIG9wdGlv
bnMgKi8NCiNkZWZpbmUgSVBDX0lORk8gMyAgICAgLyogc2VlIGlwY3MgKi8N
Cg0KDQojZWxzZQ0KI2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KI2luY2x1ZGUg
PHN5cy9pcGMuaD4NCiNpbmNsdWRlIDxzeXMvc2htLmg+DQojZW5kaWYNCg0K
DQoNCmludCBTSE1HRVQoaW50IGtleSwgaW50IHNpemUsIGludCBzaG1mbGcp
Ow0KY2hhciAqIFNITUFUKGludCBoYW5kbGUsIGNoYXIgKiBzaG1hZGRyLCBp
bnQgc2htZmxnKTsNCmludCBTSE1DVEwoaW50IGhhbmRsZSwgaW50IGFjdGlv
biwgc3RydWN0IHNobWlkX2RzICogYnVmKTsNCmludCBzaG1kdChjaGFyICog
c2htYWRkcik7DQoNCg0KDQojZW5kaWYNCg==
--1791478163-988259526-887902629=:13851--
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019