비주얼 C 에서 memcpy( (void *)dst, (const void *)src, lpBMFinger->bmWidthBytes );
부분을 델파이에서 어떻게 쓸수 있는지 부탁드립니다.
완전한 소스
void ObtainView( LPBYTE lpFrame )
{
int i;
char *src = (char *)lpFrame;
char *dst = (char *)lpBMFinger->bmBits;
// copying pixels into BITMAP
for( i = 0; i < lpBMFinger->bmHeight; i++ )
{
memcpy( (void *)dst, (const void *)src, lpBMFinger->bmWidthBytes );
src += lpBMFinger->bmWidthBytes;
dst += lpBMFinger->bmWidthBytes;
}
// creating HBITMAP object
if( hbmFinger != NULL )
DeleteObject( (HGDIOBJ)hbmFinger );
hbmFinger = CreateBitmapIndirect( lpBMFinger );
// force fingerprint display
if( hbmFinger != NULL )
{
InvalidateRect( hShowWnd, NULL, FALSE );
UpdateWindow( hShowWnd );
}
else
{
MessageBox( hMainWnd, "Can't create HBITMAP", "ObtainView Error",
MB_OK | MB_ICONSTOP );
}
}
원형은 아래와 같습니다.
VOID CopyMemory (
PVOID Destination, // address of copy destination
CONST VOID *Source, // address of block to copy
DWORD Length // size, in bytes, of block to copy
);