2012-02-06 59 views
0

所以我在Microsoft Visual C#2010 Express中創建了一個DLL,我想在PowerBuilder 11.5中使用該DLL。
爲了測試,我在c#dll中創建了一個簡單的求和函數,在PowerBuilder中使用語句Function int sum(int x, int y)庫「NETS.dll」在PowerBuilder中的Global External Functions中聲明它,我按下了一個命令按鈕,但每次我嘗試運行時,PowerBuilder都會說「未知函數名稱」。
需要幫助。
謝謝如何在powerbuilder中使用C#dll?

+0

是不是可導入通過http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc00357_1100/html/newfeat/CEGIBCHA.htm – 2012-02-06 09:18:40

+0

在上面的鏈接找不到內容! – Ankit 2015-12-16 06:24:47

回答

4

您必須將您的DLL作爲COM對象公開,在系統上將其註冊爲regasm.exe,並通過和使用它,並使用它和OLEObjectConnectToNewObject PowerScript函數。