Arsip: translate MoveMemory 'kernel32' VB ke Delphi

 
user image
more 15 years ago

herux

Penempatan type kebalik. yg ini taruh di paling bawah. [code:1:0175942172] type RSI_USER_RECORD = record ID: RSI_ID; authorityLevel: RSI_AUTHORITY_LEVEL; end; [/code:1:0175942172]
user image
more 15 years ago

esafm

[quote:6a50aa4c3e="herux"]Penempatan type kebalik. yg ini taruh di paling bawah. [code:1:6a50aa4c3e] type RSI_USER_RECORD = record ID: RSI_ID; authorityLevel: RSI_AUTHORITY_LEVEL; end; [/code:1:6a50aa4c3e][/quote:6a50aa4c3e] maaf tadi copy paste, jadi solusi nya gimana pa'?

procedure DisplayLastUserRecord(UserRec: RSI_USER_RECORD; Result: Longint);
var
  teks: string[10];
begin
  if (RSI_Result(Result) = RSI_SUCCESS) Then
  begin
    Result:=rsiIDToText(UserRec.ID, teks); // error UserRec.ID harus nya lebih detail, klo di VB langsung az
    txtAuth.text:=IntToStr(UserRec.authorityLevel); // ini juga error
  end;
end;
user image
more 15 years ago

herux

Error gmn sih ?
user image
more 15 years ago

haidarfaz

UserRec.authorityLevel ==> bukan integer lihat http://www.delphibasics.co.uk/Article.asp?Name=Sets
user image
more 15 years ago

DelphiExpert

coba tulis deklarasi RSI_ID versi VB-nya

txtAuth.text:=IntToStr(ORD(UserRec.authorityLevel)); // <-- kesalahan yg sama = capeee deee
user image
more 15 years ago

esafm

@DelphiExpert: coba tulis deklarasi RSI_ID versi VB-nya

Type RSI_ID
    b0 As Byte
    b1 As Byte
    b2 As Byte
    b3 As Byte
    b4 As Byte
End Type
user image
more 15 years ago

herux


Function rsiIDToText(var ID: RSI_ID; text: String): longint; external 'rsidll32.DLL';
more ...
  • Pages:
  • 1
  • 2
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com