Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 14 years ago.
Improve this question
I have a problem with a Delphi 2009 project : It can't initialize Indy 10 !
This code worked fine before in Delphi 2007 (although we might have been using an older revision of Indy, but I suspect that has not much to do with it);
The initial call to IdWinsock2.InitializeWinSock(), raises this exception (with error code 998) :
Project EAServer.exe raised exception class EIdWinsockStubError with message
'Error on loading Winsock2 library (WS2\_32.DLL): Invalid access to memory location'.
But ws2_32.dll is in C:\Windows\System32 allright, with these version details :
File Version : 5.1.2600.5512 (xpsp.080413-0852)
Description : Windows Socket 2.0 32-Bit DLL
Copyright : © Microsoft Corporation. All rights reserved.
(this shows I'm on WinXP btw).
The silly thing is, that when I look at the process itself (using "Process Explorer"), I can see the process already has this DLL open. The reason "WS2_32.DLL" is already loaded, seems to be because we use the RTL unit Winsock.pas in this project too.
This unit is statically linked to "wsock32.dll", which has a dependancy on WS2_32.DLL, so there.
Does anyone know why this code worked fine before (in Delphi 2007), and now (in Delphi 2009) it suddenly breaks?
And is this inability to re-open the ws2_32 dll common knowledge, or is there really something wrong here? (I did check : I only have 1 version of these DLL's present on my system).
Better yet : Can anyone help me fixing this?
I finally found an answer to this : The affected applications contained a bit of code-hooking that randomly damaged parts of System.dcu! (FYI : We're using a Delphi 2009 beta version of madshi's madCodeHook library). As soon as we switched to another code-hooking library, these symptoms disapeared... I guess that's what happens when you use beta-software. Anyway, sorry for bothering you with this. Problem solved!
This may be overly simplistic, but have you tried changing the order in which the relevant units are listed in your uses clause? Sometimes this helps in these situations.
I think it could be problem with Ansi/Unicode calls of Win32 API (including WinSock API). Check if code using AnsiString/AnsiPchar call XxxA functions (eg MessageBoxA), and String/Pchar call xxW function (eg MessageBoxW). In previous versions of Delphi String was alias to AnsiString and XxxA Win API function was used, but now String is unicode by default and XxxW functions should be used.
Related
This question already has answers here:
Designintf.dcu not found in custom component
(3 answers)
Closed 8 years ago.
hi I tried one component code in Delphi 5. and got Error DsgnIntf.Dcu not found.
Actually I was transferring my Code from Delphi 5 to Delphi XE5. In Delphi XE5
while running I got error DesignIntf.dcu not found .
I tried all way replace DesignIntF, Design Editor and all.
I got response that 'Delphi after Delphi 6 not redistributed this Designtime code'.
then at last I Tried it on Delphi 5 for testing . in that version Dsgnintf.dcu
should not come.
I think Not Redistribution but another problem in it. can get direction regards this ?
thanks
abhishek mestri
DsgnIntf.Dcu is a part of ToolsAPI. Now in newer versions of Delphi this file has been replaced by DesignIntf.pas.
Based on information on site below replacing references from DsgnIntf to DesignIntf solves the problem most of the times. But I would not count on this as there were lots of changes from Delphi 5 to Delphi XE5. Here is the link to the site:
http://www.delphifaq.com/faq/delphi/vcl/f266.shtml
EDIT: ToolsAPI by default wasn't available in Personal editions of Delphi. This unfortunately mean that for those of you who own Personal edition of Delphi my answer won't help.
Newer versions of Delphi use Open Tools API which are available in all Delphi editions so there is no more restriction for you to own athleast Proffesional Edition to use it. I'm not sure in which Delphi version was this change made.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have just installed JCL v2.4.1.4571 in D2009 (using the Install.bat file) from http://wiki.delphi-jedi.org/wiki/JEDI_Code_Library
There was a lot of 'progress activity' in the installation screen so I guess all went well.
My question is how do I use this newly installed JCL?
I found some .pas files in the ..\source\common folder I used for expanding the downloaded jcl-2.4.1.4571.zip file into. One .pas file is JclDateTime.pas and it contains the 'dates and times' routines. So I guess I can just search through this file for a routine I may want, but maybe there is a more streamlined way of finding routines?
Also any hints on using JCL in the IDE itself? I did not get much help asking google.
cheers
Posting this as an answer because it's too big for comments.
http://wiki.delphi-jedi.org/wiki/JEDI_Code_Library - "The JEDI Code Library (JCL) consists of a set of thoroughly tested and fully documented utility functions and non-visual classes". It's a code library. There are only a couple of things that plug into the IDE like JclDebug. You won't get much help from google because you don't use it in the IDE. You include the Jcl.... files in your source code and you can then use the functions.
A good starting point is the help files.
http://sourceforge.net/projects/jcl/files/JCL%20Releases/JCL%202.6%20Build%205178/jcl-2.6.0.5178-chmhelp.zip/download
or for the PDF file
http://sourceforge.net/projects/jcl/files/JCL%20Releases/JCL%202.6%20Build%205178/jcl-2.6.0.5178-pdf.zip/download
Don't confuse the JCL with the JVCL. The first is a non-visual classes and utility functions, the second is a component library that plugs into the IDE.
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
I'm moving an old project developed with Delphi 2007 and a bunch of 3rd party components from an old computer to my own instalation.
Everything except the TF1Book component (from the VCF132.ocx library, version 4.1.1.2) works fine.
I'm using the exact same version of Delphi in the new computer and same patches.
(The older computer belongs to a developer who left the company and it's unavailable and unreachable)
The error I'm getting in design time, and just in design time is:
License information for TF1Book not found. You cannot use this control
in design mode.
So, I can still compile and can edit the .dfm form in notepad and works fine, in runtime, but I can't work properly within Delphi.
Please, note that I have read the first 30 entrys for each google search related to this problem, with several variations.
And most of them says that I should simply run the regsvr32 to register the OCX within Windows and that will solve the problem.
But also, most of this posts or blogs I've found are way older, and they're talking about the version 3.x of the component.
I am using the 4.1.1.2 version. This is what the other developer had in his computer.
I repeated the supposed procedure of placing the VCF132.ocx on the \windows\system32 or the windows\syswow64 (for x64 windows) and then run the appropriate regsvr32 version to register the component in 3 computers: Win 7 x86, Win 7 x64, Win 8 and WinXP SP3 and got the same result in all of them.
I'm starting to think that this is a real licensing issue, not a ocx windows registering issues. Actually, if I don't register de OCX in Windows the error I get in Delphi is very different, it is something about class not found or similar.
Nobody else in the company (a small 3 guys company) knows or remember how this was component acquired and therefore we can't find the proper installer for the components.
Though, by researching the Windows registry in that computer I found information about some sort of registration process, like User, Company and a Serial number. There are no ".lic" files associated to this ocx in the old computer.
But so far, I'm unable to find such installer in that computer.
I would be happy to simply acquire a new license, but this product is not being sold anymore.
So, this is my question. For the VcF132.ocx, version 4.1.1.2, does anybody knows/remember if there were a copy protection or registration mechanisms that would forbid me to simply move the component to other computer?
I used to use this component way back when. As I recall, registering the OCX only gives you runtime support. To get it all working at designtime you need to run, on your dev machine, the installation program that the vendor supplied.
I also distinctly remember that there was a .lic file installed onto each developer machine. So you should find them on the old machines, but I'm not sure whether they can be easily transferred.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 14 years ago.
Improve this question
I'm a web developer and my current task is to build an ActiveX component.
It's the first time I have to work with ActiveX and I managed to make an working example.
However I cannot make the ActiveX install from a browser. When installing it using visual studio 2008 and running the web page all works as expected, when I don't have it installed I would expect something similar to windows updates asking me if I allow the installation but this does not happen....
Here is how I'm placing it in the web page:
<object id="myActiveX" name="myActiveX" classid="clsid:A68B19C8-9DB4-49e4-912F-37FB44968528"
codebase="http://localhost/myWebSite/install.cab#version=1,0,0,0"></object>
The guid in the classId matches the guid I created for my class.
Can anyone point out what I'm missing?
Edit:
Forgot to mention this, I have a Setup Project for my ActiveX that generates an .msi and an Setup.exe
i have made a cab file with those using a .inf file as so:
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Setup Hooks]
hook1=hook1
[hook1]
run=msiexec.exe /i %EXTRACT_DIR%\Install.msi /qf
You might want to check your IE security settings: By default, unsigned ActiveX controls are ignored.
Here's another possibility:
Did you mark your control as "Safe for scripting" and "safe for initialization"?
I'm not sure this is the issue you're running into since 1) your sample HTML code doesn't show that you're using the control in a script and 2) said HTML snippet doesn't show that you set control properties.
However this is a usual trap so if I were you, I'd give a look.
IIRC this can be achieved either by implementing the IObjectSafety interface or using registry settings.
This and this are 2 pointers to get you started.
Why is there an Indy9 folder (The default install folder of C:\Program Files\CodeGear\RAD Studio\6.0\source\Indy contains subdirectories for "Indy9" and "Indy10") Why are both versions installed? What is using Indy9? I didn't think it had been updated for 2009...is Indy9 now safe to use with Delphi 2009?
There is an opened QC report about this, but it's only visible to QC sysops.
The status of "open" typically means that it's accepted that this is a bug, rather than by design.
Remy Lebeau - one of the Indy developers - said this:
The 2009 installer does ship with the
Indy 9 source code, but it is not
selectable during install. There is a
note in the documentation that Indy 9
can be installed manually if needed.
But keep in mind that Indy 9 has not
been updated to actually support 2009.
At the moment, I am not sure if it
will be.
There are some changes in Indy 9 (from the 2007 version) so that it will compile under Delphi 2009 (a few String to AnsiString changes), but based on my tests it doesn't work. It tries to, but does not connect. If you want I can give you the changes that have been added for Unicode support, but I don't believe they are sufficient.
I can't really answer why. I could conjecture a few reasons, but I do not have any insider information.
Is it safe to use? YMMV. There is a lot to Indy, so there may be some parts that work fine for your project. Even a simple test with the TIdTCPClient resulted in Socket Error #11004 every time. Same for TIdHTTP. It seems like I tried the MD5 previously and it just got garbage, but I am not sure on that one.
Answer: It was included by mistake (assumption), and it is not safe to use (based on limited tests).
That is unfortunate, because Indy 10 has issues too, and I have some legacy apps that use Indy 9.
Indy9 is there for compatibility. There were some breaking changes in Indy10 (your code that was written against Indy9 may not compile under Indy10) so you have the option of continuing to use Indy9 (I think the installer prompts and asks what Indy you want to use - at least it did with D2007).
Update: Okay a few people have correctly commented that Indy9 wont compile with D2009 (because of the new Unicode support), so I guess I don't know why it is there.
My guess, it was in the source tree, and was automatically included by installer.
Keep in mind that the source files are not used unless you tell Delphi to recompile them.
If you do not have the Enterprise version you will not even have these folders.