相关疑难解决方法(0)

使用.NET中的pHash

我试图从.NET 使用pHash

我尝试的第一件事是注册(regsvr32)phash.dll在这里询问 其次,我试图使用DllImport导入,如下所示.

    [DllImport(@".\Com\pHash.dll")]
    public static extern int ph_dct_imagehash(
        [MarshalAs(UnmanagedType.LPStr)] string file, 
        UInt64 hash);
Run Code Online (Sandbox Code Playgroud)

但是当我尝试在运行时访问上述方法时,会显示以下错误消息.

    Unable to find an entry point named 'ph_dct_imagehash' in DLL '.\Com\pHash.dll'.
Run Code Online (Sandbox Code Playgroud)

"切入点"是什么意思,为什么我会收到错误?

谢谢.

仅供参考 - 这是完整的源代码

using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows;

namespace DetectSimilarImages
{
    public partial class MainWindow : Window
    {
        [DllImport(@".\Com\pHash.dll")]
        public static extern int ph_dct_imagehash(
            [MarshalAs(UnmanagedType.LPStr)] string file, 
            UInt64 hash);


        public MainWindow()
        {
            InitializeComponent();

            Loaded += MainWindow_Loaded;
        }

        void MainWindow_Loaded(object sender, RoutedEventArgs …
Run Code Online (Sandbox Code Playgroud)

.net c# c++ dllimport

9
推荐指数
1
解决办法
5757
查看次数

标签 统计

.net ×1

c# ×1

c++ ×1

dllimport ×1