2017-08-23 4 views
3

Microsoft Developer Network MSDNには、Windowsアプリ開発者のために習得し、最新の状態を維持するために必要な便利な文書化機能が満載です。どのようにmsdnのC++関数の同等のデルファイ関数を見つけるのですか?

たとえば、hereのshellexecute関数については、十分に文書化されています(Embarcadero Technologiesによって以下に翻訳されています)。

function ShellExecute; external shell32 name 'ShellExecuteW'; 

、これらの機能を説明するために使用される言語はC/C++(不平を言うか、任意のものではない)があるが。

これらの機能に相当する部分があるかどうか(存在するかどうかは別の問題です)を見つけるのは難しい場合があります。

たとえば、私は、このfunctionの同等を探しています:

DWORD CreateIpNetEntry(
    _In_ PMIB_IPNETROW pArpEntry 
); 

今ではいつも来て、私は同等の私は動けなくなるたびに見つけることができるのはここ尋ねることは無意味だろう。だから私の質問は:

デルファイのMSDNのC++関数に相当する/翻訳されているかどうかを知る方法はありますか?

+1

[JEDIヘッダー](https://sourceforge.net/pjects/jedi-apilib/)(この場合は[JwaIpHlpApi.pas](https://sourceforge.net/p/jedi-apilib)の関数を試してみてください。 /code/HEAD/tree/jwapi/trunk/Win32API/JwaIpHlpApi.pas#l254)と[JwaIpRtrMib.pas](https://sourceforge.net/p/jedi-apilib/code/HEAD/tree/)の使用されている構造jwapi/trunk/Win32API/JwaIpRtrMib.pas#l785))。そこで翻訳されたプロトタイプの多くは、Delphiに同梱されているプロトタイプよりも正確です。 – Victoria

+0

@Victoria私がそれについて聞いたのは初めてです。 –

+0

あなたは大歓迎です。私はあなたの質問を誤解しました。 – Victoria

答えて

4

特定のAPI関数が翻訳されているかどうかは、単にDelphiソースフォルダを検索することで確認できます。

ファイルツールでの検索では、組み込みのFind in Filesなど、必要な目的を果たします。

+0

「Find in Files」は何年もの間私にとって本当にうまく動作します。 – kobik

+0

@kobik、ファイル内の検索は、インクルードされたファイル(または含まれているサブディレクトリ内のファイル)用です。そのためには、もちろんDelphiのソースファイルが必要です。 – Victoria

+1

これは本当です、源がなければ、あなたは立ち往生しています。しかし、ソースがあれば、これは確かに最も信頼できる方法です。 –

4

これはFinding Unitsトピックで説明されています

Editing Delphi code in the Code Editor, you can use the Find Unit refactoring dialog box to locate and add units to your code. The Find Unit dialog appears when you select an identifier in the Code Editor and select the Refactor > Find Unit menu command. The operation attempts to find the appropriate unit containing the definition of the selected identifier, and then adds the selected unit to the uses clause. You can select multiple units to add to the uses clause. To find and add a unit to the uses clause:

  1. In the Code Editor, click an identifier whose unit you want to add to the uses clause.
  2. Choose the Refactor > Find Unit menu command. The Find Unit dialog box displays a selection list of applicable Delphi units.
  3. Select the unit that you want to add to the uses clause in the current scope. You can select as many units as you want.
  4. Choose where to insert the reference, either in the interface section or in the implementation section.
  5. Click OK. The uses clause is updated with the selected units.

それとも、ソースコードでデルファイを持っている場合は、Delphiのソースフォルダをgrepすることができます。

+1

手順3の検索ボックスに関数の名前を書き込むと正常に動作しているようです。 –

+0

このリファクタリングツールを使用する私の最初の試みはこのエラーにつながりました:* System.OutOfMemoryException: 'System.OutOfMemoryException'型の例外がスローされました。その後、リファクタリングツールは機能しましたが、翻訳が存在するにもかかわらず関数 'CreateIpNetEntry'を見つけることができませんでした。結論として、このツールを使用しないでください。代わりに検索を使用してください。 –

+0

@David、うわー、それはあなたのために失敗したと結論ですか?スターターがあればどうしますか? – Victoria

関連する問題