RegressionTests__ExternalInterfaceTests.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 18:53:03 +0200
changeset 2327 bf482d49aeaf
parent 2092 5784e2503949
child 2386 76737c597924
permissions -rw-r--r--
#QUALITY by exept class: RegressionTests::StringTests added: #test82c_expanding
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
     1
"{ Encoding: utf8 }"
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
     2
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
     3
"{ Package: 'stx:goodies/regression' }"
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
"{ NameSpace: RegressionTests }"
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
TestCase subclass:#ExternalInterfaceTests
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:''
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	category:'tests-Regression'
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
!ExternalInterfaceTests class methodsFor:'documentation'!
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
documentation
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
"
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
    documentation to be added.
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
    [author:]
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
    21
	cg (cg@FUSI)
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
    [instance variables:]
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
    [class variables:]
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
    [see also:]
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
"
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
!
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
history
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
    "Created: / 23-04-2006 / 08:13:27 / cg"
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
! !
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    36
!ExternalInterfaceTests methodsFor:'structs'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    37
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    38
PROCESS_INFORMATION
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    39
	"Describes a created process and its main thread."
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    40
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    41
	<C: struct PROCESS_INFORMATION {
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    42
			HANDLE hProcess;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    43
			HANDLE hThread;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    44
			DWORD dwProcessId;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    45
			DWORD dwThreadId;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    46
		}>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    47
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    48
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    49
!ExternalInterfaceTests methodsFor:'structs'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    50
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    51
SECURITY_ATTRIBUTES
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    52
	"Describes security of associated process."
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    53
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    54
	<C: struct SECURITY_ATTRIBUTES {
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    55
			DWORD nLength;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    56
			LPVOID lpSecurityDescriptor;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    57
			BOOL bInheritHandle;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    58
		}>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    59
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    60
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    61
!ExternalInterfaceTests methodsFor:'structs'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    62
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    63
STARTUPINFOA
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    64
	"Describes how we want the process to be started."
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    65
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    66
	<C: struct STARTUPINFOA {
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    67
			DWORD   cb;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    68
			LPSTR           lpReserved;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    69
			LPSTR           lpDesktop;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    70
			LPSTR           lpTitle;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    71
			DWORD           dwX;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    72
			DWORD           dwY;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    73
			DWORD           dwXSize;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    74
			DWORD           dwYSize;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    75
			DWORD           dwXCountChars;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    76
			DWORD           dwYCountChars;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    77
			DWORD           dwFillAttribute;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    78
			DWORD           dwFlags;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    79
			WORD            wShowWindow;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    80
			WORD            cbReserved2;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    81
			LPBYTE          lpReserved2;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    82
			HANDLE  hStdInput;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    83
			HANDLE  hStdOutput;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    84
			HANDLE  hStdError;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    85
		}>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    86
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    87
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    88
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    89
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    90
BOOL
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    91
    <C: typedef long BOOL>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    92
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    93
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    94
     self new BOOL
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    95
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    96
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    97
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    98
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
    99
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   100
BYTE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   101
    <C: typedef unsigned char BYTE>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   102
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   103
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   104
     self new BYTE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   105
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   106
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   107
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   108
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   109
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   110
DWORD
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   111
    <C: typedef unsigned long DWORD>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   112
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   113
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   114
       self new DWORD
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   115
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   116
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   117
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   118
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   119
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   120
HANDLE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   121
    <C: typedef void * HANDLE>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   122
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   123
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   124
     self new HANDLE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   125
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   126
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   127
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   128
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   129
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   130
LPBYTE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   131
    <C: typedef BYTE *LPBYTE>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   132
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   133
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   134
     self new LPBYTE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   135
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   136
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   137
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   138
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   139
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   140
LPCTSR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   141
    <C: typedef void * LPCTSR>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   142
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   143
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   144
     self new LPCTSR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   145
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   146
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   147
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   148
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   149
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   150
LPCTSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   151
    <C: typedef void * LPCTSTR>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   152
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   153
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   154
     self new LPCTSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   155
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   156
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   157
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   158
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   159
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   160
LPSIZE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   161
    <C: typedef SIZE * LPSIZE>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   162
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   163
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   164
     self new LPSIZE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   165
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   166
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   167
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   168
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   169
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   170
LPSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   171
    <C: typedef char * LPSTR>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   172
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   173
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   174
     self new LPSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   175
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   176
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   177
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   178
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   179
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   180
LPTSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   181
    <C: typedef void * LPTSTR>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   182
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   183
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   184
     self new LPTSTR
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   185
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   186
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   187
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   188
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   189
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   190
LPVOID
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   191
    <C: typedef void * LPVOID>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   192
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   193
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   194
     self new LPVOID
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   195
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   196
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   197
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   198
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   199
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   200
SIZE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   201
    <C: typedef struct {
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   202
	    long cx;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   203
	    long cy;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   204
    } SIZE>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   205
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   206
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   207
     self new SIZE
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   208
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   209
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   210
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   211
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   212
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   213
WORD
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   214
    <C: typedef unsigned short WORD>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   215
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   216
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   217
     self new WORD
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   218
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   219
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   220
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   221
!ExternalInterfaceTests methodsFor:'types'!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   222
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   223
fooType
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   224
   <C: struct foo {
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   225
	long l1;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   226
	float f1;
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   227
   }>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   228
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   229
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   230
     self new fooType
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   231
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   232
! !
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   233
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   234
!ExternalInterfaceTests methodsFor:'procedures'!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   235
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   236
CreateProcess: imageName commandLine: commandLine pSecurity: pSecurity tSecurity: tSecurity inheritHandles: inheritHandles creationFlags: creationFlags environment: environment currentDirectoryName: currentDirectoryName startupInfo: startupInfo processInfo: processInfo
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   237
    "Create a new process running in a separate address space. n.b., we use CreateProcessA
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   238
    (the ANSI version) rather than CreateProcessW (the UNICODE/wide version) as we want the
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   239
    daemon, vworad, to receive its command line arguments as ANSI strings not wide strings."
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   240
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   241
    <C: BOOL CreateProcessA(
2089
650f7c30736e wrong types fixed
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
   242
	    LPCSTR imageName,
650f7c30736e wrong types fixed
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
   243
	    LPSTR commandLine,
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   244
	    struct SECURITY_ATTRIBUTES *pSecurity,
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   245
	    struct SECURITY_ATTRIBUTES *tSecurity,
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   246
	    BOOL inheritHandles,
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   247
	    DWORD creationFlags,
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   248
	    LPVOID environment,
2089
650f7c30736e wrong types fixed
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
   249
	    LPCSTR currentDirectoryName,
650f7c30736e wrong types fixed
Claus Gittinger <cg@exept.de>
parents: 1447
diff changeset
   250
	    struct STARTUPINFOA *startupInfo,
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   251
	    struct PROCESS_INFORMATION *processInfo)>
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   252
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   253
"
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   254
self new
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   255
 CreateProcess: 'foo' commandLine: 'foo bla' pSecurity: nil tSecurity: nil inheritHandles: false
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   256
 creationFlags: 0 environment: nil currentDirectoryName: 'baz' startupInfo: nil processInfo: nil
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   257
"
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   258
!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   259
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   260
TerminateProcess: hProcess exitCode: dwExitCode
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   261
	"Kill the specified process."
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   262
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   263
	self primTerminateProcess: hProcess exitCode: 1234
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   264
!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   265
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   266
closeHandle: aHandle
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   267
	"Close an OS Handle decrementing it's use count."
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   268
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   269
	<C: int CloseHandle(HANDLE aHandle)>
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   270
!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   271
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   272
primTerminateProcess: hProcess exitCode: dwExitCode
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   273
	"Kill the specified process."
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   274
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   275
	<C: BOOL TerminateProcess(HANDLE hProcess, DWORD dwExitCode)>
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   276
!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   277
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   278
setCurrentDirectory: pathName
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   279
        "Set the current working directory."
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   280
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   281
        <C: BOOL _wincall
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   282
            SetCurrentDirectoryA(LPCSTR pathName)>
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   283
        "/ ^self externalAccessFailedWith: _errorCode
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   284
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   285
    "Modified: / 04-03-2019 / 11:15:34 / Claus Gittinger"
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   286
! !
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   287
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   288
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
!ExternalInterfaceTests methodsFor:'tests'!
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
test_call_01
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
    |fn|
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
671
3c017f244c8e changed: #test_call_01
Stefan Vogel <sv@exept.de>
parents: 544
diff changeset
   294
    OperatingSystem isMSWINDOWSlike ifFalse:[
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   295
	"This test makes sense only on windows"
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   296
	^ self.
671
3c017f244c8e changed: #test_call_01
Stefan Vogel <sv@exept.de>
parents: 544
diff changeset
   297
    ].
3c017f244c8e changed: #test_call_01
Stefan Vogel <sv@exept.de>
parents: 544
diff changeset
   298
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
    fn := ExternalLibraryFunction
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   300
	    name:'Beep'
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   301
	    module:'kernel32.dll'
2090
94c3f840c088 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2089
diff changeset
   302
	    callType:'api'
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   303
	    returnType:(CType bool)
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   304
	    argumentTypes:(Array with:(CType unsignedLong) with:(CType unsignedLong)).
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
    fn invokeWith:440 with:1.
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
    "
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
     self run:#test_call_01
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
     self new test_call_01
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
    "
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   312
!
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   313
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   314
test_call_02
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   315
    |fn|
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   316
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   317
    fn := ExternalLibraryFunction
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   318
            name:'printf'
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   319
            module:'libc'
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   320
            returnType:(CType void)
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   321
            argumentTypes:(Array with:(CType charPointer) 
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   322
                                 with:(CType int)).
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   323
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   324
    fn invokeWith:c'hello world %d\n' with:1.
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   325
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   326
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   327
     self run:#test_call_02
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   328
     self new test_call_02
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   329
    "
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   330
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   331
    "Created: / 04-03-2019 / 11:12:23 / Claus Gittinger"
2092
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   332
!
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   333
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   334
test_call_03
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   335
    |fn nsApp|
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   336
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   337
    OperatingSystem isOSXlike ifFalse:[
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   338
        "This test makes sense only on OSX"
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   339
        ^ self
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   340
    ].
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   341
    
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   342
    nsApp := ObjCClass named:'NSApplication'.
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   343
    
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   344
    fn := ExternalLibraryFunction
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   345
            name:'sharedApplication'
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   346
            module:nil
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   347
            callType:'objc'
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   348
            returnType:(CType void)
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   349
            argumentTypes:#().
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   350
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   351
    fn invokeObjCOn:nsApp.
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   352
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   353
    "
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   354
     self run:#test_call_03
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   355
     self new test_call_03
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   356
    "
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   357
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   358
    "Created: / 04-03-2019 / 11:41:02 / Claus Gittinger"
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
! !
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   361
!ExternalInterfaceTests methodsFor:'types'!
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   362
341
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   363
var1
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   364
    <C: #define var1 1234>
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   365
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   366
    "
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   367
     self new var1
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   368
    "
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   369
!
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   370
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   371
var2
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   372
    <C: #define var1 "hello">
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   373
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   374
    "
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   375
     self new var2
341
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   376
    "
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   377
!
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   378
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   379
var3
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   380
    <C: #define var1 1.2345>
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   381
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   382
    "
1447
2351db93aa5b package changes
Claus Gittinger <cg@exept.de>
parents: 671
diff changeset
   383
     self new var3
341
580b8efa4649 c: #define added
Claus Gittinger <cg@exept.de>
parents: 325
diff changeset
   384
    "
325
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   385
! !
3f956b746c71 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 324
diff changeset
   386
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
!ExternalInterfaceTests class methodsFor:'documentation'!
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
version
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
    ^ '$Header$'
2092
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   391
!
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   392
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   393
version_CVS
5784e2503949 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2091
diff changeset
   394
    ^ '$Header$'
324
cf40af91120c initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
! !
2091
752e665a5a7f #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 2090
diff changeset
   396