Hatena::ブログ(Diary)

私は素人サーバ管理者 このページをアンテナに追加 RSSフィード Twitter

2011-05-15

VncSharpWpf - VNC Client User Control for WPF

Based on VncSharp which is created by Windows From, I made VncSharp - VNC Client User Control for WPF.

Download: https://github.com/nakano531/VncSharpWpf

Content of the zip file

  • VncSharpWpf.sln : Solution File.
  • VncSharpWPF : the Project which creates VncSharpWpf.dll - the dll of VNC Client User Control.
  • VncSharpWPF_Example : the sample appication which uses VncSharpWpf.

How to use

Step1. Build the Project "VncSharpWPF", and VncSharpWPF.dll is created.
Step2. Add VncSharpWPF.dll to the reference of your WPF project.
Step3. Create a instance of Class "VncSharpWPF.RemoteDesktopWpf", and deploy the instance where you want.

Case: Connect to VNC Server
Step4. Call method "Connect" to connect to VNC Server.
Step5. Call method "Disconnect" to disconnect a session.

Case: Wait for a connection from VNC Server
Step4. Call method "Listen" to start to wait a connection from VNC Server.
Step5. Method "StopListen" can stop waiting a connection.
Step6. After connected from VNC Server, You can disconnect a session by Method "Disconnect".

Problem

  • Compared to VncSharp, rendering speed is slow.
  • An enough test is not made because I developed VncSharpWpf with only one PC.

errorerror 2012/01/25 15:25 Error 1 Cannot import the following key file: VncSharpWpf.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_1F91AEA45AB30623 VncSharpWpf
Error 2 Importing key file "VncSharpWpf.pfx" was canceled. VncSharpWpf
Error 3 The tag 'RemoteDesktopWpf' does not exist in XML namespace 'clr-namespace:VncSharpWpf;assembly=VncSharpWpf'. Line 44 Position 14. C:\Users\JESS\Downloads\Compressed\VncSharpWpf-0.0.2_2\VncSharpWpf_Example\MainWindow.xaml 44 14 VncSharpWpf_Example

JornadanJornadan 2012/02/17 22:17 作成してくれたVNCSharpWPFを使ってApplicationを作っていますが、
Enterキーが効かなくて困っています。解決法案を教えていただけますか?

horus531horus531 2012/08/09 22:49 error, please delete "VncSharpWpf.pfx" from project "VncSharpWpf".

horus531horus531 2012/08/09 23:23 jornadanさん
手元にマシンが1台しか無くバグを確認できていません。Etnerキー以外は問題ないでしょうか?

saraganisaragani 2013/10/29 14:06 Your code does not work correctly on 32 bit machines.

You have a code in the VncClient like:
if (rtb.ServerVersion == 3.8f)
{

The problem is that float comparison can fail. Your code works fine on Debug and with Debug Exe.+
It also works fine with Release (F5), but it does not enter the float comparison fails on Release and Ctrl + F5 (or just running the Exe).

The code was compiled as x86 on a Win 7 64 Bit machine... However, I also run it on Windows XP that was running on the same machine and it failed.

You cannot trust floats comparison!!

If for example you first assign the version to another float and them compare, then it works:

float f1 = rtb.ServerVersion;
if (f1 == 3.8f)
{



Comparing the server version to itself on x86 fails.... meaning:
if (rtb.ServerVersion == rtb.ServerVersion)

スパム対策のためのダミーです。もし見えても何も入力しないでください
ゲスト


画像認証

トラックバック - http://d.hatena.ne.jp/horus531/20110515/1305443108
リンク元