64位Windows上的服务无法正常工作 [英] services on 64 bit windows not working

查看:81
本文介绍了64位Windows上的服务无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些用C ++ embarcadero builder 2010编写和编译的程序.
然后将其包装在Visual Studio(c#)服务设置中(或它的专有名称)
它可以在32位系统上正常工作,但是即使将TargetPlatform属性更改为x64,它也只能正常工作,但是并不能真正调用其中的代码(必须在蜂鸣声中添加代码,以确保我无法正确构建生成器附加到进程以进行调试)

有两个问题:为什么它不起作用,为什么我不能调试它?
我知道问题的第二部分与它的不正常工作密切相关:)

I have some program written and compiled in C++ embarcadero builder 2010.
It is then wrapped in visual studio (c#) service setup (or whatever is the proper name of it)
It works fine on 32 bit systems but even after changing TargetPlatform property to x64 it only looks like it works but it doesn''t really invoke code in it (had to put beep in code to make sure as I could not make builder to properly attach to process for debug)

So two questions: why it doesn''t work and why I can''t debug it?
I understand that second part of question is strongly related to it not working :)

推荐答案

您确定您的C ++代码是64位吗? embarcadero网站表示,他们的C ++编译器为32和64位系统生成32位可执行文件.

基本上,如果C#代码包装了C ++代码,则C#代码位"将定义图像.如果将C#属性设置为"Any Cpu"或"X64",则将获得64位可执行文件,这也将C ++代码也设置为64位.

尝试将属性设置为X32以强制图像的32位兼容模式.
Are you sure you''re C++ code is 64-bit? The embarcadero web site says their C++ compiler generates 32-bit executables for 32 and 64 bit systems.

Basically, if the C# code wraps the C++ code, then the C# code "bitness" will define what the image. If you have your C# properties set to "Any Cpu" or "X64", you will get a 64 bit executable which will require the C++ code to be 64 bit also.

Try setting the properties to X32 to force 32 bit compatibility mode for the image.


这篇关于64位Windows上的服务无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆