📄 memory.htm
字号:
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=GB2312">
<title>内存相关操作</title>
</head>
<body bgcolor="#ffffe7" lang=ZH-CN style='tab-interval:21.0pt'>
<h2 align="center"><b><font color="#FF0000">内存相关操作</font></b></h2>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="50%">
<div align="center"><font color="#FF6600"><b>类(Classes)</b></font><font color="#FF0000"><b></b></font></div>
</td>
<td width="50%">
<div align="center"><font color="#FF0000"><b><font color="#FF6600">函数(Functions)</font></b></font><font color="#FF6600"></font></div>
</td>
</tr>
</table>
<h2><font color="#FF0000"><b>类(Classes):</b></font></h2>
<h2><font color="#FF0000"><b>函数(Functions):</b></font></h2>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#D0FFE0">
<tr>
<td rowspan="2">文件位置:</td>
<td width="85%"><font color="#FF0000">\FLib\Include\C_Memory.h</font></td>
</tr>
<tr>
<td width="85%" height="19"><font color="#FF0000">\FLib\Source\Memory.cpp</font></td>
</tr>
<tr>
<td>使用方法:</td>
<td width="85%" height="19"><font color="#FF0000">#include "fool.h"</font></td>
</tr>
</table>
<br>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="15%">函数原型:</td>
<td width="85%"><font color="#FF0000"> void * fooMallocSharedMemory (PCTSTR pMemName,<br>
int iBlockSize,<br>
HANDLE * hMapping)</font></td>
</tr>
<tr>
<td width="15%">参数:</td>
<td width="85%">pMemName :共享内存块名 (不能为NULL)。<br>
<br>
iBlockSize :共享内存块字节数。<br>
<br>
hMapping :共享内存块句柄 (不能为NULL, 释放内存时使用)。</td>
</tr>
<tr>
<td width="15%">返回值:</td>
<td width="85%">共享内存首地址。</td>
</tr>
<tr>
<td width="15%">说明:</td>
<td width="85%"> 本函数创建一块名为pMemName的共享内存<font color="#000000">。</font></td>
</tr>
</table>
<br>
<br>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="15%" rowspan="2">函数原型:</td>
<td width="85%" height="50%">
<p><font color="#FF0000"> BOOL fooReadSharedMemory (PCTSTR pMemName,<br>
BYTE * pReceive,<br>
int iExpectBytes)</font></p>
</td>
</tr>
<tr>
<td width="85%" height="50%"><font color="#FF0000">BOOL fooWriteSharedMemory (PCTSTR pMemName,<br>
BYTE * pWrite,<br>
int iWriteBytes)</font></td>
</tr>
<tr>
<td width="15%">参数:</td>
<td width="85%"><font color="#000000">pMemName :共享内存块名 (不能为NULL)。<br>
<br>
pReceive, </font>pWrite<font color="#000000"> :读/写Buffer。<br>
<br>
iExpectBytes :Buffer字节数。</font></td>
</tr>
<tr>
<td width="15%">返回值:</td>
<td width="85%"> </td>
</tr>
<tr>
<td width="15%">说明:</td>
<td width="85%">读写名为pMemName的内存块。</td>
</tr>
</table>
<br>
<br>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="15%">函数原型:</td>
<td width="85%"><font color="#FF0000"> void fooFreeSharedMemory (void *
pBaseAddr,<br>
HANDLE hMapping)</font></td>
</tr>
<tr>
<td width="15%">参数:</td>
<td width="85%">hMapping :由<font color="#FF0000">fooMallocSharedMemory</font>返回的内存块句柄。</td>
</tr>
<tr>
<td width="15%">返回值:</td>
<td width="85%"> </td>
</tr>
<tr>
<td width="15%">说明:</td>
<td width="85%"> 释放一块共享内存<font color="#000000">。</font></td>
</tr>
</table>
<br>
<br>
<table width="85%" border="1" bordercolor="#3399FF" align="center" cellpadding="0" bgcolor="#CCFFFF">
<tr>
<td width="15%">函数原型:</td>
<td width="85%"><font color="#FF0000"> bool fooIsExistSharedMemory (PCTSTR pMemName)</font></td>
</tr>
<tr>
<td width="15%">参数:</td>
<td width="85%"> </td>
</tr>
<tr>
<td width="15%">返回值:</td>
<td width="85%"> </td>
</tr>
<tr>
<td width="15%">说明:</td>
<td width="85%"> 判断是否存在名为pMemName的共享内存<font color="#000000">。</font></td>
</tr>
</table>
<br>
<br>
<h2 align="center"><img src="stripe.gif" width="94%" height="2"><br>
</h2>
<table align=center bgcolor=ghostwhite border=0 cellpadding=0 cellspacing=0
width=650>
<tbody>
<tr>
<td width="85%">
<p align=center>版权所有 <br>
(C)1999 - 2002 付黎<br>
<a href="mailto:crazybit@263.net">给我发信</a> <a
href="javascript:window.close()">关闭窗口</a> </p>
</td>
</tr>
</tbody>
</table>
<h2> </h2>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -