請問各位程式高手 - 財經
By Edith
at 2009-10-06T20:53
at 2009-10-06T20:53
Table of Contents
群益提供的報價 API 應該是用 C/C++ 寫的 32-bit DLL
我則是使用 C# 來寫策略程式
API 中有函式需要 callback function
但是他的函式參數只收 long 做為 function pointer 的 type
而 C# 裡只有 delegate 頂多轉成 IntPtr
我試了幾種方法 都沒辦法成功地讓該函式呼叫到 callback function
範例程式碼有 VB 與 VC++ 他們使用
VB: 函式名稱( AddressOf CallbackFunctionName )
VC++: 函式名稱( (long) CallbackFunctionName )
不曉得板上是否有高手處理過該 DLL (SKQuoteLib.dll) 或是類似的問題
我卡在這地方許久 也找不到解決的方式
根據查的一些資訊
這跟 Managed 與 Unmanaged 之間的 P/Invoke 與反向 P/Invoke 有關
可能跟 CLR 的細部處理有關
C/C++ 的 long 是 32-bit
平台:
Vista 64-bit Enterprise
Visual Studio 2008, 專案的 target platform 已改為 x86
先行感謝~
--
我則是使用 C# 來寫策略程式
API 中有函式需要 callback function
但是他的函式參數只收 long 做為 function pointer 的 type
而 C# 裡只有 delegate 頂多轉成 IntPtr
我試了幾種方法 都沒辦法成功地讓該函式呼叫到 callback function
範例程式碼有 VB 與 VC++ 他們使用
VB: 函式名稱( AddressOf CallbackFunctionName )
VC++: 函式名稱( (long) CallbackFunctionName )
不曉得板上是否有高手處理過該 DLL (SKQuoteLib.dll) 或是類似的問題
我卡在這地方許久 也找不到解決的方式
根據查的一些資訊
這跟 Managed 與 Unmanaged 之間的 P/Invoke 與反向 P/Invoke 有關
可能跟 CLR 的細部處理有關
C/C++ 的 long 是 32-bit
平台:
Vista 64-bit Enterprise
Visual Studio 2008, 專案的 target platform 已改為 x86
先行感謝~
--
Tags:
財經
All Comments
By Hedwig
at 2009-10-09T06:37
at 2009-10-09T06:37
By Edith
at 2009-10-09T20:23
at 2009-10-09T20:23
By Elma
at 2009-10-10T16:22
at 2009-10-10T16:22
By Edith
at 2009-10-10T17:50
at 2009-10-10T17:50
By Dinah
at 2009-10-14T16:03
at 2009-10-14T16:03
By Andrew
at 2009-10-15T11:47
at 2009-10-15T11:47
By Damian
at 2009-10-16T19:19
at 2009-10-16T19:19
By Valerie
at 2009-10-20T11:09
at 2009-10-20T11:09
By Rachel
at 2009-10-24T12:19
at 2009-10-24T12:19
By Olivia
at 2009-10-24T22:51
at 2009-10-24T22:51
By Kristin
at 2009-10-29T11:17
at 2009-10-29T11:17
By Lily
at 2009-11-02T22:24
at 2009-11-02T22:24
By Aaliyah
at 2009-11-05T08:25
at 2009-11-05T08:25
By Kumar
at 2009-11-06T04:52
at 2009-11-06T04:52
By Annie
at 2009-11-07T00:38
at 2009-11-07T00:38
By Mary
at 2009-11-11T23:23
at 2009-11-11T23:23
By Michael
at 2009-11-16T09:48
at 2009-11-16T09:48
By Dorothy
at 2009-11-18T07:25
at 2009-11-18T07:25
By Daph Bay
at 2009-11-23T01:35
at 2009-11-23T01:35
By Valerie
at 2009-11-27T17:49
at 2009-11-27T17:49
By Yuri
at 2009-12-01T15:19
at 2009-12-01T15:19
By Necoo
at 2009-12-05T16:52
at 2009-12-05T16:52
By Caitlin
at 2009-12-06T15:08
at 2009-12-06T15:08
By Charlotte
at 2009-12-07T00:54
at 2009-12-07T00:54
By Lily
at 2009-12-11T20:07
at 2009-12-11T20:07
By Emily
at 2009-12-15T14:03
at 2009-12-15T14:03
By Lucy
at 2009-12-19T04:47
at 2009-12-19T04:47
By Sarah
at 2009-12-20T18:18
at 2009-12-20T18:18
Related Posts
請推薦操盤用(程式自動交易)的NB
By Delia
at 2009-10-06T13:59
at 2009-10-06T13:59
趨勢時作趨勢,盤整時作盤整的可能性。
By Gilbert
at 2009-10-05T07:41
at 2009-10-05T07:41
Global Server接收資料延遲問題
By Selena
at 2009-10-04T15:27
at 2009-10-04T15:27
請問這樣的回測結果好嗎 ?
By Puput
at 2009-10-03T02:39
at 2009-10-03T02:39
TS的report無法存檔
By Charlie
at 2009-10-02T23:40
at 2009-10-02T23:40