Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #14743 > unrolled thread
| Started by | Amine Moulay Ramdane <aminer68@gmail.com> |
|---|---|
| First post | 2022-03-26 02:56 +0000 |
| Last post | 2022-03-26 02:58 +0000 |
| Articles | 2 — 1 participant |
Back to article view | Back to comp.programming
Perl Win32 MemMap Amine Moulay Ramdane Amine Moulay Ramdane <aminer68@gmail.com> - 2022-03-26 02:56 +0000
Perl Win32 MemMap Amine Moulay Ramdane <aminer68@gmail.com> - 2022-03-26 02:58 +0000
| From | Amine Moulay Ramdane <aminer68@gmail.com> |
|---|---|
| Date | 2022-03-26 02:56 +0000 |
| Subject | Perl Win32 MemMap Amine Moulay Ramdane |
| Message-ID | <t1lvc9$1fov$1@gioia.aioe.org> |
######################################################### # # Win32::MemMap - Perl Win32 MemMap module - version 2.03 # # # Author : Amine Moulay Ramdane <aminer@generation.net> # Company: Cyber-NT Communications # Phone: (514)485-6659 # Email: aminer@generation.net # Date: February 7,1999 # # Copyright o?= 1998 Amine Moulay Ramdane.All rights reserved # ######################################################### This module can be used with: The Perl for Win32 port by ActiveState: Build 300,5.00502 or higher The core Perl 5.004 and 5.005 or higher (built on the Win32 platform, of course) How to install MemMap? For Perl AS 5.0050x and GS 5.0050x: If your Perl is installed under C:\Perl copy the MemMap.pm file to C:\Perl\site\lib\Win32 and copy memmap.dll to \winnt\system32 (for Winnt) or \windows\system (for Win95) For Perl AS 5.003_0x: Copy the MemMap.pm file to C:\Perl\lib\Win32 and copy my memmap.dll to \winnt\system32 (for Winnt) or \windows\system (for Win95) Have fun! Disclaimer ---------- WARNING! ALTHOUGH I HAVE BEEN USING THIS MODULE FOR A LONG TIME WITHOUT ANY KNOWN PROBLEM,THIS MODULE IS PROVIDED AS IS WITH NO GUARANTEES OF ANY KIND! - YOU ARE THE ONLY PERSON RESPONSIBLE FOR ANY DAMAGE THIS CODE MAY CAUSE . Enjoy! Sincerely, Amine Moulay Ramdane aminer@generation.net
[toc] | [next] | [standalone]
| From | Amine Moulay Ramdane <aminer68@gmail.com> |
|---|---|
| Date | 2022-03-26 02:58 +0000 |
| Subject | Perl Win32 MemMap |
| Message-ID | <t1lvg6$1fov$3@gioia.aioe.org> |
| In reply to | #14743 |
use Win32::MemMap qw(ENABLE_MAPPING DISABLE_MAPPING);
print "\n Using Win32::MemMap version ", $Win32::MemMap::VERSION, "\n";
print " By Amine Moulay Ramdane <aminer\@generation.net>\n";
print " Please hit any key to start the Demo...";
<STDIN>;
my $obj=new Win32::MemMap;
$FileMap=$obj->OpenFile("morocco.gif","//MemMap/test",ENABLE_MAPPING);
print "\n";
$obj->LastError;
$FileMap->Read(\$str,0,$FileMap->{Size});
my $mem=$obj->OpenMem("//MemMap/PerlWin32",$FileMap->{Size});
$mem->Write(\$str,0);
undef $str;
$mem->Read(\$str,0,$FileMap->{Size});
print "\nThis small script will map a file [morocco.gif] to a shared memory,\n";
print "a second process [prog2.pl] will get it directly from the sharedmem and\n";
print "copy the data to a new file named [new.gif], please run now the second script\n";
print "[prog2.pl], and when all is done hit enter to close the sharedmem: ";
<stdin>;
print "\nThe actual shared memory data size is: ".$mem->GetDataSize."\n";
print "The shared memory size is: ".$mem->GetSize."\n";
print "The shared memory name is: ".$mem->GetName."\n";
$obj->LastError;
$mem->Close;
$FileMap->Close;
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming
csiph-web