我不确定我是否已经解释了这个我能做到的最好但是,我们在这里......
我在表单上有2个自定义组件,它们在设计时通过IDE链接在一起.每当我从组件上调用一个过程时,我都会获得访问冲突,
模块"Project2.exe"中地址0049A614的访问冲突.读取地址00000034.
这是我的代码的一小部分
TMyClient = class(TClientSocket)
{...}
end;
Run Code Online (Sandbox Code Playgroud)
和...
TPresence = class(TComponent)
private
ftheClient: TMyClient
public
procedure SetStatus(status: string);
published
property UserName : string read fUserName write fUserName;
property theClient: TMyClient read ftheClient write ftheClient;
end;
procedure TPresence.SetStatus(status: string);
begin
try
***** if theClient = nil then
Exception.Create('theClient is Nil');
except
on e:Exception do
MessageDlg(e.classname+', '+e.message, mtWarning, [mbOK], 0);
end;
{...}
end;
Run Code Online (Sandbox Code Playgroud)
0049A614在*****,IDE停在此处.
我也尝试过在运行时进行分配
Presence1.theClient := MyClient1;
Run Code Online (Sandbox Code Playgroud)
没有运气
使用Presence1或MyClient1中不依赖于彼此的程序可以正常工作.
德尔福7
跟进:从mghie的评论,我重新思考它.
我从表单中删除了TPresence组件(这导致了一些奇怪的IDE错误,可能与它有关)并创建了它的设计时间,分配了所需的一切.现在它可以正常工作,但是将TPresence组件重新放回到从上会带来错误.
谢谢你的帮助,我现在应该能够解决这个问题,如果我不能重新打开另一个问题:)
我想知道是否有人有类似的经历.我试图追查问题的根源,但我想出的是零.我在Delphi 5中有一个项目,它有Report Builder报告.我需要一个reportbuilder的升级版本,所以我尝试在Delphi 7中运行该项目.当我的项目运行时,我点击一个按钮来查看报告,它看起来很好.但是,如果我使用paramstr运行报告(showmainform设置为false)并显示报告过程运行,则会出现堆栈溢出错误.
原始代码是:
if lowercase(ParamStr(1)) = 'termsexceeded' then begin
reportsdata.termsexceeded.close;
reportsdata.termsexceeded.open;
reports.ppTermsExceeded.print;
reportsdata.termsexceeded.close;
application.terminate;
end;
Run Code Online (Sandbox Code Playgroud)
它给了我.print函数的堆栈溢出错误.
在Delphi 7中运行的代码是:
if lowercase(ParamStr(1)) = 'termsexceeded' then begin
reportsdata.termsexceeded.close;
reportsdata.termsexceeded.open;
reports.left := -10000;
reports.show;
reports.ppTermsExceeded.print;
reportsdata.termsexceeded.close;
application.terminate;
end;
Run Code Online (Sandbox Code Playgroud)
是否有人建议我如何调试这个以查看问题出在我的Delphi 7或Reportbuilder上?
报告表单的.show事件中没有事件.
任何有关如何深入了解这一点的建议都将受到赞赏.
问候
我试图修复用Delphi 7编写的旧程序的一部分.
目前,我有正确的查询(和正确的结果),但我无法弄清楚如何在kbmMemtable中显示结果(这是应用程序的其余部分使用)
有关文件的任何想法/建议/链接?
我使用Windows 64位与UAC,需要检查Windows系统文件夹中是否存在文件,而不提升权限.已经在过去6小时内搜索解决方案,但没有成功...... :(
根据这个问题,FileExists()返回false,即使文件存在,我也可以使用Wow64DisableWow64FsRedirection(),但我在许多其他地方看到它不推荐.
现在我正在尝试使用特殊的"Sysnative"别名,但是当使用FileExists功能时,它不起作用(例如:如果fileexists('C:\ Windows\Sysnative\dfrgui.exe')则...)
拜托,有人可以帮我吗?也许是汇编(Asm)解决方案?
谢谢!
问题摘要:我指向一个类实例的指针,但是,当我尝试取消引用此指针并访问实例的属性时,我得到一个EAccessViolation异常,因为它取消引用"Nil".
我在单位范围内声明了指针:
private
CurrentRXFrame: ^TSXcpFrame;
Run Code Online (Sandbox Code Playgroud)
每次我的程序收到一个帧时,指针都会更新为指向这个最新的帧:
procedure TfrmFoo.OnReceivingFrame(Sender: TObject);
var
SXcpFrame: TSXcpFrame;
begin
SXcpFrame := TSXcpFrame.Create();
CurrentRXFrame := @SXcpFrame;
Run Code Online (Sandbox Code Playgroud)
我尝试在同一单元中的其他一些例程中取消引用指针,但得到一个异常:
// `FrameBytes` is merely a dynamic array of type "Byte".
PrintMsg(IntToHex(CurrentRXFrame^.FrameBytes[0], 2));
Run Code Online (Sandbox Code Playgroud)
例外:
raise exception class EAccessViolation with message 'Access violation at address 004DD1FE [...] Read of address 00000010.
如果我在此行之前设置断点,则相关变量评估为:
CurrentRXFrame := $18FD10
CurrentRXFrame^ := nil
CurrentRXFrame^.FrameBytes := Inaccessible value
Run Code Online (Sandbox Code Playgroud)
问题:如何TSxcpFrame通过指针访问类实例的属性?
在我的Galileo板上安装了Windows,工作正常.我开发了一个小型应用程序i Delphi7(32位exe),我已将其部署到Galileo并将其配置为在autorun.cmd文件中通过配置启动.
启动C:\ applications\GalileoApp1.exe
该应用程序是无形的,包含一个回显传入数据的TCP服务器.
在我的电脑上的Windows 7下正常工作.
不能在我的Galileo上自动或手动启动.
有没有人尝试类似的东西并成功地在Galileo上执行应用程序?
可以在Galileo上执行哪些类型的32位exe是否有任何限制?
有一个我的vcl应用程序.在表单中,有一个StringGrid.我想设置列标题高度,但我不知道它是如何做的.所以问题是:如何设置StringGrid列标题自动行高,因为列行宽不确定
是否有Delphi 7的Application.DelayInitialize的替代品?我正在尝试创建一个托管COM服务器的Delphi 7服务,但它不起作用,我相信这是因为我没有使用Application.DelayInitialize.
procedure searchAndReceipt;
var
amt, counter, check: integer;
gtinStore, qtyStore: array of integer;
totalCost: real;
begin
check := 0;
totalCost := 0.0;
write('Enter how many products you are purchasing: ');
repeat
readln(amt);
if (amt > 11) and (amt <= 0) then
writeln ('Please re-enter how many products are you purchasing with a value between 1-10')
else
check:= 1;
until check = 1;
SetLength(gtinStore, amt);
SetLength(qtyStore, amt);
SetLength(receiptArray, amt);
for counter:=1 to amt do
begin
write('Enter a GTIN code: ');
repeat
readln(gtinStore[counter]); …Run Code Online (Sandbox Code Playgroud) 我支持一些传统的Delphi项目.该项目分为存储在DLL中的模块.我需要编译其中一个模块(最后编译于2007年).此模块使用模块DualListBox并具有TDualListBox类型的变量:
uses DualListBox ....;
...
lbMasterOrders: TDualListBox;
lbChildOrders: TDualListBox;
Run Code Online (Sandbox Code Playgroud)
问题是,我不知道在哪里可以找到模块DualListBox.我在我的机器上找不到它,我在互联网上找不到它.据我所知,TDualListBox组件必须类似ListBox,可以在运行时添加行.
起初,我认为DualListBox是RxLib的一部分,但RxLib的组件被称为DualListDialog,它完全不同.
所以也许这是prev developer的自编模块,它被删除了.
但不知何故,编译的DLL(在2007年被编译)工作得非常好.也许我可以通过反编译该DLL来调查在哪里找到该模块?如果是这样,我应该在哪里查看反编译的项目?我正在使用DeDe进行反编译.