Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[13925] 델파이로 물리적인 마크주소 얻는 방법좀 갈켜주세요.ㅠㅠ
초보자 [yoyo] 1826 읽음    2011-11-19 12:18
현재 델파이로 마크주소 얻는 프로그램을 짯는데요.ㅠㅠ

그런데 마크주소가 실지 물리적인 마크주소가 아니고 다른값이 나오네요.

실지적인 마크주소를 얻는 방법좀 가르켜 주세요. ㅠㅠ

소스는 다음과 같습니다. 고수님들 좀 도와주세요.

-------------------------------------------
function GetMACAdress: string;
var
  hDll : THandle;
  FPointer : TFarProc;
  MyFunc : TIntFunction;
  var_uu : TGUID;
  szMacAddr : String;
  i : Integer;
begin
 
  Result :='';
  szMacAddr := '';

  hDll := SafeLoadLibrary ('RPCRT4.DLL');
  if hDll <> 0 then
    FPointer := GetProcAddress(hDll,'UuidCreateSequential')
  else
  begin
    ShowMessage('DLL not found');
    exit;
  end;

  if FPointer = nil then
  begin
    FreeLibrary (hDll);
    ShowMessage ('DLL function not found');
    exit;
  end;

  MyFunc := TIntFunction (FPointer);
  MyFunc(@var_uu);
  FreeLibrary (hDll);

  for i := 2 to 7 do
    szMacAddr := szMacAddr + IntToHex(var_uu.D4[i], 2);

  Result := szMacAddr;
// OutDebugString(Result);

end;

+ -

관련 글 리스트
13925 델파이로 물리적인 마크주소 얻는 방법좀 갈켜주세요.ㅠㅠ 초보자 1826 2011/11/19
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.