This function I am mainly used to copy the binding of memory addresses and string variables. Do a memory file mapping, and then different processes can directly access memory by using string name variables. Here, the safe array and pointer methods are used.
chinese:这个功能我现在主要用于拷贝内存地址和字符串变量的绑定。搞一个内存文件映射,然后不同的进程可以直接用字符串名变量的方式直接访问内存,这里使用了安全数组和指针的方法。
how to read string from memory by pointer for CreateFileMapping?
http://www.vbforums.com/showthread.p...ateFileMapping
dim ptrstr1 as string '* ptr
dim lenarr() as long '* ptr
dim strarr() as long *100 '* ptr +4
so I can use:
write string:
lenarr(0)=lenb(s)
strrarr(0)=s

readstring from filemapping(memory):
msgbox ptrstr1

it's a way to read/write memory without api calling for run quickly。
it's used for share variable to more process.
write abc.exe "dim ptrstr1 as string",read from abc2.exe by ptrstr1。
Just as multiple threads can access global variables in a process, we now implement global variables for multiple processes. .