コード例 #1
0
ファイル: XFSDeviceBase.cs プロジェクト: xxmedxx/XFS.Net
        public void Open(string logicName, bool paramAutoRegister = true,
                         string appID       = "XFS.NET", string lowVersion = "3.0",
                         string highVersion = "3.0")
        {
            autoRegister = paramAutoRegister;
            int requestVersion = XFSUtil.ParseVersionString(lowVersion,
                                                            highVersion);
            WFSVERSION srvcVersion = new WFSVERSION();
            WFSVERSION spVersion   = new WFSVERSION();
            int        hResult     = 0;

            if (!isStartup)
            {
                hResult = XfsApi.WFSStartUp(requestVersion, ref spVersion);
                if (hResult != XFSDefinition.WFS_SUCCESS &&
                    hResult != XFSDefinition.WFS_ERR_ALREADY_STARTED)
                {
                    OnOpenError(hResult);
                    return;
                }
            }
            hResult = XfsApi.WFSAsyncOpen(logicName, IntPtr.Zero, appID, 0,
                                          XFSConstants.WFS_INDEFINITE_WAIT, ref hService,
                                          MessageHandle, requestVersion, ref srvcVersion, ref spVersion,
                                          ref requestID);
            if (hResult != XFSDefinition.WFS_SUCCESS)
            {
                OnOpenError(hResult);
            }
        }
コード例 #2
0
ファイル: XfsApi.cs プロジェクト: xxmedxx/XFS.Net
 public static extern int WFSStartUp(int dwVersionsRequired, ref WFSVERSION lpWFSVersion);
コード例 #3
0
ファイル: XfsApi.cs プロジェクト: xxmedxx/XFS.Net
 public static extern int WFSAsyncOpen(string lpszLogicalName, IntPtr hApp, string lpszAppID, int dwTraceLevel, int dwTimeOut,
                                       ref ushort lphService, IntPtr hWnd, int dwSrvcVersionsRequired, ref WFSVERSION lpSrvcVersion, ref WFSVERSION lpSPIVersion,
                                       ref int lpRequestID);