aime@netease.com
分不够可以加!
4 个解决方案
#1
还要不要,要的就回个话.
#2
注册方法:
VCXD6.dpr
=========================
library VCX;
uses
VCXUnit in 'VCXUnit.pas';
exports
Initialize name 'INITWIZARD0001';
begin
end.
VCXUnit.pas
======================================
unit VCXUnit;
interface
uses Windows, SysUtils, ToolsAPI, Registry;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean; stdcall;
implementation
var
hVCSLib: THandle;
fnWizardInit: TWizardInitProc;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean;
var
VCSLibName: String;
Reg: TRegistry;
begin
Result := False;
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CLASSES_ROOT;
if ( Reg.OpenKey('CLSID\{24FD5193-AB84-11D2-A0E7-00104B243179' +
IntToStr(GetCurrentProcessID) + '}', True) ) then
begin
Reg.WriteString('', 'Shell.Ext');
Reg.RootKey := HKEY_CURRENT_USER;
if ( Reg.OpenKey('Software\EPocalipse\VssConneXion\2.0\Delphi\6.0', False) ) then
begin
VCSLibName := Reg.ReadString('DllName');
hVCSLib := LoadLibrary(PChar(VCSLibName));
if ( hVCSLib <> 0 ) then
begin
fnWizardInit := GetProcAddress(hVCSLib, 'VCXENTRY');
if ( Assigned(fnWizardInit) ) then
Result := fnWizardInit(Services, RegisterProc, TerminateProc);
end
end;
end;
Reg.Free;
end;
end.
把这这些存为两个文件,并编译。然后复制到安装目录下,就成了已注册版了。
VCXD6.dpr
=========================
library VCX;
uses
VCXUnit in 'VCXUnit.pas';
exports
Initialize name 'INITWIZARD0001';
begin
end.
VCXUnit.pas
======================================
unit VCXUnit;
interface
uses Windows, SysUtils, ToolsAPI, Registry;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean; stdcall;
implementation
var
hVCSLib: THandle;
fnWizardInit: TWizardInitProc;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean;
var
VCSLibName: String;
Reg: TRegistry;
begin
Result := False;
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CLASSES_ROOT;
if ( Reg.OpenKey('CLSID\{24FD5193-AB84-11D2-A0E7-00104B243179' +
IntToStr(GetCurrentProcessID) + '}', True) ) then
begin
Reg.WriteString('', 'Shell.Ext');
Reg.RootKey := HKEY_CURRENT_USER;
if ( Reg.OpenKey('Software\EPocalipse\VssConneXion\2.0\Delphi\6.0', False) ) then
begin
VCSLibName := Reg.ReadString('DllName');
hVCSLib := LoadLibrary(PChar(VCSLibName));
if ( hVCSLib <> 0 ) then
begin
fnWizardInit := GetProcAddress(hVCSLib, 'VCXENTRY');
if ( Assigned(fnWizardInit) ) then
Result := fnWizardInit(Services, RegisterProc, TerminateProc);
end
end;
end;
Reg.Free;
end;
end.
把这这些存为两个文件,并编译。然后复制到安装目录下,就成了已注册版了。
#3
不敢贪功,东西是问另一位大侠得到的.挺好的,居然改一改,d5也能用.爽!!
#4
D7下怎么用????
#1
还要不要,要的就回个话.
#2
注册方法:
VCXD6.dpr
=========================
library VCX;
uses
VCXUnit in 'VCXUnit.pas';
exports
Initialize name 'INITWIZARD0001';
begin
end.
VCXUnit.pas
======================================
unit VCXUnit;
interface
uses Windows, SysUtils, ToolsAPI, Registry;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean; stdcall;
implementation
var
hVCSLib: THandle;
fnWizardInit: TWizardInitProc;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean;
var
VCSLibName: String;
Reg: TRegistry;
begin
Result := False;
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CLASSES_ROOT;
if ( Reg.OpenKey('CLSID\{24FD5193-AB84-11D2-A0E7-00104B243179' +
IntToStr(GetCurrentProcessID) + '}', True) ) then
begin
Reg.WriteString('', 'Shell.Ext');
Reg.RootKey := HKEY_CURRENT_USER;
if ( Reg.OpenKey('Software\EPocalipse\VssConneXion\2.0\Delphi\6.0', False) ) then
begin
VCSLibName := Reg.ReadString('DllName');
hVCSLib := LoadLibrary(PChar(VCSLibName));
if ( hVCSLib <> 0 ) then
begin
fnWizardInit := GetProcAddress(hVCSLib, 'VCXENTRY');
if ( Assigned(fnWizardInit) ) then
Result := fnWizardInit(Services, RegisterProc, TerminateProc);
end
end;
end;
Reg.Free;
end;
end.
把这这些存为两个文件,并编译。然后复制到安装目录下,就成了已注册版了。
VCXD6.dpr
=========================
library VCX;
uses
VCXUnit in 'VCXUnit.pas';
exports
Initialize name 'INITWIZARD0001';
begin
end.
VCXUnit.pas
======================================
unit VCXUnit;
interface
uses Windows, SysUtils, ToolsAPI, Registry;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean; stdcall;
implementation
var
hVCSLib: THandle;
fnWizardInit: TWizardInitProc;
function Initialize(const Services: IBorlandIDEServices;
RegisterProc: TWizardRegisterProc;
var TerminateProc: TWizardTerminateProc): Boolean;
var
VCSLibName: String;
Reg: TRegistry;
begin
Result := False;
Reg := TRegistry.Create;
Reg.RootKey := HKEY_CLASSES_ROOT;
if ( Reg.OpenKey('CLSID\{24FD5193-AB84-11D2-A0E7-00104B243179' +
IntToStr(GetCurrentProcessID) + '}', True) ) then
begin
Reg.WriteString('', 'Shell.Ext');
Reg.RootKey := HKEY_CURRENT_USER;
if ( Reg.OpenKey('Software\EPocalipse\VssConneXion\2.0\Delphi\6.0', False) ) then
begin
VCSLibName := Reg.ReadString('DllName');
hVCSLib := LoadLibrary(PChar(VCSLibName));
if ( hVCSLib <> 0 ) then
begin
fnWizardInit := GetProcAddress(hVCSLib, 'VCXENTRY');
if ( Assigned(fnWizardInit) ) then
Result := fnWizardInit(Services, RegisterProc, TerminateProc);
end
end;
end;
Reg.Free;
end;
end.
把这这些存为两个文件,并编译。然后复制到安装目录下,就成了已注册版了。
#3
不敢贪功,东西是问另一位大侠得到的.挺好的,居然改一改,d5也能用.爽!!
#4
D7下怎么用????