Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 :)
Posted

1 solution

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.
 
Share this answer
 
Comments
mateusz.matyaszek 22-Aug-11 10:09am    
No the C++ code is 32 bit. Problem is that no matter what I set in c#, service won't run on 64 bit system (it only pretends to run).
cariolihome 22-Aug-11 19:08pm    
What messages was appeared in eventlog ?
What contains service registry key ?
mateusz.matyaszek 23-Aug-11 3:09am    
Its unimportant. There are no messages in eventlog not even custom ones that start of service should produce. No registry keys are used for this particular service.
cariolihome 23-Aug-11 7:48am    
Its important, because each service always has own reistry key in HKLM\System\CurrentControlSet\Services or its not service
mateusz.matyaszek 23-Aug-11 8:50am    
Ok you are right it does have entry in registry (as a service but underlying application doesn't). I said is unimportant cuz I don't understand how this affect diagnosing of my problem. Can you explain? I would say if registry entry for service would be missing it would die at start instead of pretending to be ok.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900