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

📄 jwamsiquery.pas

📁 比较全面的win32api开发包
💻 PAS
📖 第 1 页 / 共 5 页
字号:
{$EXTERNALSYM MsiGetTargetPathA}
function MsiGetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  szPathBuf: LPWSTR; var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetTargetPathW}

{$IFDEF UNICODE}
function MsiGetTargetPath(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  szPathBuf: LPWSTR; var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetTargetPath}
{$ELSE}
function MsiGetTargetPath(hInstall: MSIHANDLE; szFolder: LPCSTR;
  szPathBuf: LPSTR; var pcchPathBuf: DWORD): UINT; stdcall;
{$EXTERNALSYM MsiGetTargetPath}
{$ENDIF}

// Set the full target path for a folder in the Directory table
// Execution of this function sets the error record, accessible via MsiGetLastErrorRecord

function MsiSetTargetPathA(hInstall: MSIHANDLE; szFolder: LPCSTR;
  szFolderPath: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiSetTargetPathA}
function MsiSetTargetPathW(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  szFolderPath: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiSetTargetPathW}

{$IFDEF UNICODE}
function MsiSetTargetPath(hInstall: MSIHANDLE; szFolder: LPCWSTR;
  szFolderPath: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiSetTargetPath}
{$ELSE}
function MsiSetTargetPath(hInstall: MSIHANDLE; szFolder: LPCSTR;
  szFolderPath: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiSetTargetPath}
{$ENDIF}

// Check to see if sufficent disk space is present for the current installation
// Returns ERROR_SUCCESS, ERROR_DISK_FULL, ERROR_INVALID_HANDLE_STATE, or ERROR_INVALID_HANDLE

function MsiVerifyDiskSpace(hInstall: MSIHANDLE): UINT; stdcall;
{$EXTERNALSYM MsiVerifyDiskSpace}

// --------------------------------------------------------------------------
// Functions for rendering UI dialogs from the database representations.
// Purpose is for product development, not for use during installation.
// --------------------------------------------------------------------------

// Enable UI in preview mode to facilitate authoring of UI dialogs.
// The preview mode will end when the handle is closed.

function MsiEnableUIPreview(hDatabase: MSIHANDLE; var phPreview: MSIHANDLE): UINT; stdcall;
{$EXTERNALSYM MsiEnableUIPreview}

// Display any UI dialog as modeless and inactive.
// Supplying a null name will remove any current dialog.

function MsiPreviewDialogA(hPreview: MSIHANDLE; szDialogName: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewDialogA}
function MsiPreviewDialogW(hPreview: MSIHANDLE; szDialogName: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewDialogW}

{$IFDEF UNICODE}
function MsiPreviewDialog(hPreview: MSIHANDLE; szDialogName: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewDialog}
{$ELSE}
function MsiPreviewDialog(hPreview: MSIHANDLE; szDialogName: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewDialog}
{$ENDIF}

// Display a billboard within a host control in the displayed dialog.
// Supplying a null billboard name will remove any billboard displayed.

function MsiPreviewBillboardA(hPreview: MSIHANDLE; szControlName: LPCSTR;
  szBillboard: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewBillboardA}
function MsiPreviewBillboardW(hPreview: MSIHANDLE; szControlName: LPCWSTR;
  szBillboard: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewBillboardW}

{$IFDEF UNICODE}
function MsiPreviewBillboard(hPreview: MSIHANDLE; szControlName: LPCWSTR;
  szBillboard: LPCWSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewBillboard}
{$ELSE}
function MsiPreviewBillboard(hPreview: MSIHANDLE; szControlName: LPCSTR;
  szBillboard: LPCSTR): UINT; stdcall;
{$EXTERNALSYM MsiPreviewBillboard}
{$ENDIF}

// --------------------------------------------------------------------------
// Error handling not associated with any particular object
// --------------------------------------------------------------------------

// Return a record handle to the last function that generated an error record
// Only specified functions will set the error record, or clear it if success
// Field 1 of the record will contain the internal MSI error code
// Other fields will contain data specific to the particular error
// The error record is released internally after this function is executed

function MsiGetLastErrorRecord: MSIHANDLE; stdcall;
{$EXTERNALSYM MsiGetLastErrorRecord}

implementation

const
  msilib = 'msi.dll';


{$IFDEF DYNAMIC_LINK}
var
  _MsiDatabaseOpenViewA: Pointer;

function MsiDatabaseOpenViewA;
begin
  GetProcedureAddress(_MsiDatabaseOpenViewA, msilib, 'MsiDatabaseOpenViewA');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiDatabaseOpenViewA]
  end;
end;
{$ELSE}
function MsiDatabaseOpenViewA; external msilib name 'MsiDatabaseOpenViewA';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _MsiDatabaseOpenViewW: Pointer;

function MsiDatabaseOpenViewW;
begin
  GetProcedureAddress(_MsiDatabaseOpenViewW, msilib, 'MsiDatabaseOpenViewW');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiDatabaseOpenViewW]
  end;
end;
{$ELSE}
function MsiDatabaseOpenViewW; external msilib name 'MsiDatabaseOpenViewW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}

{$IFDEF DYNAMIC_LINK}
var
  _MsiDatabaseOpenView: Pointer;

function MsiDatabaseOpenView;
begin
  GetProcedureAddress(_MsiDatabaseOpenView, msilib, 'MsiDatabaseOpenViewW');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiDatabaseOpenView]
  end;
end;
{$ELSE}
function MsiDatabaseOpenView; external msilib name 'MsiDatabaseOpenViewW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}

{$IFDEF DYNAMIC_LINK}
var
  _MsiDatabaseOpenView: Pointer;

function MsiDatabaseOpenView;
begin
  GetProcedureAddress(_MsiDatabaseOpenView, msilib, 'MsiDatabaseOpenViewA');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiDatabaseOpenView]
  end;
end;
{$ELSE}
function MsiDatabaseOpenView; external msilib name 'MsiDatabaseOpenViewA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewGetErrorA: Pointer;

function MsiViewGetErrorA;
begin
  GetProcedureAddress(_MsiViewGetErrorA, msilib, 'MsiViewGetErrorA');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewGetErrorA]
  end;
end;
{$ELSE}
function MsiViewGetErrorA; external msilib name 'MsiViewGetErrorA';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewGetErrorW: Pointer;

function MsiViewGetErrorW;
begin
  GetProcedureAddress(_MsiViewGetErrorW, msilib, 'MsiViewGetErrorW');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewGetErrorW]
  end;
end;
{$ELSE}
function MsiViewGetErrorW; external msilib name 'MsiViewGetErrorW';
{$ENDIF DYNAMIC_LINK}
{$IFDEF UNICODE}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewGetError: Pointer;

function MsiViewGetError;
begin
  GetProcedureAddress(_MsiViewGetError, msilib, 'MsiViewGetErrorW');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewGetError]
  end;
end;
{$ELSE}
function MsiViewGetError; external msilib name 'MsiViewGetErrorW';
{$ENDIF DYNAMIC_LINK}
{$ELSE}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewGetError: Pointer;

function MsiViewGetError;
begin
  GetProcedureAddress(_MsiViewGetError, msilib, 'MsiViewGetErrorA');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewGetError]
  end;
end;
{$ELSE}
function MsiViewGetError; external msilib name 'MsiViewGetErrorA';
{$ENDIF DYNAMIC_LINK}
{$ENDIF}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewExecute: Pointer;

function MsiViewExecute;
begin
  GetProcedureAddress(_MsiViewExecute, msilib, 'MsiViewExecute');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewExecute]
  end;
end;
{$ELSE}
function MsiViewExecute; external msilib name 'MsiViewExecute';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewFetch: Pointer;

function MsiViewFetch;
begin
  GetProcedureAddress(_MsiViewFetch, msilib, 'MsiViewFetch');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewFetch]
  end;
end;
{$ELSE}
function MsiViewFetch; external msilib name 'MsiViewFetch';
{$ENDIF DYNAMIC_LINK}

{$IFDEF DYNAMIC_LINK}
var
  _MsiViewModify: Pointer;

function MsiViewModify;
begin
  GetProcedureAddress(_MsiViewModify, msilib, 'MsiViewModify');
  asm
    mov esp, ebp
    pop ebp
    jmp [_MsiViewModify]
  end;
end;
{$ELSE}
function MsiViewModify; external msilib name 'MsiViewModify';
{$ENDIF DYNAMIC_LINK}

⌨️ 快捷键说明

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