⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extfunc.pas

📁 一套非常发好的财务管理软件,想从事此方面开发的可以借签
💻 PAS
字号:
unit ExtFunc;

interface

uses
  SysUtils,DB,ADODB,ShlObj, ActiveX, ComObj;

var
  _Ver:integer;  

const
   //Frm_MsgBox BtnType 参数:
   MsgBox_YESNO        =1;
   MsgBox_OKCANCEL     =2;
   MsgBox_OK_INFO      =3;
   MsgBox_OK_ERROR     =4;

   //Fun_GetSpecialFolderDir  mFolder 参数:
   CSIDL_BITBUCKET                   =CSIDL_BITBUCKET;         //   回收站
   CSIDL_CONTROLS                    =CSIDL_CONTROLS;          //   控制面板
   CSIDL_DESKTOP                     =CSIDL_DESKTOP;           //   桌面
   CSIDL_DESKTOPDIRECTORY            =CSIDL_DESKTOPDIRECTORY;  //   桌面目录       //如C:\WINDOWS\Desktop
   CSIDL_DRIVES                      =CSIDL_DRIVES;            //   我的电脑
   CSIDL_FONTS                       =CSIDL_FONTS;             //   字体           //如C:\WINDOWS\FONTS
   CSIDL_NETHOOD                     =CSIDL_NETHOOD;           //   网上邻居目录   //如C:\WINDOWS\NetHood
   CSIDL_NETWORK                     =CSIDL_NETWORK;           //   网上邻居
   CSIDL_PERSONAL                    =CSIDL_PERSONAL;          //   我的文档       //如C:\My Documents
   CSIDL_PRINTERS                    =CSIDL_PRINTERS;          //   打印机
   CSIDL_PROGRAMS                    =CSIDL_PROGRAMS;          //   程序组         //如C:\WINDOWS\Start Menu\Programs
   CSIDL_RECENT                      =CSIDL_RECENT;            //   最近文档       //如C:\WINDOWS\Recent
   CSIDL_SENDTO                      =CSIDL_SENDTO;            //   发送到         //如C:\WINDOWS\SentTo
   CSIDL_STARTMENU                   =CSIDL_STARTMENU;         //   开始菜单       //如C:\WINDOWS\Start Menu
   CSIDL_STARTUP                     =CSIDL_STARTUP;           //   启动           //如C:\WINDOWS\启动
   CSIDL_TEMPLATES                   =CSIDL_TEMPLATES;

function Frm_EditOperator(adoc:TAdoConnection;UserTableName,UserNameKey,UserPasswordKey,UserUsedKey:string;PasswordEncryptCharType,PasswordEncryptLen:integer):integer;external 'ExtFunc.dll' name 'Frm_EditOperator'

function Frm_SetRights(adoc:TAdoConnection;UserTableName,RightsTableName,UserRightsTableName,UserTableKey,RightsTableKey,UserRightsUserKey,UserRightsRightsKey,UserUsedKey:string):integer; external 'ExtFunc.dll' name 'Frm_SetRights'

function Fun_GetRights(adoc:TAdoConnection;UserRightsTableName,UserRightsUserKey,UserRightsRightsKey:string;UserID,RightsID:integer):Boolean;export; external 'ExtFunc.dll' name 'Fun_GetRights'
function Fun_GetRightsArray(adoc:TAdoConnection;RightsTableName,UserRightsTableName,UserRightsUserKey,UserRightsRightsKey:string;UserID:integer;RightsAyyar:array of pBoolean):Boolean;export; external 'ExtFunc.dll' name 'Fun_GetRightsArray'
function Fun_GetRightsNum(adoc:TAdoConnection;RightsTableName:string):integer;export; external 'ExtFunc.dll' name 'Fun_GetRightsNum'
function Fun_GetUserNum(adoc:TAdoConnection;UserTableName:string):integer;export;external 'ExtFunc.dll' name 'Fun_GetUserNum'

function Fun_EncryptString(SourceStr:string):pString;export;external 'ExtFunc.dll' name 'Fun_EncryptString'
function Fun_UnEncryptString(SourceStr:string):pString;export;external 'ExtFunc.dll' name 'Fun_UnEncryptString'
function Fun_NoUnEncryptString(SourceStr,Marking_Str:string;Part_Num,Part_Len,Ch_Type:integer):pString;export;external 'ExtFunc.dll' name 'Fun_NoUnEncryptString'
function Fun_GetSupperPassword():pString;export;external 'ExtFunc.dll' name 'Fun_GetSupperPassword'

function Frm_Login(adoc:TAdoConnection;UserTableName,UserNameKey,UserPasswordKey,UserUsedKey,SupperPassword:string;PasswordEncryptCharType,PasswordEncryptLen:integer;pUserName,pUserPassword:pChar;pUserID:pInteger):integer;export;external 'ExtFunc.dll' name 'Frm_Login'
function Frm_ChangePassword(adoc:TAdoConnection;UserTableName,UserPasswordKey:string;PasswordEncryptCharType,PasswordEncryptLen:integer;UserName,UserPassword,SupperPassword:string;UserID:integer;pNewUserPassword:pChar):integer;export;external 'ExtFunc.dll' name 'Frm_ChangePassword'

function Frm_SoftReg(adoc:TAdoConnection;SystemTableName,SystemTableKey,SystemTableRowKey,SystemTableRowKeyValue,SN,RegSN,SupperPassword:string):integer;export;external 'ExtFunc.dll' name 'Frm_SoftReg'
procedure Frm_About(SoftName,SoftEngName,SoftUserName:string);export;external 'ExtFunc.dll' name 'Frm_About'

function Fun_GetQuWeiFromHZ(SourceHZStr:string):integer;export;external 'ExtFunc.dll' name 'Fun_GetQuWeiFromHZ'
function Fun_GetHZFromQuWei(SourceQuWeiInt:integer):pString;export;external 'ExtFunc.dll' name 'Fun_GetHZFromQuWei'
function Fun_GetCodeFromHZ(SourceStr,CodeType:string;Mode,Len:integer):pString;export;external 'ExtFunc.dll' name 'Fun_GetCodeFromHZ'

function Fun_ChnCurrency(CurMoney:currency):pString;export;external 'ExtFunc.dll' name 'Fun_ChnCurrency'
function Fun_FinanceCurrency(CurMoney:currency):pString;export;external 'ExtFunc.dll' name 'Fun_FinanceCurrency'

function Fun_ShiftKeyStatus:Boolean;export;external 'ExtFunc.dll' name 'Fun_ShiftKeyStatus'
function Fun_CtrlKeyStatus:Boolean;export;external 'ExtFunc.dll' name 'Fun_CtrlKeyStatus'
function Fun_MenuKeyStatus:Boolean;export;external 'ExtFunc.dll' name 'Fun_MenuKeyStatus'
function Fun_GetIdeDiskSerialNumber:pString;export;external 'ExtFunc.dll' name 'Fun_GetIdeDiskSerialNumber'
function Fun_GetNetAdapterMacAddress:pString;export;external 'ExtFunc.dll' name 'Fun_GetNetAdapterMacAddress'
function Fun_GetLocalIP:pString;export;external 'ExtFunc.dll' name 'Fun_GetLocalIP'
function Fun_GetMachineSerialNumber:pString;export;external 'ExtFunc.dll' name 'Fun_GetMachineSerialNumber'
function Fun_ShowTaskBar(bStatus:Boolean):Boolean;export;external 'ExtFunc.dll' name 'Fun_ShowTaskBar'
function Fun_IsInstallPrinter:Boolean;export;external 'ExtFunc.dll' name 'Fun_IsInstallPrinter'

function Fun_SetSystemDateTime(year,month,day,hour,minute,second:integer):Boolean;export;external 'ExtFunc.dll' name 'Fun_SetSystemDateTime'
function Fun_GetChineseDate(s_d:TDateTime):pString;export;external 'ExtFunc.dll' name 'Fun_GetChineseDate'

function Frm_CodeInput(adoc:TAdoConnection;DictTableName,F_id,F_PinYin,F_WuBi,F_Name,F_Used:string;d_id:pInteger;d_str:pChar):integer;export;external 'ExtFunc.dll' name 'Frm_CodeInput'

function Fun_GetBiosSerialNumber:pString;export;external 'ExtFunc.dll' name 'Fun_GetBiosSerialNumber'
function Fun_GetBiosDate:pString;export;external 'ExtFunc.dll' name 'Fun_GetBiosDate'
function Fun_GetBiosName:pString;export;external 'ExtFunc.dll' name 'Fun_GetBiosName'
function Fun_GetBiosVersion:pString;export;external 'ExtFunc.dll' name 'Fun_GetBiosVersion'
function Fun_GetBiosCopyringht:pString;export;external 'ExtFunc.dll' name 'Fun_GetBiosCopyringht'

function Fun_GetCpuSerialNumber:pString;export;external 'ExtFunc.dll' name 'Fun_GetCpuSerialNumber'

function Fun_GetSQLServer2000ConnectString(ServerName,DatabaseName,UserID,Password:string):pString;export;external 'ExtFunc.dll' name 'Fun_GetSQLServer2000ConnectString'
function Fun_GetAccessConnectString(DatabaseName,UserID,Password:string):pString;export;external 'ExtFunc.dll' name 'Fun_GetAccessConnectString'
function Fun_GetMaxID(adoc:TAdoConnection;TableName,F_ID:string):integer;export;external 'ExtFunc.dll' name 'Fun_GetMaxID'

function Fun_GetCurrentPath:pString;export;external 'ExtFunc.dll' name 'Fun_GetCurrentPath'
function Fun_DynamicResolution(X,Y:word):Boolean;export;external 'ExtFunc.dll' name 'Fun_DynamicResolution'
function Fun_GetSpecialFolderDir(mFolder:integer):pString;export;external 'ExtFunc.dll' name 'Fun_GetSpecialFolderDir'
function Fun_CreateShellLink(sourceFileName,WorkDir,LinkName,LinkPath:string):Boolean;export;external 'ExtFunc.dll' name 'Fun_CreateShellLink'
procedure Fun_CloseWindows;export;external 'ExtFunc.dll' name 'Fun_CloseWindows'

function Frm_MsgBox(CaptionStr,MsgStr:string;BtnType:integer):integer;export;external 'ExtFunc.dll' name 'Frm_MsgBox'

function Fun_IsDigit(ch: char): boolean;export;external 'ExtFunc.dll' name 'Fun_IsDigit'
function Fun_IsUpper(ch: char): boolean;export;external 'ExtFunc.dll' name 'Fun_IsUpper'
function Fun_IsLower(ch: char): boolean;export;external 'ExtFunc.dll' name 'Fun_IsLower'
function Fun_IsLetter(ch: char): boolean;export;external 'ExtFunc.dll' name 'Fun_IsLetter'
function Fun_LeftPad(s_str:string;Len:integer;FillChar:char):pString;export;external 'ExtFunc.dll' name 'Fun_LeftPad'
function Fun_RightPad(s_str:string;Len:integer;FillChar:char):pString;export;external 'ExtFunc.dll' name 'Fun_RightPad'
function Fun_ReverseStr(s_str:string):pString;export;external 'ExtFunc.dll' name 'Fun_ReverseStr'
function Fun_ChInStrNum(s_str:string;ch:char):integer;export;external 'ExtFunc.dll' name 'Fun_ChInStrNum'
function Fun_nPos(s_str:string;ch:char;n:integer):integer;export;export;external 'ExtFunc.dll' name 'Fun_nPos'

procedure Frm_FlashScr(FlashScrPicFileName:string);export;external 'ExtFunc.dll' name 'Frm_FlashScr'

procedure Frm_ViewLog(adoc:TAdoConnection;LogTableName,LogViewName:string;CanClear:Boolean);export;external 'ExtFunc.dll' name 'Frm_ViewLog'
procedure Fun_WriteLog(adoc:TAdoConnection;LogStoreProcName,LogMsg:string;UserID:integer);export;external 'ExtFunc.dll' name 'Fun_WriteLog'

function Frm_EditDictTable(adoc:TAdoConnection;DictTableName,NameKey,PinYinKey,WuBiKey,UsedKey:string):integer;export;external 'ExtFunc.dll' name 'Frm_EditDictTable'
function Frm_EditDictTableMany(adoc:TAdoConnection;DictTableNameStr,NameKey,PinYinKey,WuBiKey,UsedKey:string):integer;export;external 'ExtFunc.dll' name 'Frm_EditDictTableMany'

function Frm_DataBackup(adoc:TAdoConnection;DefaultDir:string):integer;export;external 'ExtFunc.dll' name 'Frm_DataBackup'
function Frm_DataRestore(adoc:TAdoConnection;DefaultDir:string):integer;export;external 'ExtFunc.dll' name 'Frm_DataRestore'
function Fun_BackupDataTableToXml(adoc:TAdoConnection;TableName,Sort,XMLFileName:string):integer;export;external 'ExtFunc.dll' name 'Fun_BackupDataTableToXml'
function Fun_RestoreXMLFileToDataTable(adoc:TAdoConnection;TableName,XMLFileName:string):integer;export;external 'ExtFunc.dll' name 'Fun_RestoreXMLFileToDataTable'

function Frm_Calc():double;export;external 'ExtFunc.dll' name 'Frm_Calc'

implementation

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -