V
vansky
Dear all,
im porting a WIN APP to LINUX, and face some problems that r hard for
me to solve, could u dear guys give me some hands?
i'd like to reimplement the following funcs or replace them with other
ways , but i have no idea how to !!
1. HLOCAL LocalAlloc( UINT uFlags, SIZE_T uBytes)
MSDN: The LocalAlloc function allocates the specified number of bytes
from the heap. Windows memory management does not provide a separate
local heap and global heap.
Also: LocalFree
2. HGLOBAL GlobalAlloc( UINT uFlags, SIZE_T dwBytes)
MSDN: The GlobalAlloc function allocates the specified number of bytes
from the heap. Windows memory management does not provide a separate
local heap and global heap.
Also: GlobalFree, GlobalLock, GlobalUnlock
3. LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize,DWORD
flAllocationType, DWORD flProtect )
MSDN: The VirtualAlloc function reserves or commits a region of pages
in the virtual address space of the calling process. Memory allocated
by this function is automatically initialized to zero, unless MEM_RESET
is specified.
Also: VirtualFree, VirtualLock, VirtualUnlock
4. BOOL AnsiToOem( LPCSTR lpszSrc,LPSTR lpszDst)
MSDN: Converts all the characters in this CStringT object from the ANSI
character set to the OEM character set.
Also: OemToAnsi, AnsiToOemBuff
thx!
im porting a WIN APP to LINUX, and face some problems that r hard for
me to solve, could u dear guys give me some hands?
i'd like to reimplement the following funcs or replace them with other
ways , but i have no idea how to !!
1. HLOCAL LocalAlloc( UINT uFlags, SIZE_T uBytes)
MSDN: The LocalAlloc function allocates the specified number of bytes
from the heap. Windows memory management does not provide a separate
local heap and global heap.
Also: LocalFree
2. HGLOBAL GlobalAlloc( UINT uFlags, SIZE_T dwBytes)
MSDN: The GlobalAlloc function allocates the specified number of bytes
from the heap. Windows memory management does not provide a separate
local heap and global heap.
Also: GlobalFree, GlobalLock, GlobalUnlock
3. LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize,DWORD
flAllocationType, DWORD flProtect )
MSDN: The VirtualAlloc function reserves or commits a region of pages
in the virtual address space of the calling process. Memory allocated
by this function is automatically initialized to zero, unless MEM_RESET
is specified.
Also: VirtualFree, VirtualLock, VirtualUnlock
4. BOOL AnsiToOem( LPCSTR lpszSrc,LPSTR lpszDst)
MSDN: Converts all the characters in this CStringT object from the ANSI
character set to the OEM character set.
Also: OemToAnsi, AnsiToOemBuff
thx!