要注册COM服务器,我们运行类似于提升模式的东西:
regsvr32.exe com.dll
Run Code Online (Sandbox Code Playgroud)
要执行每用户注册,请在用户帐户中执行:
regsvr32.exe /n /i:user com.dll
Run Code Online (Sandbox Code Playgroud)
regsvr32.exe支持以下参数:
/u - Unregister server
/i - Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n - do not call DllRegisterServer; this option must be used with /i
/s – Silent; display no message boxes (added with Windows XP and Windows Vista)
Run Code Online (Sandbox Code Playgroud)
在Delphi中创建COM服务器时,导出了以下方法:
exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer,
DllInstall;
Run Code Online (Sandbox Code Playgroud)
我注意到这些会发生:
我对参数/ n和/ i以及DllUnregisterServer和DllInstall感到困惑.有什么不同吗?
另外,为什么"/ u/n/i:user"调用Dllinstall?我注意到"HKEY_CURRENT_USER\Software\Classes"中相应的注册表项已被删除.
每个Delphi的VCL源文件都有这样的标题:
{*******************************************************}
{ }
{ CodeGear Delphi Runtime Library }
{ }
{ Copyright(c) 1995-2010 Embarcadero Technologies, Inc. }
{ }
{ Copyright and license exceptions noted in source }
{ }
{*******************************************************}
Run Code Online (Sandbox Code Playgroud)
Delphi IDE或ModelMaker Code Explorer中是否有可用的工具/方法可以让我们更快地构建这个头图形?
使用AQTime等工具来分析应用程序时,调试信息非常有用.
从Delphi XE开始,有一个新的链接选项:"指定调试信息文件的路径",它将生成一个单独的.TDS文件.
使用单独的调试信息文件有什么好处?
我尝试将包含200个项目的项目组从Delphi XE升级到Delphi XE2.某些IDE设计组件尚未安装在Delphi XE2 IDE上.
在Delphi XE2 IDE中打开一些项目时遇到错误:
"Error Reading Form: Class TSynEdit not found. Ignore the error and continue?
Note: Ignoring the error may cause components to be deleted or property values
to be lost".
Run Code Online (Sandbox Code Playgroud)
这是由于TSynEdit组件未安装在Delphi XE2 IDE中.
我正处于升级阶段,估计我需要做多少工作.由于我没有打开包含缺少组件的表单,因此每当我打开项目时这些消息都会立即显示.这很刺激.
在Delphi XE2的IDE之前,只有在IDE中打开表单时,这些消息才会显示出来.在IDE中打开项目文件时不会发生这种情况.但是,在Delphi XE2中,当我打开项目文件IDE时,这些消息会提示输出.
我试图在Win64平台中跟踪汇编代码:
当指令执行到:
0000000000402590 FF25525E0000 jmp dword ptr [rel $00005e52]
Run Code Online (Sandbox Code Playgroud)
跳转后,它会去地址:
00000000006B3F90 56 push rsi
Run Code Online (Sandbox Code Playgroud)
jmp指令如何检索跳转到的地址?[rel $ 00005e52]是什么意思?
我有一个使用Delphi XE2 IDE构建的项目.
我尝试在命令行控制台中使用msbuild构建项目:
SET BDS=C:\Program Files (x86)\Embarcadero\RAD Studio\9.0
c:\Windows\Microsoft.NET\Framework\v2.0.50727\MSBuild /p:config=Debug /target:Build /verbosity:diag myproj.dproj
Run Code Online (Sandbox Code Playgroud)
MSBuild提示以下错误:
C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\bin\CodeGear.Common.Targets(674,9): error MSB4067: The element <__ShouldBuildVersion> beneath element <PropertyGroup> is unrecognized.
Run Code Online (Sandbox Code Playgroud)
我比较了IDE和命令行的msbuild输出,发现IDE msbuild输出有额外的输出行:使用工具版本"2.0"构建.
也许在命令行使用中我没有正确设置一些参数.
在Delphi XE及更低版本之前,DLL应用程序的项目选项具有以下设置:
但是,Delphi XE2中缺少这些设置.这是Delphi XE2 IDE中的错误吗?或者在Delphi IDE的未来版本中将不再支持它?
有没有办法在具有一些控件的表单上绘制透明文本?如果我使用TLabel控件,它将始终显示在窗体上的控件后面.
微软宣布基于铬引擎的新浏览器Edge浏览器。只是想知道是否有可能将TWebBrowser之类的浏览器嵌入到VCL应用程序中?
当我尝试为Win64平台编译pascal单元时,遇到错误.这些方法包含ASM块.我不知道如何让它适用于Win64平台:
方法1:
Function TSparseList.ForAll( ApplyFunction: Pointer {TSPAApply} ): Integer; Assembler;
Asm
MOV EAX,[EAX].TSparseList.FList
JMP TSparsePointerArray.ForAll
End;
Run Code Online (Sandbox Code Playgroud)
方法2:
Function TSparsePointerArray.ForAll( ApplyFunction: Pointer {TSPAApply} ):
Integer;
Var
itemP: PAnsiChar; { Pointer to item in section } { patched by ccy }
item: Pointer;
i, callerBP: Cardinal;
j, index: Integer;
Begin
{ Scan section directory and scan each section that exists,
calling the apply function for each non-nil item.
The apply function must be a far local function in the scope of
the …Run Code Online (Sandbox Code Playgroud)