저는 C로 작성하는 것에 완전히 익숙합니다. 저는 바이너리 조작을 수행하는 도우미 DLL (C#에서 호출)을 작성하고 있습니다. BitScanForward64 "undefined"오류가 발생합니다. 32 비트 버전을 사용할 수 있습니다. 나는 이것이 Win32 DLL을 생성했기 때문이라고 생각합니다.Visual Studio 11 Developer Preview에서 BitScanForward64 문제가 발생했습니다.
그런 다음 64 비트 버전은 특정 64 비트 DLL에서만 사용할 수 있으며 (새 프로젝트 마법사에서 "일반"이라고 가정 함) 별도의 32 비트 및 64 비트 DLL이 필요할 수 있음을 알았습니다 . 이 경우, 아니면 BitScanForward 및 BitScanForward64 내장 함수를 모두 실행하는 단일 DLL을 사용할 수 있습니까? 그렇다면 어떻게 만드나요? 여기
내 현재 코드입니다 :// C Functions.cpp : Defines the exported functions for the DLL application.
#include "stdafx.h"
//#include <intrin.h>
//#include <winnt.h>
int _stdcall LSB_i32(unsigned __int32 x)
{
DWORD result;
BitScanForward(&result, x);
return (int)result;
}
int _stdcall MSB_i32(unsigned __int32 x)
{
DWORD result;
BitScanReverse(&result, x);
return (int)result;
}
int _stdcall LSB_i64(unsigned __int64 x)
{
DWORD result;
BitScanForward64(&result, x);
return (int)result;
}
int _stdcall MSB_i64(unsigned __int64 x)
{
DWORD result;
BitScanReverse64(&result, x);
return (int)result;
}
예, x64 또는 Itanium은 MSDN 페이지에 설명 된대로 필요합니다. –
좋아, 그래서 두 개의 DLL이 필요합니다. 64 비트 DLL은 어떻게 만듭니 까? 옵션이 아닌 것 같습니다. – IamIC
@IanC : http://msdn.microsoft.com/en-us/library/9yb4317s(v=VS.100).aspx – Necrolis