I am wondering whether there is a function named Class Helper even for C++ Builder.
My Environment:
RadStudio XE4 Update 1.
I found explanation for Delphi in RadStudio XE4 here
I searched similar page for C++ Builder here, but do not find information for Class Helper for C++.
How can I find whether or not there is the Class Helper for C++ Builder on the help page? Are there any page showing the lists of functions for C++ Builder/Delphi?
Class and Record Helpers are Delphi features, there are no equivalents in C++.
Related
I'm trying to load a program (.exe) written in Delphi 2010, so I can perform reflection in it. I've got the code to perform the reflection in Delphi, however, I can't seem to find examples or documentation on how to load a compiled binary, so I can do the reflection. All the examples and documentation show reflection being done to classes in the same project.
I know in C#, I'd just use
Assembly assembly = Assembly.LoadFile('path')
and then reflect on the assembly. Does Delphi have an equivalent Assembly class?
UPDATE:
I ended up not going the reflection or manifest route, I wrote a Delphi dll that gets all the data I need and DllImported the necessary functions. It's far less painful and my go-to method when UI Automation or Win32 can't detect or correctly detect certain UI components.
I was wanting to learn OpenGL using Delphi But never added an library to Delphi or even sure if this is what you need to do? Anyone give some steps on how i would add openGL to delphi so i could call it in the uses section?
You need a wrapper for the OpenGL dlls that declare the types and functions needed, and then you call those functions from your Delphi code. The VCL includes a somewhat limited (and generic) wrapper in OpenGL.pas, but there are better ones available.
One of the popular wrappers for Delphi is the Open Source GLScene, which includes demos and wrapper units. It also includes visual components that you drop on your form just like any other Delphi components. The link above is for the SourceForge project; the GLScene web site has more information, including documentation and FAQs.
I need to work with a COM component. Unfortunately its producer explicitly doesn't support Delphi and delivers only C# and VB.NET examples. There is no type library available for that component.
OTOH it's quite straightforward in VS2010 because the respective COM library (WinSig.exe) is listed as a reference.
In the VS2010 IDE this is in "Project - Add reference - COM tab". In Delphi XE I cannot find that entry in "Component - Import Component - ActiveX".
I have inspected the entries in the two IDEs and found that there are some COM components included in the Delphi IDE which are also in the VS IDE but there are a lot of COM components missing in the Delphi IDE.
See for screenshot file which shows that the first seven COM components are not displayed within the Delphi IDE.
Can one explain why this is so and maybe a help for that specific problem?
Did you checked Import a Type Library option in Import Component wizard (on the first page)? ActiveX is narrower thing than COM. Also, you can use Add button to choose a file if you know library location.
In one of my projects we are using CodeGear C++ Builder 2009 from Embarcadero.
I am also working with Eclipse and VS2010.
Now there is one thing that I don't understand with C++ Builder (that I have no problem with in the other IDEs), isn't there any way to find a definition?
it wasn't until 2010, when they brought back the class explorer, that you could go to both the declaration and the definition of a class. That takes more steps than control-click, but is a bit better.
I am using SourceNavigator http://sourcenav.sourceforge.net/ for this purpose and more...
I have a .net dll which I could import to Delphi 6. But it loses some information.
I have a demo application in VB.net to use this dll which shows 2 interfaces called
IRedeemTransactionItemBundle and ITransactionItemBundle. In Visual Studio 2008 I could see that ITransactionItemBundle is the base type of IRedeemTransactionItemBundle. So when I declare a variable of type IRedeemTransactionItemBundle, I could access all properties of both interfaces.
But when I import the dll to Delphi 6, I could see both IRedeemTransactionItemBundle and ITransactionItemBundle declaration part. But there is no information that shows ITransactionItemBundle is the base type of IRedeemTransactionItemBundle. Also when I declare a variable of type IRedeemTransactionItemBundle in Delphi, I am not able to access properties of ITransactionItemBundle (the base type).
When I tried to register the library in tlb editor by setting the base type of IRedeemTransactionItemBundle to ITransactionItemBundle, I am getting the error: “Parent Interface already has a member with id:1610743808”. I could see properties of both interfaces have same ID in the tlb editor.
I tried to import the same dll using Delphi 7 also. But no help.
Is that a problem with Delphi? Have any of you experienced such a problem in importing kindly give me some thoughts?
I would suggest you to make COM visible wrapper for the DLL in C# or VB.NET which will import necessary functionality in the way Delphi can interact with correctly.
Apart from using COM interop, you can do an unmanaged export. Simply put, you need a new specific version of the .net dll.
Please head to this post for details of the technique using Delphi.