我调用PPC win32的API:
[DllImport("cellcore.dll")]
public static extern int SimDeleteMessage(int hSim, uint dwStorage, uint dwIndex);返回一个“-2013265087”的错误, 我怎么知道“-2013265087”代表什么错误亚,在MSDN中也差不到。
此Win32 Api的原型是这样的:
HRESULT SimDeleteMessage (
   HSIM hSim,
   DWORD dwStorage,
   DWORD dwIndex
);

解决方案 »

  1.   

    应该指定EntryPoint吧。
    [DllImport("cellcore.dll", EntryPoint="SimDeleteMessage")]
    public static extern int SimDeleteMessage(int hSim, uint dwStorage, uint dwIndex);
      

  2.   

    我这样指定了,也不行。
    [DllImport("cellcore.dll",EntryPoint="SimDeleteMessage", SetLastError=true)]
    public static extern int SimDeleteMessage(int hSim, uint dwStorage, uint dwIndex);
    愁呀!
      

  3.   

    i = SimDeleteMessage(hSim, SIM_SMSSTORAGE_SIM, (uint)1);
    我是这样调用SimDeleteMessage函数的,
    其中:hSim已经有效了。(这点可以肯定。)
    SIM_SMSSTORAGE_SIM=2
    (uint)1就是删除短信的index,可以肯定,在我的Sim卡中指定由短信的,由4条短信的。
      

  4.   

    http://www.microsoft.com/china/MSDN/library/Mobility/pocketpc/2k3smartphonesecurity.mspx