I have a ActiveX control with classname as ThunderRT6UserControlDC in our application, can you please let me know what could be it's ProgId and it's OCX filename.
Thanks.
Make sure you have the Windows SDK installed and open this application (path may be slightly different):
C:\Program Files (x86)\Windows Kits\8.1\bin\x64\oleview.exe
Start this application with administrative privileges to have the best experience in using it.
In the treeview to the left, go to TypeLibraries and search for your ThunderRT6-Library. On the right side, you can find your information about the TypeId (the guid) and the exact filenames for 32/64bit.
Related
From the OmniPascal page on Visual Studio Marketplace:
How to install
Install Visual Studio Code and open it.
Open View -> Command Palette... and type ext install OmniPascal
Restart Visual Studio Code and open File -> Preferences -> User Settings
Add the key "objectpascal.delphiInstallationPath" to the right editor and set its value to the Delphi installation path. Don't forget to escape the backslashes! Example:
"objectpascal.delphiInstallationPath" = "C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0",
Except that seems to be wrong; it complains that it shouldn't be an = (equals), but a : (colon):
I assume that's a typo, and it should be a colon:
But what should the path be?
The page gives the example path as:
C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0
But the animated installation pastes in a path leading to the subfolder source:
Which is it? I only ask because neither path seems to enable suggestions:
Except that seems to be wrong; it complains that it shouldn't be an = (equals), but a : (colon)
Oh, obviously there's an error in the documentation. This will be fixed with the next release. Thanks.
Of course it should be a colon since it is an entry in a JSON file.
But what should the path be?
The entry objectpascal.delphiInstallationPath should point to the path where Delphi is installed. It doesn't matter whether you define the source subdirectory or not. The path is internally used to find Delphi units recursively. As all .pas files are located in the source folder the lookup is slightly faster when the entry looks like this:
"objectpascal.delphiInstallationPath": "C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0\\Source"
Free Pascal users should point to the FPC directory
Sample:
"objectpascal.delphiInstallationPath": "C:\\lazarus\\fpc"
I only ask because neither path seems to enable suggestions
The syntax highlighting in your screenshot seems to come from another Pascal plugin for Visual Studio Code. When the OmniPascal plugin is active in a .pas file then the current file type is "ObjectPascal". You see it in the bottom right corner next to the smiling feedback button:
When the current file type is "Pascal" or anything else then the wrong plugin is active. Click on the file type and change it to "ObjectPascal". Now you should get code completion, quick infos and more.
I am helping a coworker set up his computer so that his Delphi 7 environment works like mine. He has Delphi 7 installed plus the third party tools we use. We have a Delphi app with source. It compiles fine on my computer but when he compiles it on his computer, it keeps coming up with 'file not found' errors for many dcu files. These are dcu files of third party components, either which come with Delphi IDE or have been installed manually.
I renamed his C:\Program Files (x86)\Borland folder and copied my whole Borland folder structure to his so that he has what I have. So now his Delphi IDE and the app structure resembles mine, yet he still gets missing dcu's. Every time he gets a missing dcu, he adds its path to Delphi's 'Search path' list. For some dcu's, they exist in different folders which means we have to troubleshoot further to make sure we picked the correct version. My 'Search Path' is empty as shown below which tells me my Delphi doesn't use this entry to search for dcu's. Our computer's PATH environment variable entry has the same values for anything related to Delphi.
My question is why my delphi app compiles fine as it finds all the dcu's it needs which reside in different folders yet his Delphi is not finding them when we have the same folder structure and PATH?
How does the Delphi IDE finds all the dcu's it needs during compilation? What is left now to look at is the registry. Are the search patterns in the registry? Where? (We also have Delphi XE installed if this means anything)
You don't want to add these directories to your project's search path. That will make it so that only this project is able to use these components. Instead, you need to do this in the global library path, which applies for all projects. Check the library path of your existing installation, surely you'll find a large list of directories here.
Main Menu -> Tools -> Environment options dialog -> Library page -> Library Path edit box
They are the output paths, try looking in the following location
Tools > Options > Environment Options > delphi Options > Paths and Directories
This tells the IDE what source files to include. The only other difference can be if you system variables are different if you have any.
http://docwiki.embarcadero.com/RADStudio/XE8/en/Library
Convert might be the wrong word, but to save a user having to install something I wondered if a small EXE can be embedded in a web-page (IE only) using ActiveX so it is run when a button is pressed. Obviously a big security hole but is it feasible?
Urgh, just thinking about it makes me die a little inside.
But yes, package up the exe and the activex in a cab file and use the activex to launch the exe.
Info on packaging up ActiveX cab files is here: http://msdn.microsoft.com/en-us/library/aa751974(v=vs.85).aspx
A bit more information on Inf files (specifically the DestDir bit): http://msdn.microsoft.com/en-us/library/aa741215(v=vs.85).aspx
This would allow you to put the exe in a known location (Windows or System) so that you could execute it from the activex control providing permissions were set correctly
I have installed Delphi 2010 and tried to create a new project clearly.
but when i compile my project, delphi does not generate any exe file.
also when i try to run application i get this error:
Could not find program, "C:\test\Project1.exe"
note: i haven't changed any configuration or settings of Delphi or project.
everything is as it's default
It was about getting absolute path because i'd changed ProgramFilesPath and ProgramFilesDir in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion to D: without leading backslash.
I changed it to D:\ and the problem was solved now
thank you all
If you're on Vista or later, this could be because of UAC settings. Try setting the project output folder in Project->Options to something a limited account would have access to, such as somewhere under My Documents\RAD Studio\Projects.
I've had the same problem on Windows 7.
Installing it as administrator solved the problem IIRC.
If that doesn't work then make sure you run it as administrator.
You are running it on XP though, so unless you've installed it as a non-administrator, or run it as a non-administrator this shouldn't be happening.
Note that if you're in a domain, it's possible that you're not local admin on your XP machine.
Run Process Explorer, search for any open handles to C:\test\Project1.exe using Find, Find handle or dll.
That will tell you what is locking your .exe.
Edit 20221221 because of link rot:
[Wayback/Archive] Process Explorer redirects to [Wayback/Archive] Process Explorer - Sysinternals | Microsoft Learn
[Wayback/Archive] Know which process has locked a file has died and moved to[Wayback/Archive] How to Identify the Process that has Locked a File in Windows and added solutions based on resmon.exe (built-in), handle.exe (SysInternals), OpenFiles.exe (built-in, but requires a global flag to be enabled which for enabling requires a reboot).
[Wayback/Archive] Handle - Sysinternals | Microsoft Learn
I have a Delphi .CPL currently written with Delphi 7 which needs to update settings in HKLM (to be used by a service application) and which must support Vista, Win7 and Server 2008. Currently this can be done by adding a RUNASADMIN value to AppCompatFlags/Layers, using the CPL file as the value name. This causes Windows to ask for elevation for a 'legacy control panel applet'.
I need to find a way to build the CPL in Delphi 2010 without it appearing to be 'legacy' and, if possible, not to require the registry setting or elevation. Adding the usual manifest resource to the DLL/CPL referencing Common-Controls v6 and "requireAdministrator" does not fix the problem: no elevation is requested and HKLM access fails. Both the original and the Delphi 2010 .CPL can be made to run correctly (after elevation) by navigating to the file in SYSWOW64, right-clicking, and running 'as Administrator'.
Later: I have found a succint explanation of why you cannot elevate a DLL in this way in a forum posting here.
I believe you need to use COM elevation. There was a wonderful blog posting on this which appears to have been taken down, but the source code behind the posting is still available on the VCL components website (way back machine link).
Some additional information can be found in the question/answers for: Delphi: Prompt for UAC elevation when needed
I think I have found a better answer to my question. There is such an animal as a 'non-legacy' control panel applet, which is described in MSDN here. "Now, in Windows Vista, you can add your own applet to Control Panel by creating an executable for your applet and registering it, instead of going through the trouble of creating a .cpl file."