Port Win app to Linux Questions: Memory management and OEM Char
- From: "vansky" <huangms_van@xxxxxxxxxxx>
- Date: 12 Jan 2006 18:15:34 -0800
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!
.
- Follow-Ups:
- Re: Port Win app to Linux Questions: Memory management and OEM Char
- From: Måns Rullgård
- Re: Port Win app to Linux Questions: Memory management and OEM Char
- Prev by Date: Re: HELP! Problem getting interposer/LD_PRELOAD working
- Next by Date: Re: Port Win app to Linux Questions: Memory management and OEM Char
- Previous by thread: library names and AC_CHECK_LIB
- Next by thread: Re: Port Win app to Linux Questions: Memory management and OEM Char
- Index(es):
Relevant Pages
|