dll 호출
                                            
 4625 단어  dll
                    
Procedure aaaaaaa(CorpName: PChar; CorpAccount,
 ActualCorpName: PChar; var Amount: Double; FiscalComments: PChar;
 ErrorCode,ErrorMessage: PChar);
 stdcall; external 'ccc.dll';
 TCorpRecord = record
 CorpAccount,
 ActualCorpName,
 FiscalComments,
 ErrorCode,
 ErrorMessage: PChar;
 Amount: Double;
 end;
procedure TFrom1.CropQuery;
var
  CorpRecord: TCorpRecord;
  CorpName: string;
begin
  CorpName:='233';
  With CorpRecord do
  begin
    GetMem(CorpAccount,11);
    GetMem(ActualCorpName,256);
    GetMem(Fiscalcomments,256);
    GetMem(ErrorCode,3);
    GetMem(ErrorMessage,256);
    try
      aaaaaaa(pchar(CorpName),CorpAccount,ActualCorpName, Amount, Fiscalcomments,
                        ErrorCode, ErrorMessage);
      if (ErrorCode='00')or(ErrorCode='02')or(ErrorCode='03')then
         showmessage('success!');    
    finally
      FreeMem(CorpAccount);
      FreeMem(ActualCorpName);
      FreeMem(Fiscalcomments);
      FreeMem(ErrorCode);
      FreeMem(ErrorMessage);
    end;
  end;
end;  var
    LibHandle:THandle;
implementation
function LoadLib_Talent: HMODULE;
begin
   Result := LibHandle;
   if LibHandle=0 then
      if not FileExists('ccc.dll') then
         showmessage('          ccc.dll')
      else
         Result := LoadLibrary('ccc.dll');
end;
function FreeLib_Talent: BOOL;
begin
   Result := false;
   if LibHandle <> 0 then
   begin
      Result := FreeLibrary(LibHandle);
      LibHandle := 0;
   end;
end;     
      이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
LoadLibrary에서 126 오류가 발생하면 원인이되는 파일 이름을 찾는 방법Loadlibrary에서 DLL을 동적으로 로드할 때 로드 실패입니다. 실패한 파일 이름은 알려주지 않습니다. 로드하고자 하는 DLL 자체를 로드할 수 없다면 이야기는 간단하지만, 대상 DLL이 다른 DLL을 로드하...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.