如何將C/C++程序轉譯成Delphi(十五)

8. The Jedi Common Support Unit

unit JediUtil;







{==========================================================}



{ Jedi Common Support Unit                                 }



{==========================================================}







interface







USES WinTypes,



     WinProcs;







{----------------------------------------------------------}



{ Function JediCheckInstanceHandle                         }



{                                                          }



{ Parameter:                                               }



{                                                          }



{   hInst: Instance Handle                                 }



{                                                          }



{ Returns-Value:                                           }



{   TRUE if the handle is valid, FALSE if not              }



{----------------------------------------------------------}







Function JediCheckInstanceHandle (hInst: THandle): Boolean;







implementation







Function JediCheckInstanceHandle (hInst: THandle): Boolean;



begin



  {$IFNDEF WIN32}



  Result := hInst > HINSTANCE_ERROR;



  {$ELSE}



  Result := hInst <> 0;



  {$ENDIF}



end;







end.



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章