当前位置:编程学习 > wap >>

无法找到 PInvoke DLL“FRilDll.dll”的问题,请大家帮忙解决。(急)

刚开始学习visual stadio2005下的职能设备开发,从微软上的《在模拟环境中创建呼叫事件》文章里(http://www.microsoft.com/china/MSDN/library/Mobility/pocketpc/dnppcgencallevents.mspx?mfr=true)下载了callEvents例子进行学习。在调试其下的FrilStub例子时,总是报出以下错误:
----在 System.MissingMethodException 中第一次偶然出现的“FrilStub.exe”类型的异常
----未处理的“System.MissingMethodException”类型的异常出现在 FrilStub.exe 中。

----其他信息: 无法找到 PInvoke DLL“%CSIDL_PROGRAM_FILES%\FrilStub\FRilDll.dll”。

请各位帮忙看看是怎么回事? --------------------编程问答-------------------- 对于调用dll的语句如下:
......
public const String dllName= "FRilDll.dll";

        [DllImport(dllName, EntryPoint="Init", SetLastError=true)]
private extern static void FakeRILInit();
        [DllImport(dllName, EntryPoint="DeInit", SetLastError=true)]
private extern static void FakeRILDeInit();

        [DllImport(dllName, EntryPoint="ReceiveSMS", SetLastError=true, CharSet=CharSet.Unicode)]
private extern static void ReceiveSMS(string Message, string PhoneNumber);

        [DllImport(dllName, EntryPoint="ReceiveCall", SetLastError=true, CharSet=CharSet.Unicode)]
private extern static void ReceiveCall(
string PhoneNumber, // @param phone number of the calling party
int AddressType, // @param Address type
int Restriction, // @param Restriction (num withheld, Unavailable or valid)
int Duration); // duration before hanging up


        [DllImport(dllName, EntryPoint="SetOpSignalStrength", SetLastError=true, CharSet=CharSet.Unicode)]
private extern static void SetOperatorSignalStrength(
string OperatorNumericName, // Operator numeric name
int SignalStrength); // Signal strength 0 < CSQ < 32


        [DllImport(dllName, EntryPoint="AddOperator", SetLastError=true, CharSet=CharSet.Unicode)]
private extern static void AddOperator(string OperatorName, string OperatorNumericName);


public FRIL()
{
}

public void init()
{
FakeRILInit();
}

public void deInit()
{
FakeRILDeInit();
}

public void receiveSMS(string Message, string PhoneNumber)
{
ReceiveSMS(Message, PhoneNumber);
}

public void receiveCall(string PhoneNumber, int AddressType, int Restriction, int Duration)
{
ReceiveCall(PhoneNumber, AddressType, Restriction, Duration);
}

public void retOperatorSignalStrength(string OperatorNumericName, int SignalStrength)
{
SetOperatorSignalStrength(OperatorNumericName, SignalStrength);
}

public void addOperator(string OperatorName, string OperatorNumericName)
{
AddOperator(OperatorName, OperatorNumericName);
}
....... --------------------编程问答-------------------- 不会!
UP! --------------------编程问答-------------------- 谢谢帮忙up --------------------编程问答-------------------- 使用vs2005的设备仿真器管理器功能使虚拟机连接上activesync,在“我的电脑”的“移动设备”的\Program Files\FrilStub目录下,已经部署了FrilStub.exe及FRilDll.dll,但为何还是报出“无法找到 PInvoke DLL ‘FRill.dll'”的错误呢?

没有人知道吗? --------------------编程问答-------------------- 这么大个论坛,居然没人会吗? --------------------编程问答-------------------- 你使用什么设备做调试的,如果用windows mobile 5.0的话,并不是说所有动态库都能调用的,因为windows mobile 5.0去除了很多他认为没有用的动态库,如果你在Pocket PC2003的机子上肯定可以运行通过!!
补充:移动开发 ,  Windows Phone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,