Sunday, May 27, 2012

[Jailbreak 實用資料] 最新最好的 Cydia Source List @ 2012 列表

以下我們搜集了一些最新最好的 Cydia Source List 列表可供大家參考:
  • Hackulo.us Source安裝 Installous
    http://cydia.hackulo.us 
  • xSellize Source
    國外一個十分大型的 Cydia Source ,內有不同的軟件及一些要破解的收費軟件,如 iacces、mQuickDo 等。
    http://cydia.xsellize.com
  • Weiphone Source 威鋒網 Source
    內地比較大型的手機網站 威鋒網 Source,包括部份著名軟件如 WeFit 3 以及網龍公司出品的熊貓防火墻、熊貓空間等等。
    http://app.weiphone.com/cydia/ 
  • Insanelyi Source
    http://repo.insanelyi.com
  • iHacksRepo Source
    http://ihacksrepo.com
  • 51iPA Source
    http://cydia.51ipa.com
  • Iwoowiz Source
    http://repo.woowiz.net
  • iPhoneCake Source
    http://cydia.iphonecake.com
  • SiNfuL iPhone Source
    http://sinfuliphonerepo.com

Wednesday, May 09, 2012

VS2010 PInvokeStackImbalance C# call to unmanaged C++ function

 
I just switched to vs2010 from vs2008. Exact same solution, except now every single call to a C++ dll yields a 'pinvokestackimbalance' exception.

First, understand that the code is wrong (and always has been). The "pInvokeStackImbalance" is not an exception per se, but a managed debugging assistant. It was off by default in VS2008, but a lot of people did not turn it on, so it's on by default in VS2010. The MDA does not run in Release mode, so it won't trigger if you build for release.
In your case, the calling convention is incorrect. DllImport defaults to CallingConvention.WinApi, which is identical to CallingConvention.StdCall for x86 desktop code. It should be CallingConvention.Cdecl.


1. declare CallingConvention = CallingConvention.Cdecl on your DllImport.
2. turn it off in VS2010:
  1. CTRL + ALT + E
  2. Under "Managed Debugging Assistants" uncheck PInvokeStackImbalance.