在C#中define struct並以 .dll 方式給C++用

June 30th, 2009 Phanix

原本以為在 C# 中使用 struct 又要匯出成 .dll 給 c++ 需要有什麼特殊處理,結果發現其實不用…

namespace TESTCOMObject
{
    //其他程式碼
    //...

    public struct tag_Data
    {
        public string strName;
        public string strValue;
    }
}

而在 C++ 裡頭要使用就只要 import 之後就可以放心用了

TESTCOMObject::tag_Data aa[50];
aa[7].strName = "xxabc";
aa[7].strValue = "oo";
aa[17].strName = "xxabcyy";
aa[17].strValue = "oo";

TESTCOMObject::tag_Data bb;
bb.strName = "hahaha";
bb.strValue = "hehehe";

Execute Batch file in Silent mode (no cmd window) / 以無 dos 命令列視窗執行 .bat

June 29th, 2009 Phanix

有點繁瑣的方式,全部需要三個檔案來完成。

Read the rest of this entry / 繼續閱讀 »

Stanford 照片

June 24th, 2009 Phanix

_MG_7159 (by Phanix)

_MG_7136 (by Phanix)

_MG_7186 (by Phanix)

_MG_7228 (by Phanix)

_MG_7224 (by Phanix)

Local Wine Tasting — XIX

June 12th, 2009 Phanix

@Vino Prima, a “local” wine shop, but not “local” (santa cruz mountain area) wines.

Read the rest of this entry / 繼續閱讀 »

Local Wine Tasting — XVIII

June 8th, 2009 Phanix

This is the last time in Vinocruz.
未成年請勿飲酒

Read the rest of this entry / 繼續閱讀 »

Stanford University

June 7th, 2009 Phanix

很漂亮的校園,個人覺得比 UC Berkeley 還美。不過因為我很笨地把讀卡機寄回家了,所以下面的照片絕大部分都拿別人拍的來充數 :Q

Read the rest of this entry / 繼續閱讀 »

Berkeley

June 5th, 2009 Phanix

前一陣子去了 Berkeley,想說都已經來加州了,不去逛逛好像蠻可惜的,就跟來了加州不喝葡萄酒一樣 (誤)。

Read the rest of this entry / 繼續閱讀 »

Local Wine Tasting — XVII

June 4th, 2009 Phanix

The same, @vinocruz. 這一次的大概是整體品質最好的一次。
未成年請勿飲酒

Read the rest of this entry / 繼續閱讀 »

天氣真好~ :D

June 3rd, 2009 Phanix

R0015852 (by Phanix)

微風在陽光下把雲變得如羽似絮。

此外,今天的能見度也相當的好,可以看到 half moon bay 的對岸。下面的照片中可以看到左邊遠方有山的 skyline!
R0015855 (by Phanix)

half moon bay 的對岸有多遠呢?Santa Cruz 直線到對岸的 Monterey 大概50公里吧。大概是從台北到桃園了。
Noname (by Phanix)

Tako Sushi

June 3rd, 2009 Phanix

沒有特別好,但以價錢來說,算是可以接受。

Read the rest of this entry / 繼續閱讀 »