Subversion Repository Public Repository

ChrisCompleteCodeTrunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Runtime.InteropServices;
using System.Text;

namespace DWToolkit
{
    public static class DWTKDLL
    {
        public enum DWFLAGPARAM : uint
        {
            DWFLAGPARAM_STARTSTAYMINIMIZED = 1,
            DWFLAGPARAM_STARTMINIMIZED = 2,
            DWFLAGPARAM_STARTREADONLY = 4
        };

        public enum DWTK_MODE : uint
        {
            DWTK_MODE_ISRUNNING = 1
        };

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKGetSessionHandle")]
        // int DWTKGetSessionHandle(long hWndParent, long* lplToolKitSessionHandle); 
        public static extern int DWTKGetSessionHandle(long hWndParent, ref IntPtr lplToolKitSessionHandle);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKFreeSessionHandle")]
        //int DWTKFreeSessionHandle(long lToolKitSessionHandle);
        public static extern int DWTKFreeSessionHandle(long lToolKitSessionHandle);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKStartDocuWare")]
        //int DWTKStartDocuWare(long lToolKitSessionHandle, LPCTSTR lpszDWUserName, LPCTSTR lpszDWPassWord, UINT uiTimeOutInSeconds);
        public static extern int DWTKStartDocuWareW(IntPtr lToolKitSessionHandle, [MarshalAs(UnmanagedType.LPWStr)]string lpszDWUserName, [MarshalAs(UnmanagedType.LPWStr)]string lpszDWPassWord, uint uiTimeOutInSeconds);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKEndDocuWare")]
        //int DWTKEndDocuWare(long lToolKitSessionHandle);
        public static extern int DWTKEndDocuWare(long lToolKitSessionHandle);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKGetCurrentUserName")]
        //int DWTKGetCurrentUserName(long lToolKitSessionHandle, LPTSTR lpszBuffer, UINT uiBufferSize);
        public static extern int DWTKGetCurrentUserName(long lToolKitSessionHandle, ref string lpszBuffer, uint uiBufferSize);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKStartDocuWareEx")]
        //int DWTKStartDocuWareEx(long lToolKitSessionHandle, LPCTSTR lpszUserName, LPCTSTR lpszPassWord, UINT uiTimeOutInSeconds, DWORD dwFlag);
        public static extern int DWTKStartDocuWareEx(long lToolKitSessionHandle, string lpszUserName, string lpszPassWord, uint uiTimeOutInSeconds, DWFLAGPARAM dwFlag);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKIsDocuWareRunning")]
        //int DWTKIsDocuWareRunning (long lToolKitSessionHandle, DWORD* pdwMode); 
        public static extern int DWTKIsDocuWareRunning(long lToolKitSessionHandle, ref IntPtr pdwMode);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKGetNumberOfDocuments")]
        //int DWTKGetNumberOfDocuments (long lToolKitSessionHandle, LPCTSTR lpszBasket);
        public static extern int DWTKGetNumberOfDocuments(long lToolKitSessionHandle, string lpszBasket);

        [DllImport("DWTKDLL.dll", EntryPoint = "DWTKGetAllArchives")]
        //int DWTKGetAllArchives(long lToolKitSessionHandle, LPTSTR lpszBuffer, UINT uiBufferSize);
        public static extern int DWTKGetAllArchives(long lToolKitSessionHandle);
    }
}

Commits for ChrisCompleteCodeTrunk/DW46Export/DWToolkit/DWTKDLL.cs

Diff revisions: vs.
Revision Author Commited Message
1 BBDSCHRIS picture BBDSCHRIS Wed 22 Aug, 2018 20:08:03 +0000