1

I have done all the searching and can't find a solution to this weird problem that's been bugging me for about 5 hours. I started this app in Lazarus, but then took it across to D5pro to see if I could solve the problem. Thought it might have been a Lazarus "thing."

In D5, I have an app fully-working (so far so good) and I decided to try some different approaches to the look and feel so I "Save Project As" into a new folder. I then went through all of the included Units and saved them to the new Folder. I copied the two OpenSSL .DLL to the new folder. Did a compile and run and it all works fine. Well, almost.

When I tried the new app, the POP3 Unit crashes at "Login"

I have stepped through and all of the basic login stuff, Server, Name, SSL parameters etc is identical to the former version.

I went back to the original app and did a full Build and it still worked fine. I did a full Build on the new app and it still crashes at Login.

It gets through the pop3.Sock.SSLDoConnect() OK, but comes back from pop3.Login() with an error 10061 which according to the BlckSock Synapse-Unit, means "Connection refused."

When it returns from this call Result:=ssConnect(s, @name, SizeOfVarSin(name)); which I assume is in the .DLL it has a Result of -1 which then triggers the GetLastError and that is "10061 - Connection refused"

As far as I can find, everything is identical between the two projects. All Library Paths are in the Environment and not within the project.

Any thoughts and suggestions?

4

2 に答える 2

0

作業することはあまりありません。さまざまな外部呼び出しの瞬間に、デバッガーですべてのパラメーターを確認できますか?

もちろん、コンパイラを変更すると、最適化などのように、隠れたバグが表面化する可能性があります。よく知られている違いは、temps の寿命が異なる場合があることです (こちらを参照)。

おそらく、最初に決定的な違いを明確にする必要があります。Delphi と同様に、ここではデバッガが味方です。

于 2013-03-28T19:48:37.687 に答える
0

OK、問題は解決しました。

ルフォ卿、それは良い考えでしたが、助けにはなりませんでしたが、試してくれてありがとう.

コンパイルを開始する前に、ssleay32.dll を新しいアプリ フォルダーにコピーしました。それは動かなかった。完全なビルドを実行しましたが、それでも機能しませんでした。

ssleay32.dll と libeay32.dll を削除して、完全なビルドを行うことにしました。私はそれを実行し、もちろんクラッシュしましたが、今回はそれを予期していました.

次に、2 つの .ddl を新しいアプリ フォルダーにコピーして戻し、別のフル ビルドを実行しました。

ビンゴ問題が解決しました。奇妙に思えますが、Lazarus と D5 の両方で動作しています。.dll がコンパイルされた .dcu にリンクされる方法と関係があります。

利用可能な.dllがない状態でビルドを実行すると、それが解消されました。.dll をフォルダーに戻すと、別のビルドで .dll リンクが .dcu に正しく含まれるようになりました。

ああああああああ:)

于 2013-03-29T17:28:37.920 に答える